---------- Forwarded message --------- From: Jim Unroe kc9hi@comcast.net Date: Mon, May 24, 2021 at 9:47 PM Subject: [PATCH 2 of 2] [RT22] Add BCL and Signal settings to Retevis RT22FRS and RT622 models To: Rock.Unroe@gmail.com
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1621906230 14400 # Mon May 24 21:30:30 2021 -0400 # Node ID 5415ba0656b31a97617d177d26fc4ddb813d8337 # Parent 05cad5ed5ef71ee0b7cd7555fd3f7fbeccc315ba [RT22] Add BCL and Signal settings to Retevis RT22FRS and RT622 models
This patch adds support for the per-channel "BCL" and "Signal" settings.
related to #9043
diff -r 05cad5ed5ef7 -r 5415ba0656b3 chirp/drivers/retevis_rt22.py --- a/chirp/drivers/retevis_rt22.py Mon May 24 21:19:57 2021 -0400 +++ b/chirp/drivers/retevis_rt22.py Mon May 24 21:30:30 2021 -0400 @@ -38,7 +38,9 @@ u8 unknown3:2, highpower:1, // Power Level wide:1, // Bandwidth - unknown4:4; + unknown4:2, + signal:1, // Signal + bcl:1; // BCL u8 unknown5[2]; } memory[16];
@@ -491,6 +493,17 @@ mem.skip = "" if (_skp & bitpos) else "S" LOG.debug("mem.skip %s" % mem.skip)
+ mem.extra = RadioSettingGroup("Extra", "extra") + + if self.MODEL == "RT22FRS" or self.MODEL == "RT622": + rs = RadioSettingValueBoolean(_mem.bcl) + rset = RadioSetting("bcl", "Busy Channel Lockout", rs) + mem.extra.append(rset) + + rs = RadioSettingValueBoolean(_mem.signal) + rset = RadioSetting("signal", "Signal", rs) + mem.extra.append(rset) + return mem
def _set_tone(self, mem, _mem): @@ -570,6 +583,9 @@ _skp &= ~bitpos LOG.debug("_skp %s" % _skp)
+ for setting in mem.extra: + setattr(_mem, setting.get_name(), setting.value) + def get_settings(self): _settings = self._memobj.settings _message = self._memobj.embedded_msg