[chirp_devel] [PATCH] [uv5r] add DTMF speed settings

Jim Unroe
Sat Feb 16 18:33:05 PST 2013


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1361068258 18000
# Node ID 3aeeaedfb5f721bf72c26a416b0a053f96173831
# Parent  2bc4a3de63bb651e8eebe0a64d631115da56ffa3
[uv5r] add DTMF speed settings
added to DTMF Settings tab
#587

diff -r 2bc4a3de63bb -r 3aeeaedfb5f7 chirp/uv5r.py
--- a/chirp/uv5r.py	Sat Feb 16 21:00:49 2013 -0500
+++ b/chirp/uv5r.py	Sat Feb 16 21:30:58 2013 -0500
@@ -53,6 +53,9 @@
   u8 code[5];
   u8 unused1:6,
      aniid:2;
+  u8 unknown[2];
+  u8 dtmfon;
+  u8 dtmfoff;
 } ani;
 
 #seekto 0x0E28;
@@ -223,6 +226,7 @@
 STEDELAY_LIST = ["%s ms" % x for x in range(100, 1100, 100)]
 STEDELAY_LIST.insert(0, "OFF")
 SCODE_LIST = ["%s" % x for x in range(1, 16)]
+DTMFSPEED_LIST = ["%s ms" % x for x in range(50, 2010, 10)]
 
 SETTING_LISTS = {
     "step" : STEP_LIST,
@@ -242,6 +246,7 @@
     "rpste" : RPSTE_LIST,
     "stedelay" : STEDELAY_LIST,
     "scode" : SCODE_LIST,
+    "dtmfspeed" : DTMFSPEED_LIST,
 }
 
 def _do_status(radio, block):
@@ -1019,6 +1024,16 @@
                                                 DTMFST_LIST[_settings.dtmfst]))
         dtmf.append(rs)
 
+        rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)",
+                          RadioSettingValueList(DTMFSPEED_LIST,
+                                                DTMFSPEED_LIST[self._memobj.ani.dtmfon]))
+        dtmf.append(rs)
+
+        rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)",
+                          RadioSettingValueList(DTMFSPEED_LIST,
+                                                DTMFSPEED_LIST[self._memobj.ani.dtmfoff]))
+        dtmf.append(rs)
+
         return group
 
     def get_settings(self):



More information about the chirp_devel mailing list