# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1358562138 18000 # Node ID 98755ea7c4001f17016988092210c5b0268cd928 # Parent cca7868bd2dc089c07269a7dda7b9a511ef838e4 [uv5r] add work mode settings update extra structure add wmchannel structure #443
diff -r cca7868bd2dc -r 98755ea7c400 chirp/uv5r.py --- a/chirp/uv5r.py Thu Jan 17 13:59:18 2013 -0800 +++ b/chirp/uv5r.py Fri Jan 18 21:22:18 2013 -0500 @@ -86,15 +86,26 @@
#seekto 0x0E52; struct { - u8 disp_ab:1, + u8 displayab:1, unknown1:2, fmradio:1, alarm:1, unknown2:1, reset:1, menu:1; + u8 unknown3; + u8 workmode; + u8 keylock; } extra;
+#seekto 0x0E7E; +struct { + u8 unused1:1, + mrcha:7; + u8 unused2:1, + mrchb:7; +} wmchannel; + #seekto 0x1000; struct { u8 unknown1[8]; @@ -800,6 +811,35 @@ RadioSettingValueBoolean(uhf_limit.enable)) other.append(rs)
+ workmode = RadioSettingGroup("workmode", "Work Mode Settings") + group.append(workmode) + + options = ["A", "B"] + rs = RadioSetting("extra.displayab", "Display", + RadioSettingValueList(options, + options[self._memobj.extra.displayab])) + workmode.append(rs) + + options = ["Frequency", "Channel"] + rs = RadioSetting("extra.workmode", "VFO/MR Mode", + RadioSettingValueList(options, + options[self._memobj.extra.workmode])) + workmode.append(rs) + + rs = RadioSetting("extra.keylock", "Keypad Lock", + RadioSettingValueBoolean(self._memobj.extra.keylock)) + workmode.append(rs) + + _mrcna = self._memobj.wmchannel.mrcha + rs = RadioSetting("wmchannel.mrcha", "MR A Channel", + RadioSettingValueInteger(0, 127, _mrcna)) + workmode.append(rs) + + _mrcnb = self._memobj.wmchannel.mrchb + rs = RadioSetting("wmchannel.mrchb", "MR B Channel", + RadioSettingValueInteger(0, 127, _mrcnb)) + workmode.append(rs) + return group
def set_settings(self, settings):