From 75289b877d0a89a3ce80412d7fa8332ffdb2ce64 Mon Sep 17 00:00:00 2001 From: Jim Unroe Date: Thu, 29 Jun 2023 21:12:35 -0400 Subject: [PATCH] Retevis RB27: support full band TX/RX - fixes #10686 --- chirp/drivers/bf_t8.py | 25 ++----------------------- tests/unit/test_chirp_common.py | 3 +-- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/chirp/drivers/bf_t8.py b/chirp/drivers/bf_t8.py index 99a3da208..035cca24b 100644 --- a/chirp/drivers/bf_t8.py +++ b/chirp/drivers/bf_t8.py @@ -875,7 +875,7 @@ 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), @@ -883,30 +883,9 @@ class RetevisRB27(RetevisRB27B): 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): diff --git a/tests/unit/test_chirp_common.py b/tests/unit/test_chirp_common.py index c8528037b..8e2d5705d 100644 --- a/tests/unit/test_chirp_common.py +++ b/tests/unit/test_chirp_common.py @@ -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):