Skip to content

Commit

Permalink
Retevis RB27: support full band TX/RX - fixes #10686
Browse files Browse the repository at this point in the history
  • Loading branch information
KC9HI authored and kk7ds committed Jun 30, 2023
1 parent 500a7aa commit 634249a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
25 changes: 2 additions & 23 deletions chirp/drivers/bf_t8.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,38 +875,17 @@ class RetevisRB27B(BFT8Radio):
class RetevisRB27(RetevisRB27B):
VENDOR = "Retevis"
MODEL = "RB27"
DUPLEXES = ["", "+", "off"]
DUPLEXES = ['', '-', '+', 'off']
POWER_LEVELS = [chirp_common.PowerLevel("High", watts=5.00),
chirp_common.PowerLevel("Low", watts=0.50)]
VALID_BANDS = [(136000000, 174000000),
(400000000, 520000000)]
ODD_SPLIT = False

_upper = 99
_gmrs = True
_gmrs = False # sold as GMRS radio but supports full band TX/RX
_frs = _murs = _pmr = False

def validate_memory(self, mem):
msgs = super().validate_memory(mem)

_msg_duplex = 'Duplex must be "off" for this frequency'
_msg_offset = 'Only simplex or +5MHz offset allowed on GMRS'

if mem.freq not in GMRS_FREQS:
if mem.duplex != "off":
msgs.append(chirp_common.ValidationWarning(_msg_duplex))
if mem.freq in FRS_FREQS3:
if mem.duplex and mem.offset != 5000000:
msgs.append(chirp_common.ValidationWarning(_msg_offset))
if mem.duplex and mem.duplex != "+":
msgs.append(chirp_common.ValidationWarning(_msg_offset))

return msgs

def check_set_memory_immutable_policy(self, existing, new):
existing.immutable = []
super().check_set_memory_immutable_policy(existing, new)


@directory.register
class RetevisRB27V(RetevisRB27B):
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_chirp_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,7 @@ class TestOverrideRules(base.BaseTest):
'Radioddity_DB25-G',
'Retevis_RA85',
'Retevis_RA685',
'Retevis_RB17P',
'Retevis_RB27',
'Retevis_RB17P'
]

def _test_radio_override_immutable_policy(self, rclass):
Expand Down

0 comments on commit 634249a

Please sign in to comment.