mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 02:27:21 +00:00
retevis_rt21.py: Add Retevis RB89 - fixes #11465
This commit is contained in:
parent
82f80107e4
commit
1eee07b8a4
@ -176,6 +176,7 @@ struct {
|
||||
u8 channel_8[13]; // 0070-007C
|
||||
u8 unknown_8; // 007D
|
||||
u8 tail; // QT/DQT Tail(inverted) 007E
|
||||
u8 tailmode; // QT/DQT Tail Mode 007F
|
||||
} settings;
|
||||
|
||||
#seekto 0x01F0;
|
||||
@ -528,6 +529,7 @@ PFKEY_LIST = ["None", "Monitor", "Lamp", "Warn", "VOX", "VOX Delay",
|
||||
PFKEY28B_LIST = ["None", "Scan", "Warn", "TX Power", "Monitor"]
|
||||
PFKEY86_LIST = ["None", "Monitor", "Lamp", "Warn", "VOX", "VOX Delay",
|
||||
"Key Lock", "TX Power", "Scan"]
|
||||
PFKEY89_LIST = PFKEY_LIST + ["Bluetooth ON/OFF"]
|
||||
POT_LIST = ["Channel Type", "Volume Type"]
|
||||
SAVE_LIST = ["Standard", "Super"]
|
||||
SAVEM_LIST = ["1-5", "1-8", "1-10", "1-15"]
|
||||
@ -977,8 +979,10 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
mem.extra.append(rset)
|
||||
|
||||
if self.MODEL == "RB26" or self.MODEL == "RT76" \
|
||||
or self.MODEL == "RB23" or self.MODEL == "AR-63":
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23":
|
||||
or self.MODEL == "RB23" or self.MODEL == "AR-63" \
|
||||
or self.MODEL == "RB89":
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23" \
|
||||
or self.MODEL == "RB89":
|
||||
rs = RadioSettingValueBoolean(_mem.bcl)
|
||||
rset = RadioSetting("bcl", "Busy Channel Lockout", rs)
|
||||
mem.extra.append(rset)
|
||||
@ -1409,8 +1413,10 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
"RT76",
|
||||
"RT86",
|
||||
"RT619",
|
||||
"RB89",
|
||||
]:
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23":
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23" \
|
||||
or self.MODEL == "RB89":
|
||||
_settings2 = self._memobj.settings2
|
||||
_settings3 = self._memobj.settings3
|
||||
|
||||
@ -1466,7 +1472,8 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
rset = RadioSetting("voice", "Voice Annumciation", rs)
|
||||
basic.append(rset)
|
||||
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23":
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23" \
|
||||
or self.MODEL == "RB89":
|
||||
rs = RadioSettingValueList(VOICE_LIST2,
|
||||
VOICE_LIST2[_settings.voice])
|
||||
rset = RadioSetting("voice", "Voice Annumciation", rs)
|
||||
@ -1477,7 +1484,7 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
rset = RadioSetting("chnumberd", "Channel Number Enable", rs)
|
||||
basic.append(rset)
|
||||
|
||||
if self.MODEL == "RT86":
|
||||
if self.MODEL == "RT86" or self.MODEL == "RB89":
|
||||
rs = RadioSettingValueList(SPECIAL_LIST,
|
||||
SPECIAL_LIST[_settings.tailmode])
|
||||
rset = RadioSetting("tailmode", "QT/DQT Tail Mode", rs)
|
||||
@ -1494,6 +1501,7 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
if self.MODEL in ["RB23",
|
||||
"RB26",
|
||||
"RT86",
|
||||
"RB89",
|
||||
]:
|
||||
rs = RadioSettingValueBoolean(not _settings.tail)
|
||||
rset = RadioSetting("tail", "QT/DQT Tail", rs)
|
||||
@ -1537,7 +1545,8 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
rset = RadioSetting("voxd", "Vox Delay", rs)
|
||||
basic.append(rset)
|
||||
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23":
|
||||
if self.MODEL == "RB26" or self.MODEL == "RB23" \
|
||||
or self.MODEL == "RB89":
|
||||
rs = RadioSettingValueBoolean(_settings3.vox)
|
||||
rset = RadioSetting("settings3.vox", "Vox Function", rs)
|
||||
basic.append(rset)
|
||||
@ -1693,6 +1702,17 @@ class RT21Radio(chirp_common.CloneModeRadio):
|
||||
rset = RadioSetting("pf2", "PF2 Key Set", rs)
|
||||
basic.append(rset)
|
||||
|
||||
if self.MODEL == "RB89":
|
||||
rs = RadioSettingValueList(PFKEY89_LIST,
|
||||
PFKEY89_LIST[_settings.pf1])
|
||||
rset = RadioSetting("pf1", "PF1 Key Set", rs)
|
||||
basic.append(rset)
|
||||
|
||||
rs = RadioSettingValueList(PFKEY89_LIST,
|
||||
PFKEY89_LIST[_settings.pf2])
|
||||
rset = RadioSetting("pf2", "PF2 Key Set", rs)
|
||||
basic.append(rset)
|
||||
|
||||
if self.MODEL == "RB28B" or self.MODEL == "RB628B":
|
||||
rs = RadioSettingValueInteger(0, 9, _settings.squelch)
|
||||
rset = RadioSetting("squelch", "Squelch Level", rs)
|
||||
@ -2222,3 +2242,31 @@ class RT86Radio(RT21Radio):
|
||||
|
||||
def process_mmap(self):
|
||||
self._memobj = bitwise.parse(MEM_FORMAT_RT86, self._mmap)
|
||||
|
||||
|
||||
@directory.register
|
||||
class RB89Radio(RT21Radio):
|
||||
"""RETEVIS RB89"""
|
||||
VENDOR = "Retevis"
|
||||
MODEL = "RB89"
|
||||
BLOCK_SIZE = 0x20
|
||||
BLOCK_SIZE_UP = 0x10
|
||||
|
||||
POWER_LEVELS = [chirp_common.PowerLevel("High", watts=5.00),
|
||||
chirp_common.PowerLevel("Low", watts=0.50)]
|
||||
|
||||
_magic = b"PHOGR" + b"\x01" + b"0"
|
||||
_fingerprint = [b"P32073" + b"\x01\xFF", ]
|
||||
_upper = 30
|
||||
_ack_1st_block = False
|
||||
_skipflags = True
|
||||
_reserved = True
|
||||
_gmrs = False # sold as GMRS radio but supports full band TX/RX
|
||||
|
||||
_ranges = [
|
||||
(0x0000, 0x0330),
|
||||
]
|
||||
_memsize = 0x0340
|
||||
|
||||
def process_mmap(self):
|
||||
self._memobj = bitwise.parse(MEM_FORMAT_RB26, self._mmap)
|
||||
|
@ -323,6 +323,7 @@
|
||||
| <a name="Retevis_RB75"></a> Retevis_RB75 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.02% |
|
||||
| <a name="Retevis_RB85"></a> Retevis_RB85 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.02% |
|
||||
| <a name="Retevis_RB87"></a> Retevis_RB87 | [@KC9HI](https://github.com/KC9HI) | 10-Mar-2023 | Yes | |
|
||||
| <a name="Retevis_RB89"></a> Retevis_RB89 | [@KC9HI](https://github.com/KC9HI) | 6-Aug-2024 | Yes | |
|
||||
| <a name="Retevis_RT1"></a> Retevis_RT1 | [@KC9HI](https://github.com/KC9HI) | 11-Dec-2022 | Yes | 0.08% |
|
||||
| <a name="Retevis_RT15"></a> Retevis_RT15 | [@KC9HI](https://github.com/KC9HI) | 18-Feb-2023 | Yes | 0.00% |
|
||||
| <a name="Retevis_RT16"></a> Retevis_RT16 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.02% |
|
||||
@ -467,11 +468,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:** 464
|
||||
**Drivers:** 465
|
||||
|
||||
**Tested:** 87% (406/58) (93% of usage stats)
|
||||
**Tested:** 87% (407/58) (93% of usage stats)
|
||||
|
||||
**Byte clean:** 91% (425/39)
|
||||
**Byte clean:** 91% (426/39)
|
||||
|
||||
## Meaning of this testing
|
||||
|
||||
|
BIN
tests/images/Retevis_RB89.img
Normal file
BIN
tests/images/Retevis_RB89.img
Normal file
Binary file not shown.
@ -289,6 +289,7 @@ Retevis_RB629,@KC9HI,24-Dec-2022
|
||||
Retevis_RB75,@KC9HI,28-Nov-2022
|
||||
Retevis_RB85,@KC9HI,28-Nov-2022
|
||||
Retevis_RB87,@KC9HI,10-Mar-2023
|
||||
Retevis_RB89,@KC9HI,6-Aug-2024
|
||||
Retevis_RT15,@KC9HI,18-Feb-2023
|
||||
Retevis_RT16,@KC9HI,30-Nov-2022
|
||||
Retevis_RT19,@KC9HI,30-Nov-2022
|
||||
|
Loading…
Reference in New Issue
Block a user