# HG changeset patch # User Brian Dickman brian.maybe@gmail.com # Date 1472704355 25200 # Wed Aug 31 21:32:35 2016 -0700 # Node ID 6be6cfb51c15e604d78ad5bcd5f421adac718c4f # Parent 072644da3599231a2b8fe6a0b89186a7b4beab26 [leixen] Filter out-of-bounds audio processor setting, fixes #3675
After doing a clear all reset on the VV-898, the apro setting on memory 1 is out of range (0xff), but the radio honors it as "off" anyway. This fix prevents such a memory from throwing an exception on download.
diff -r 072644da3599 -r 6be6cfb51c15 chirp/drivers/leixen.py --- a/chirp/drivers/leixen.py Wed Aug 31 19:46:58 2016 -0700 +++ b/chirp/drivers/leixen.py Wed Aug 31 21:32:35 2016 -0700 @@ -512,11 +512,13 @@ RadioSettingValueList( opts, opts[_mem.tailcut])) mem.extra.append(rs) + apro = _mem.apro if _mem.apro < 0x5 else 0 + rs = RadioSetting("apro", "Audio Processing", opts = ["Off", "Compander", "Scrambler", "TX Scrambler", "RX Scrambler"] rs = RadioSetting("apro", "Audio Processing", RadioSettingValueList( - opts, opts[_mem.apro])) + opts, opts[apro])) mem.extra.append(rs) opts = ["On", "Off"] rs = RadioSetting("voxoff", "VOX",