[chirp_devel] [PATCH] [uv5r] add work mode settings

Jim Unroe
Fri Jan 18 17:25:59 PST 2013


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1358558371 18000
# Node ID c0c2d198f04c0449d53585e043cdc31070dd705a
# Parent  cca7868bd2dc089c07269a7dda7b9a511ef838e4
[uv5r] add work mode settings
update extra structure
add wmchannel structure
#443

diff -r cca7868bd2dc -r c0c2d198f04c chirp/uv5r.py
--- a/chirp/uv5r.py	Thu Jan 17 13:59:18 2013 -0800
+++ b/chirp/uv5r.py	Fri Jan 18 20:19:31 2013 -0500
@@ -86,15 +86,24 @@
 
 #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 mrcha;
+  u8 mrchb;
+} wmchannel;
+
 #seekto 0x1000;
 struct {
   u8 unknown1[8];
@@ -800,6 +809,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):



More information about the chirp_devel mailing list