Skip to content

Commit

Permalink
mml_jc8810.py: Add Radtel RT-495 - fixes #11161
Browse files Browse the repository at this point in the history
  • Loading branch information
KC9HI committed Jun 14, 2024
1 parent 3d655f6 commit 41b87f1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
29 changes: 23 additions & 6 deletions chirp/drivers/mml_jc8810.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ def apply_skey2s_listvalue(setting, obj):
unwanted = [0, 5, 7, 9, 10, 11, 12]
elif self.MODEL in ["A36plus", "A36plus_8w"]:
unwanted = [0, 5, 7, 9, 10, 11]
elif self.MODEL in ["RT-630"]:
elif self.MODEL in ["RT-630", "RT-495"]:
unwanted = [5, 9, 10, 11, 12]
else:
unwanted = []
Expand Down Expand Up @@ -880,7 +880,7 @@ def apply_skey2l_listvalue(setting, obj):
unwanted = [0, 5, 7, 8, 10, 11, 12]
elif self.MODEL in ["A36plus", "A36plus_8w"]:
unwanted = [0, 5, 7, 8, 11, 12]
elif self.MODEL in ["RT-630"]:
elif self.MODEL in ["RT-630", "RT-495"]:
unwanted = [5, 9, 10, 11, 12]
else:
unwanted = []
Expand Down Expand Up @@ -913,7 +913,7 @@ def apply_skey3s_listvalue(setting, obj):
unwanted = [0, 5, 7, 8, 9, 10, 11, 12]
elif self.MODEL in ["A36plus", "A36plus_8w"]:
unwanted = [0, 5, 7, 8, 11]
elif self.MODEL in ["RT-630"]:
elif self.MODEL in ["RT-630", "RT-495"]:
unwanted = [5, 9, 10, 11, 12]
else:
unwanted = []
Expand All @@ -932,7 +932,8 @@ def apply_skey3s_listvalue(setting, obj):
rset.set_apply_callback(apply_skey3s_listvalue, _settings.skey3_sp)
basic.append(rset)

if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-470", "RT-630"]:
if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-470", "RT-630",
"RT-495"]:
# Menu 24: PF3 LONG PRESS (RT-470L)
def apply_skey3l_listvalue(setting, obj):
LOG.debug("Setting value: " + str(setting.value) +
Expand All @@ -944,7 +945,7 @@ def apply_skey3l_listvalue(setting, obj):

if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-470"]:
unwanted = [8, 9, 10, 11, 12]
elif self.MODEL in ["RT-630"]:
elif self.MODEL in ["RT-630", "RT-495"]:
unwanted = [5, 9, 10, 11, 12]
else:
unwanted = []
Expand Down Expand Up @@ -1007,7 +1008,7 @@ def apply_skeytop_listvalue(setting, obj):
rset = RadioSetting("ponmsg", "Power On Message", rs)
basic.append(rset)

if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-630"]:
if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-630", "RT-495"]:
rs = RadioSettingValueList(TAILCODE_LIST,
TAILCODE_LIST[_settings.tailcode])
rset = RadioSetting("tailcode", "Tail Code", rs)
Expand Down Expand Up @@ -1539,3 +1540,19 @@ class RT630Radio(JC8810base):
(0xB500, 0xB740)
]
_memsize = 0xB740


@directory.register
class RT495Radio(RT630Radio):
"""Radtel RT-495"""
VENDOR = "Radtel"
MODEL = "RT-495"

# ==========
# Notice to developers:
# The RT-495 support in this driver is currently based upon v0.07 firmware.
# ==========

_fingerprint = [b"\x00\x00\x00\x24\x00\x20\xD0\x04", # fw 0.06
b"\x00\x00\x00\x32\x00\x20\xD8\x04", # fw 0.07
]
7 changes: 4 additions & 3 deletions tests/Python3_Driver_Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
| <a name="Radtel_RT-470L"></a> Radtel_RT-470L | [@KC9HI](https://github.com/KC9HI) | 5-May-2023 | Yes | |
| <a name="Radtel_RT-470X"></a> Radtel_RT-470X | [@KC9HI](https://github.com/KC9HI) | 10-Aug-2023 | Yes | |
| <a name="Radtel_RT-490"></a> Radtel_RT-490 | [@KC9HI](https://github.com/KC9HI) | 11-Nov-2023 | Yes | 0.08% |
| <a name="Radtel_RT-495"></a> Radtel_RT-495 | [@KC9HI](https://github.com/KC9HI) | 14-Jun-2024 | Yes | |
| <a name="Radtel_RT-630"></a> Radtel_RT-630 | [@KC9HI](https://github.com/KC9HI) | 14-Jun-2024 | Yes | |
| <a name="Radtel_RT-730"></a> Radtel_RT-730 | [@KC9HI](https://github.com/KC9HI) | 11-May-2024 | Yes | |
| <a name="Radtel_T18"></a> Radtel_T18 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.07% |
Expand Down Expand Up @@ -463,11 +464,11 @@
| <a name="Zastone_ZT-X6"></a> Zastone_ZT-X6 | [Implied by Retevis_RT22](#user-content-Retevis_RT22) | 9-Dec-2022 | Yes | 0.11% |
## Stats

**Drivers:** 460
**Drivers:** 461

**Tested:** 87% (403/57) (93% of usage stats)
**Tested:** 87% (404/57) (93% of usage stats)

**Byte clean:** 91% (421/39)
**Byte clean:** 91% (422/39)

## Meaning of this testing

Expand Down
Binary file added tests/images/Radtel_RT-495.img
Binary file not shown.
1 change: 1 addition & 0 deletions tests/py3_driver_testers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Radtel_RT-470,@KC9HI,2-Apr-2023
Radtel_RT-470L,@KC9HI,5-May-2023
Radtel_RT-470X,@KC9HI,10-Aug-2023
Radtel_RT-490,@KC9HI,11-Nov-2023
Radtel_RT-495,@KC9HI,14-Jun-2024
Radtel_RT-630,@KC9HI,14-Jun-2024
Radtel_RT-730,@KC9HI,11-May-2024
Radtel_T18,@KC9HI,28-Nov-2022
Expand Down

0 comments on commit 41b87f1

Please sign in to comment.