[chirp_devel] [PATCH] [uv5r] add busy channel lockout settings - take 2
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1360113383 18000 # Node ID 89a63a318305099751b14dd8f45af3e782ac0f70 # Parent 41b8c8a428c3136a49ba9742b79752a6f764602d [uv5r] add busy channel lockout settings - take 2 #501
diff -r 41b8c8a428c3 -r 89a63a318305 chirp/uv5r.py --- a/chirp/uv5r.py Mon Jan 28 20:30:01 2013 -0500 +++ b/chirp/uv5r.py Tue Feb 05 20:16:23 2013 -0500 @@ -30,14 +30,18 @@ lbcd txfreq[4]; ul16 rxtone; ul16 txtone; - u8 unknown1[2]; + u8 unused1:4, + scode:4; + u8 unknown1[1]; u8 unknown2:7, lowpower:1; u8 unknown3:1, wide:1, - unknown4:3, + unknown4:2, + bcl:1, scan:1, - unknown5:2; + pttideot:1, + pttidbot:1; } memory[128];
#seekto 0x0CB2; @@ -555,6 +559,12 @@ mem.power = UV5R_POWER_LEVELS[_mem.lowpower] mem.mode = _mem.wide and "FM" or "NFM"
+ mem.extra = RadioSettingGroup("Extra", "extra") + + rs = RadioSetting("bcl", "bcl", + RadioSettingValueBoolean(_mem.bcl)) + mem.extra.append(rs) + return mem
def set_memory(self, mem): @@ -625,6 +635,9 @@ _mem.wide = mem.mode == "FM" _mem.lowpower = mem.power == UV5R_POWER_LEVELS[1]
+ for setting in mem.extra: + setattr(_mem, setting.get_shortname(), setting.value) + def _is_orig(self): version_tag = _firmware_version_from_image(self) try:
Dan, BCL fails in this morning's build because of the uppercase "BCL" in the name value. When code such at this is added to mem.extra, CHIRP does not like capital letters, white space or symbols like hyphen or underline in this value. Jim
rs = RadioSetting("bcl", "BCL", RadioSettingValueBoolean(_mem.bcl)) mem.extra.append(rs)
On Tue, Feb 5, 2013 at 8:18 PM, Jim Unroe rock.unroe@gmail.com wrote:
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1360113383 18000 # Node ID 89a63a318305099751b14dd8f45af3e782ac0f70 # Parent 41b8c8a428c3136a49ba9742b79752a6f764602d [uv5r] add busy channel lockout settings - take 2 #501
diff -r 41b8c8a428c3 -r 89a63a318305 chirp/uv5r.py --- a/chirp/uv5r.py Mon Jan 28 20:30:01 2013 -0500 +++ b/chirp/uv5r.py Tue Feb 05 20:16:23 2013 -0500 @@ -30,14 +30,18 @@ lbcd txfreq[4]; ul16 rxtone; ul16 txtone;
- u8 unknown1[2];
- u8 unused1:4,
scode:4;
- u8 unknown1[1]; u8 unknown2:7, lowpower:1; u8 unknown3:1, wide:1,
unknown4:3,
unknown4:2,
bcl:1, scan:1,
unknown5:2;
pttideot:1,
pttidbot:1;
} memory[128];
#seekto 0x0CB2; @@ -555,6 +559,12 @@ mem.power = UV5R_POWER_LEVELS[_mem.lowpower] mem.mode = _mem.wide and "FM" or "NFM"
mem.extra = RadioSettingGroup("Extra", "extra")
rs = RadioSetting("bcl", "bcl",
RadioSettingValueBoolean(_mem.bcl))
mem.extra.append(rs)
return mem
def set_memory(self, mem):
@@ -625,6 +635,9 @@ _mem.wide = mem.mode == "FM" _mem.lowpower = mem.power == UV5R_POWER_LEVELS[1]
for setting in mem.extra:
setattr(_mem, setting.get_shortname(), setting.value)
- def _is_orig(self): version_tag = _firmware_version_from_image(self) try:
BCL fails in this morning's build because of the uppercase "BCL" in the name value. When code such at this is added to mem.extra, CHIRP does not like capital letters, white space or symbols like hyphen or underline in this value.
It's not that, it's because set_memory() was using shortname instead of name for the setting. I think this started in the ft817 driver, where Marco was probably confused by my very confusing use of those words, and reversed the two. You copied it and then I went to clean all that up and forgot this last one. Here's the patch I put in last night which cleaned things up but forgot one:
http://chirp.danplanet.com/projects/chirp/repository/revisions/6f916d8e2323/...
and here's the one I just pushed to fix it:
http://chirp.danplanet.com/projects/chirp/repository/revisions/5a28bc618944/...
Sorry about that, but thanks for the heads up. We really need mem.extra tests in run_tests!
Sorry about that, but thanks for the heads up. We really need mem.extra tests in run_tests! Dan,
Dan, This is great. I have 2 or 3 more items to add to mem.extra and all of the Baofeng spreadsheet menu will be covered by CHIRP!
After that I'm thinking about adding a DTMF Settings tab (that's what Baofeng calls theirs) that has the 15 PTT IDs, DTMF tone speed, and another setting that Baofeng doesn't have.
I would want to move the DTMF Sidetone and ANI Code from the Advanced Settings tab to this future tab since they are related to DTMF. Do you have a problem with that? JIm
I would want to move the DTMF Sidetone and ANI Code from the Advanced Settings tab to this future tab since they are related to DTMF. Do you have a problem with that?
Nope, that's fine with me.
Thanks!
participants (2)
-
Dan Smith
-
Jim Unroe