[chirp_devel] [PATCH 0 of 3] [vx5] Two fixes and a feature
This patch set includes: - An update to the VX5's band limits - The ability to open and save files from EVE and VX5 Commander - A fix for bug #87 (http://chirp.danplanet.com/issues/87) that casued the VX5 to lock up when recalling some memories created by Chirp, because Chirp did not set the unknown bits of the memory to safe defaults. Now unknown values are set to the same defaults as memories created on the VX5 (coincidentally, all 0x00).
Tom KD7LXL
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1332533545 21600 # Node ID 84b71b058e563a7837ac4be12e5b4857b0c779cf # Parent 178153ebf789b15402e473a115d802d1a2bf6c08 [vx5] Fix valid bands for 48 MHz minimum (previously 47 MHz).
diff -r 178153ebf789 -r 84b71b058e56 chirp/vx5.py --- a/chirp/vx5.py Fri Mar 23 11:57:19 2012 -0700 +++ b/chirp/vx5.py Fri Mar 23 14:12:25 2012 -0600 @@ -90,7 +90,7 @@ rf.valid_duplexes = DUPLEX rf.memory_bounds = (1, 220) rf.valid_bands = [( 500000, 16000000), - ( 47000000, 729000000), + ( 48000000, 729000000), (800000000, 999000000)] rf.valid_skips = ["", "S", "P"] rf.valid_power_levels = POWER_LEVELS
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1332533558 21600 # Node ID ca42bc2080e10bc4d7fe2471807f8979d141e5b2 # Parent 84b71b058e563a7837ac4be12e5b4857b0c779cf Add support for opening and saving .eve (EVE) and .vx5 (VX5 Commander) files.
diff -r 84b71b058e56 -r ca42bc2080e1 chirpui/mainapp.py --- a/chirpui/mainapp.py Fri Mar 23 14:12:25 2012 -0600 +++ b/chirpui/mainapp.py Fri Mar 23 14:12:38 2012 -0600 @@ -34,7 +34,7 @@ common.log_exception() common.show_error("\nThe Pyserial module is not installed!") from chirp import platform, xml, generic_csv, directory, util -from chirp import ic9x, kenwood_live, idrp, vx7 +from chirp import ic9x, kenwood_live, idrp, vx7, vx5 from chirp import CHIRP_VERSION, chirp_common, detect, errors from chirp import icf, ic9x_icf from chirpui import editorset, clone, miscwidgets, config, reporting @@ -316,7 +316,9 @@ types = [(_("CHIRP Radio Images") + " (*.img)", "*.img"), (_("CHIRP Files") + " (*.chirp)", "*.chirp"), (_("CSV Files") + " (*.csv)", "*.csv"), + (_("EVE Files (VX5)") + " (*.eve)", "*.eve"), (_("ICF Files") + " (*.icf)", "*.icf"), + (_("VX5 Commander Files") + " (*.vx5)", "*.vx5"), (_("VX7 Commander Files") + " (*.vx7)", "*.vx7"), ] fname = platform.get_platform().gui_open_file(types=types) @@ -454,6 +456,9 @@
if isinstance(eset.radio, vx7.VX7Radio): types += [(_("VX7 Commander") + " (*.vx7)", "vx7")] + elif isinstance(eset.radio, vx5.VX5Radio): + types += [(_("EVE") + " (*.eve)", "eve")] + types += [(_("VX5 Commander") + " (*.vx5)", "vx5")]
while True: fname = platform.get_platform().gui_save_file(types=types) @@ -716,7 +721,9 @@ types = [(_("CHIRP Files") + " (*.chirp)", "*.chirp"), (_("CHIRP Radio Images") + " (*.img)", "*.img"), (_("CSV Files") + " (*.csv)", "*.csv"), + (_("EVE Files (VX5)") + " (*.eve)", "*.eve"), (_("ICF Files") + " (*.icf)", "*.icf"), + (_("VX5 Commander Files") + " (*.vx5)", "*.vx5"), (_("VX7 Commander Files") + " (*.vx7)", "*.vx7")] filen = platform.get_platform().gui_open_file(types=types) if not filen:
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1332544384 21600 # Node ID 5140caa90d8e74ee570304e52a36a6c81153f116 # Parent ca42bc2080e10bc4d7fe2471807f8979d141e5b2 [vx5] Initialize unknown bits of new memories to safe defaults. Fixes #87.
diff -r ca42bc2080e1 -r 5140caa90d8e chirp/vx5.py --- a/chirp/vx5.py Fri Mar 23 14:12:38 2012 -0600 +++ b/chirp/vx5.py Fri Mar 23 17:13:04 2012 -0600 @@ -36,12 +36,11 @@ u8 unknown4:4, tuning_step:4; bbcd freq[3]; - u8 unknown5:6, + u8 icon:6, mode:2; char name[8]; bbcd offset[3]; - u8 unknown6:2, - tmode:2, + u8 tmode:4, power:2, duplex:2; u8 unknown7:2, @@ -123,7 +122,7 @@ mem.tuning_step = STEPS[_mem.tuning_step] mem.offset = int(_mem.offset) * 1000 mem.power = POWER_LEVELS[3 - _mem.power] - mem.tmode = TMODES[_mem.tmode] + mem.tmode = TMODES[_mem.tmode & 0x3] # masked so bad mems can be read mem.rtone = mem.ctone = chirp_common.TONES[_mem.tone] mem.dtcs = chirp_common.DTCS_CODES[_mem.dtcs]
@@ -135,6 +134,17 @@ _mem = self._memobj.memory[mem.number-1] _flg = self._memobj.flag[mem.number-1]
+ # initialize new channel to safe defaults + if not mem.empty and not _flg.used: + _mem.unknown1 = 0x00 + _mem.unknown2 = 0x00 + _mem.unknown3 = 0x00 + _mem.unknown4 = 0x00 + _mem.icon = 12 # file cabinet icon + _mem.unknown7 = 0x00 + _mem.unknown8 = 0x00 + _mem.unknown9 = 0x00 + _flg.used = not mem.empty _flg.visible = not mem.empty if mem.empty:
participants (1)
-
Tom Hayward