From 509bb9205d05bc311410b33a8c99665768c8ac55 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 8 Sep 2024 17:38:46 -0700 Subject: [PATCH 1/6] rt490: Hand-fix a complex settings list index --- chirp/drivers/radtel_rt490.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chirp/drivers/radtel_rt490.py b/chirp/drivers/radtel_rt490.py index 9059a1a1..3a51af2e 100644 --- a/chirp/drivers/radtel_rt490.py +++ b/chirp/drivers/radtel_rt490.py @@ -778,10 +778,10 @@ def _get_settings_vfo(self, vfo, chan): # WIP TODO Rx/Tx tones 'vfo_'+chan.lower()].fhss]) ret.append(RadioSetting('settings_vfo.vfo_%s.fhss' % chan.lower(), 'FHSS (Encryption)', rsvl)) - rsvl = RadioSettingValueList(['Wide', 'Narrow'], - ['Wide', 'Narrow'][ - _mem.settings_vfo[ - 'vfo_'+chan.lower()].narrow]) + chanwidth = ['Wide', 'Narrow'] + rsvl = RadioSettingValueList( + chanwidth, + int(bool(_mem.settings_vfo['vfo_'+chan.lower()].narrow))) ret.append(RadioSetting('settings_vfo.vfo_%s.narrow' % chan.lower(), 'Wide / Narrow', rsvl)) rsvl = RadioSettingValueList(self.TUNING_STEPS_LIST, From c574130e49cfd315cca2408dd94078049ae3508c Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 8 Sep 2024 17:04:21 -0700 Subject: [PATCH 2/6] First pass at mass settings index fixes This is the first pass at converting all drivers to use current_index instead of current (value) when defining RadioSettingValueList items. These are just the easy/straightforward cases where we have a list and and index into that list. Other instances with more complex invocations will be handled separately. The files that ended up with long lines as a result of this were autopep8'd with just long-line fixes applied. --- chirp/drivers/anytone.py | 27 +- chirp/drivers/anytone778uv.py | 135 +++++---- chirp/drivers/anytone_ht.py | 135 ++++----- chirp/drivers/anytone_iii.py | 99 +++---- chirp/drivers/ap510.py | 13 +- chirp/drivers/baofeng_uv17.py | 11 +- chirp/drivers/baofeng_uv17Pro.py | 76 +++-- chirp/drivers/baofeng_uv3r.py | 28 +- chirp/drivers/baofeng_wp970i.py | 113 ++++---- chirp/drivers/bf_t1.py | 17 +- chirp/drivers/bf_t8.py | 26 +- chirp/drivers/bjuv55.py | 52 ++-- chirp/drivers/btech.py | 309 ++++++++++---------- chirp/drivers/fd268.py | 30 +- chirp/drivers/ft1d.py | 10 +- chirp/drivers/ft2900.py | 221 ++++++++------- chirp/drivers/ft450d.py | 60 ++-- chirp/drivers/ft50.py | 39 +-- chirp/drivers/ft60.py | 210 ++++++++------ chirp/drivers/ft7100.py | 54 ++-- chirp/drivers/ft7800.py | 84 +++--- chirp/drivers/ft817.py | 227 ++++++++------- chirp/drivers/ft857.py | 269 +++++++++--------- chirp/drivers/ft90.py | 59 ++-- chirp/drivers/ftlx011.py | 20 +- chirp/drivers/ga510.py | 10 +- chirp/drivers/gmrsuv1.py | 87 +++--- chirp/drivers/gmrsv2.py | 80 +++--- chirp/drivers/h777.py | 12 +- chirp/drivers/hg_uv98.py | 62 ++--- chirp/drivers/hobbypcb.py | 10 +- chirp/drivers/ic2300.py | 85 +++--- chirp/drivers/ic2730.py | 90 +++--- chirp/drivers/icomciv.py | 4 +- chirp/drivers/icq7.py | 24 +- chirp/drivers/icv80.py | 52 ++-- chirp/drivers/icv86.py | 6 +- chirp/drivers/icx90.py | 56 ++-- chirp/drivers/iradio_uv_5118.py | 112 ++++---- chirp/drivers/iradio_uv_5118plus.py | 48 ++-- chirp/drivers/kenwood_live.py | 2 +- chirp/drivers/kg935g.py | 133 ++++----- chirp/drivers/kguv8d.py | 97 +++---- chirp/drivers/kguv8dplus.py | 112 ++++---- chirp/drivers/kguv8e.py | 84 +++--- chirp/drivers/kguv920pa.py | 54 ++-- chirp/drivers/kguv980p.py | 84 +++--- chirp/drivers/kguv9dplus.py | 95 ++++--- chirp/drivers/ksun_m6.py | 14 +- chirp/drivers/kyd.py | 12 +- chirp/drivers/kyd_IP620.py | 42 +-- chirp/drivers/leixen.py | 74 ++--- chirp/drivers/lt725uv.py | 73 ++--- chirp/drivers/mml_jc8810.py | 74 ++--- chirp/drivers/mursv1.py | 75 ++--- chirp/drivers/radioddity_r2.py | 10 +- chirp/drivers/radtel_rt490.py | 195 +++++++------ chirp/drivers/radtel_t18.py | 53 ++-- chirp/drivers/retevis_ra87.py | 42 +-- chirp/drivers/retevis_rb15.py | 22 +- chirp/drivers/retevis_rb17p.py | 21 +- chirp/drivers/retevis_rb28.py | 12 +- chirp/drivers/retevis_rt1.py | 28 +- chirp/drivers/retevis_rt21.py | 126 ++++----- chirp/drivers/retevis_rt22.py | 10 +- chirp/drivers/retevis_rt23.py | 65 ++--- chirp/drivers/retevis_rt26.py | 40 +-- chirp/drivers/retevis_rt76p.py | 48 ++-- chirp/drivers/retevis_rt87.py | 40 +-- chirp/drivers/retevis_rt98.py | 38 +-- chirp/drivers/tdh8.py | 28 +- chirp/drivers/tdxone_tdq8a.py | 86 +++--- chirp/drivers/tg_uv2p.py | 26 +- chirp/drivers/th9000.py | 56 ++-- chirp/drivers/th9800.py | 64 +++-- chirp/drivers/th_uv3r25.py | 2 +- chirp/drivers/th_uv8000.py | 52 ++-- chirp/drivers/th_uv88.py | 65 +++-- chirp/drivers/th_uvf8d.py | 40 +-- chirp/drivers/thuv1f.py | 28 +- chirp/drivers/tk270.py | 20 +- chirp/drivers/tk760g.py | 2 +- chirp/drivers/tk8102.py | 10 +- chirp/drivers/tk8180.py | 4 +- chirp/drivers/tmd710.py | 90 +++--- chirp/drivers/ts480.py | 16 +- chirp/drivers/ts590.py | 40 +-- chirp/drivers/uv5r.py | 86 +++--- chirp/drivers/uv5x3.py | 101 +++---- chirp/drivers/uv6r.py | 93 ++++--- chirp/drivers/uvb5.py | 32 ++- chirp/drivers/uvk5.py | 38 +-- chirp/drivers/uvk5_egzumer.py | 2 +- chirp/drivers/vgc.py | 418 +++++++++++++++------------- chirp/drivers/vx2.py | 83 +++--- chirp/drivers/vx3.py | 201 ++++++++----- chirp/drivers/vx8.py | 16 +- chirp/drivers/wouxun.py | 166 +++++------ 98 files changed, 3547 insertions(+), 3155 deletions(-) diff --git a/chirp/drivers/anytone.py b/chirp/drivers/anytone.py index f3ce1baf..ed2b5a78 100644 --- a/chirp/drivers/anytone.py +++ b/chirp/drivers/anytone.py @@ -526,16 +526,17 @@ def get_memory(self, number): mem.extra.append(rs) rs = RadioSetting("pttid", "PTT ID", - RadioSettingValueList(PTT_IDS, PTT_IDS[_mem.pttid])) + RadioSettingValueList( + PTT_IDS, current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("bclo", "Busy Channel Lockout", - RadioSettingValueList(BCLO, BCLO[_mem.bclo])) + RadioSettingValueList(BCLO, current_index=_mem.bclo)) mem.extra.append(rs) rs = RadioSetting("optsig", "Optional Signaling", RadioSettingValueList(OPT_SIGS, - OPT_SIGS[_mem.optsig])) + current_index=_mem.optsig)) mem.extra.append(rs) rs = RadioSetting("OPTSIGSQL", "Squelch w/Opt Signaling", @@ -545,19 +546,20 @@ def get_memory(self, number): else "Off")) mem.extra.append(rs) - rs = RadioSetting("dtmfSlotNum", "DTMF", - RadioSettingValueList(DTMF_SLOTS, - DTMF_SLOTS[_mem.dtmfSlotNum])) + rs = RadioSetting( + "dtmfSlotNum", "DTMF", + RadioSettingValueList( + DTMF_SLOTS, current_index=_mem.dtmfSlotNum)) mem.extra.append(rs) rs = RadioSetting("twotone", "2-Tone", RadioSettingValueList(TONE2_SLOTS, - TONE2_SLOTS[_mem.twotone])) + current_index=_mem.twotone)) mem.extra.append(rs) rs = RadioSetting("fivetone", "5-Tone", RadioSettingValueList(TONE5_SLOTS, - TONE5_SLOTS[_mem.fivetone])) + current_index=_mem.fivetone)) mem.extra.append(rs) # Chose not to expose scramble rs = RadioSetting("scramble", @@ -666,15 +668,14 @@ def get_settings(self): settings = RadioSettings(basic) display = ["Frequency", "Channel", "Name"] - rs = RadioSetting("display", "Display", - RadioSettingValueList(display, - display[_settings.display])) + rs = RadioSetting("display", "Display", RadioSettingValueList( + display, current_index=_settings.display)) basic.append(rs) apo = ["Off"] + ['%.1f hour(s)' % (0.5 * x) for x in range(1, 25)] rs = RadioSetting("apo", "Automatic Power Off", RadioSettingValueList(apo, - apo[_settings.apo])) + current_index=_settings.apo)) basic.append(rs) def filter(s): @@ -697,7 +698,7 @@ def filter(s): MUTE_CHOICES = ["Off", "TX", "RX", "TX/RX"] rs = RadioSetting("mute", "Sub Band Mute", RadioSettingValueList(MUTE_CHOICES, - MUTE_CHOICES[_settings.mute])) + current_index=_settings.mute)) basic.append(rs) return settings diff --git a/chirp/drivers/anytone778uv.py b/chirp/drivers/anytone778uv.py index 93fbef02..c09af077 100644 --- a/chirp/drivers/anytone778uv.py +++ b/chirp/drivers/anytone778uv.py @@ -1118,31 +1118,36 @@ def get_settings(self): # Menu 3 - Display Mode options = ["Frequency", "Channel", "Name"] - rs = RadioSettingValueList(options, options[_settings.displayMode]) + rs = RadioSettingValueList( + options, current_index=_settings.displayMode) rset = RadioSetting("settings.displayMode", "Display Mode", rs) function.append(rset) # VFO/MR A options = ["MR", "VFO"] - rs = RadioSettingValueList(options, options[_radio_settings.vfomrA]) + rs = RadioSettingValueList( + options, current_index=_radio_settings.vfomrA) rset = RadioSetting("radio_settings.vfomrA", "VFO/MR mode A", rs) function.append(rset) # MR Channel A options = ["%s" % x for x in range(1, 201)] - rs = RadioSettingValueList(options, options[_radio_settings.mrChanA]) + rs = RadioSettingValueList( + options, current_index=_radio_settings.mrChanA) rset = RadioSetting("radio_settings.mrChanA", "MR channel A", rs) function.append(rset) # VFO/MR B options = ["MR", "VFO"] - rs = RadioSettingValueList(options, options[_radio_settings.vfomrB]) + rs = RadioSettingValueList( + options, current_index=_radio_settings.vfomrB) rset = RadioSetting("radio_settings.vfomrB", "VFO/MR mode B", rs) function.append(rset) # MR Channel B options = ["%s" % x for x in range(1, 201)] - rs = RadioSettingValueList(options, options[_radio_settings.mrChanB]) + rs = RadioSettingValueList( + options, current_index=_radio_settings.mrChanB) rset = RadioSetting("radio_settings.mrChanB", "MR channel B", rs) function.append(rset) @@ -1160,19 +1165,21 @@ def get_settings(self): # Menu 11 - Backlight Brightness options = ["%s" % x for x in range(1, 4)] - rs = RadioSettingValueList(options, options[_settings.backlightBr - 1]) + rs = RadioSettingValueList( + options, current_index=_settings.backlightBr - 1) rset = RadioSetting("settings.backlightBr", "Backlight brightness", rs) function.append(rset) # Menu 15 - Screen Direction options = ["Positive", "Inverted"] - rs = RadioSettingValueList(options, options[_settings.screenDir]) + rs = RadioSettingValueList(options, current_index=_settings.screenDir) rset = RadioSetting("settings.screenDir", "Screen direction", rs) function.append(rset) # Hand Mic Key Brightness options = ["%s" % x for x in range(1, 32)] - rs = RadioSettingValueList(options, options[_settings.micKeyBrite - 1]) + rs = RadioSettingValueList( + options, current_index=_settings.micKeyBrite - 1) rset = RadioSetting("settings.micKeyBrite", "Hand mic key brightness", rs) function.append(rset) @@ -1180,34 +1187,37 @@ def get_settings(self): # VOL SET # Menu 1 - Beep Volume options = ["OFF"] + ["%s" % x for x in range(1, 6)] - rs = RadioSettingValueList(options, options[_settings.beepVolume]) + rs = RadioSettingValueList(options, current_index=_settings.beepVolume) rset = RadioSetting("settings.beepVolume", "Beep volume", rs) function.append(rset) # Menu 5 - Volume level Setup options = ["%s" % x for x in range(1, 37)] - rs = RadioSettingValueList(options, options[_settings.speakerVol - 1]) + rs = RadioSettingValueList( + options, current_index=_settings.speakerVol - 1) rset = RadioSetting("settings.speakerVol", "Speaker volume", rs) function.append(rset) # Menu 16 - Speaker Switch options = ["Host on | Hand mic off", "Host on | Hand mic on", "Host off | Hand mic on"] - rs = RadioSettingValueList(options, options[_settings.speakerSwitch]) + rs = RadioSettingValueList( + options, current_index=_settings.speakerSwitch) rset = RadioSetting("settings.speakerSwitch", "Speaker switch", rs) function.append(rset) # STE SET # STE Frequency options = ["Off", "55.2 Hz", "259.2 Hz"] - rs = RadioSettingValueList(options, options[_settings.steFrequency]) + rs = RadioSettingValueList( + options, current_index=_settings.steFrequency) rset = RadioSetting("settings.steFrequency", "STE frequency", rs) function.append(rset) # STE Type options = ["Off", "Silent", "120 degrees", "180 degrees", "240 degrees"] - rs = RadioSettingValueList(options, options[_settings.steType]) + rs = RadioSettingValueList(options, current_index=_settings.steType) rset = RadioSetting("settings.steType", "STE type", rs) function.append(rset) @@ -1257,7 +1267,8 @@ def _pswd_vfy(setting, obj, atrb): # Menu 13 - Auto Power Off options = ["Off", "30 minutes", "60 minutes", "120 minutes"] - rs = RadioSettingValueList(options, options[_settings.autoPowerOff]) + rs = RadioSettingValueList( + options, current_index=_settings.autoPowerOff) rset = RadioSetting("settings.autoPowerOff", "Auto power off", rs) function.append(rset) @@ -1269,32 +1280,35 @@ def _pswd_vfy(setting, obj, atrb): # FUNCTION SET # Menu 4 - Squelch Level A options = ["OFF"] + ["%s" % x for x in range(1, 10)] - rs = RadioSettingValueList(options, options[_settings.squelchLevelA]) + rs = RadioSettingValueList( + options, current_index=_settings.squelchLevelA) rset = RadioSetting("settings.squelchLevelA", "Squelch level A", rs) function.append(rset) # Squelch Level B options = ["OFF"] + ["%s" % x for x in range(1, 10)] - rs = RadioSettingValueList(options, options[_settings.squelchLevelB]) + rs = RadioSettingValueList( + options, current_index=_settings.squelchLevelB) rset = RadioSetting("settings.squelchLevelB", "Squelch level B", rs) function.append(rset) # Menu 7 - Scan Type options = ["Time operated (TO)", "Carrier operated (CO)", "Search (SE)"] - rs = RadioSettingValueList(options, options[_settings.scanType]) + rs = RadioSettingValueList(options, current_index=_settings.scanType) rset = RadioSetting("settings.scanType", "Scan mode", rs) function.append(rset) # Menu 8 - Scan Recovery Time options = ["%s seconds" % x for x in range(5, 20, 5)] - rs = RadioSettingValueList(options, options[_settings.scanRecoveryT]) + rs = RadioSettingValueList( + options, current_index=_settings.scanRecoveryT) rset = RadioSetting("settings.scanRecoveryT", "Scan recovery time", rs) function.append(rset) # Main options = ["A", "B"] - rs = RadioSettingValueList(options, options[_settings.main]) + rs = RadioSettingValueList(options, current_index=_settings.main) rset = RadioSetting("settings.main", "Main", rs) function.append(rset) @@ -1305,13 +1319,15 @@ def _pswd_vfy(setting, obj, atrb): # Menu 12 - Time Out Timer options = ["OFF"] + ["%s minutes" % x for x in range(1, 31)] - rs = RadioSettingValueList(options, options[_settings.timeOutTimer]) + rs = RadioSettingValueList( + options, current_index=_settings.timeOutTimer) rset = RadioSetting("settings.timeOutTimer", "Time out timer", rs) function.append(rset) # TBST Frequency options = ["1000 Hz", "1450 Hz", "1750 Hz", "2100 Hz"] - rs = RadioSettingValueList(options, options[_settings.tbstFrequency]) + rs = RadioSettingValueList( + options, current_index=_settings.tbstFrequency) rset = RadioSetting("settings.tbstFrequency", "TBST frequency", rs) function.append(rset) @@ -1323,20 +1339,22 @@ def _pswd_vfy(setting, obj, atrb): # MON Key Function options = ["Squelch off momentary", "Squelch off"] - rs = RadioSettingValueList(options, options[_settings.monKeyFunction]) + rs = RadioSettingValueList( + options, current_index=_settings.monKeyFunction) rset = RadioSetting("settings.monKeyFunction", "MON key function", rs) function.append(rset) # Frequency Step options = ["2.5 kHz", "5 kHz", "6.25 kHz", "10 kHz", "12.5 kHz", "20 kHz", "25 kHz", "30 kHz", "50 kHz"] - rs = RadioSettingValueList(options, options[_settings.frequencyStep]) + rs = RadioSettingValueList( + options, current_index=_settings.frequencyStep) rset = RadioSetting("settings.frequencyStep", "Frequency step", rs) function.append(rset) # Knob Mode options = ["Volume", "Channel"] - rs = RadioSettingValueList(options, options[_settings.knobMode]) + rs = RadioSettingValueList(options, current_index=_settings.knobMode) rset = RadioSetting("settings.knobMode", "Knob mode", rs) function.append(rset) @@ -1355,13 +1373,15 @@ def _pswd_vfy(setting, obj, atrb): # VOX Delay options = ["0.5 S", "1.0 S", "1.5 S", "2.0 S", "2.5 S", "3.0 S", "3.5 S", "4.0 S", "4.5 S"] - rs = RadioSettingValueList(options, options[_settings.voxDelay]) + rs = RadioSettingValueList( + options, current_index=_settings.voxDelay) rset = RadioSetting("settings.voxDelay", "VOX delay", rs) function.append(rset) # VOX Level options = ["%s" % x for x in range(1, 10)] - rs = RadioSettingValueList(options, options[_settings.voxLevel]) + rs = RadioSettingValueList( + options, current_index=_settings.voxLevel) rset = RadioSetting("settings.voxLevel", "VOX Level", rs) function.append(rset) @@ -1378,74 +1398,86 @@ def _pswd_vfy(setting, obj, atrb): # Key Mode 1 # P1 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P1 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P1 - 1) rset = RadioSetting("pfkeys.keyMode1P1", "Key mode 1 P1", rs) pfkeys.append(rset) # P2 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P2 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P2 - 1) rset = RadioSetting("pfkeys.keyMode1P2", "Key mode 1 P2", rs) pfkeys.append(rset) # P3 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P3 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P3 - 1) rset = RadioSetting("pfkeys.keyMode1P3", "Key mode 1 P3", rs) pfkeys.append(rset) # P4 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P4 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P4 - 1) rset = RadioSetting("pfkeys.keyMode1P4", "Key mode 1 P4", rs) pfkeys.append(rset) # P5 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P5 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P5 - 1) rset = RadioSetting("pfkeys.keyMode1P5", "Key mode 1 P5", rs) pfkeys.append(rset) # P6 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode1P6 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode1P6 - 1) rset = RadioSetting("pfkeys.keyMode1P6", "Key mode 1 P6", rs) pfkeys.append(rset) # Key Mode 2 # P1 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P1 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P1 - 1) rset = RadioSetting("pfkeys.keyMode2P1", "Key mode 2 P1", rs) pfkeys.append(rset) # P2 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P2 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P2 - 1) rset = RadioSetting("pfkeys.keyMode2P2", "Key mode 2 P2", rs) pfkeys.append(rset) # P3 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P3 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P3 - 1) rset = RadioSetting("pfkeys.keyMode2P3", "Key mode 2 P3", rs) pfkeys.append(rset) # P4 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P4 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P4 - 1) rset = RadioSetting("pfkeys.keyMode2P4", "Key mode 2 P4", rs) pfkeys.append(rset) # P5 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P5 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P5 - 1) rset = RadioSetting("pfkeys.keyMode2P5", "Key mode 2 P5", rs) pfkeys.append(rset) # P6 - rs = RadioSettingValueList(options, options[_pfkeys.keyMode2P6 - 1]) + rs = RadioSettingValueList( + options, current_index=_pfkeys.keyMode2P6 - 1) rset = RadioSetting("pfkeys.keyMode2P6", "Key mode 2 P6", rs) pfkeys.append(rset) @@ -1457,25 +1489,25 @@ def _pswd_vfy(setting, obj, atrb): options.insert(15, "VOX") # PA - rs = RadioSettingValueList(options, options[_settings.keyPA - 2]) + rs = RadioSettingValueList(options, current_index=_settings.keyPA - 2) rset = RadioSetting("settings.keyPA", "Key PA", rs) pfkeys.append(rset) # PB - rs = RadioSettingValueList(options, options[_settings.keyPB - 2]) + rs = RadioSettingValueList(options, current_index=_settings.keyPB - 2) rset = RadioSetting("settings.keyPB", "Key PB", rs) pfkeys.append(rset) # PC - rs = RadioSettingValueList(options, options[_settings.keyPC - 2]) + rs = RadioSettingValueList(options, current_index=_settings.keyPC - 2) rset = RadioSetting("settings.keyPC", "Key PC", rs) pfkeys.append(rset) # PD - rs = RadioSettingValueList(options, options[_settings.keyPD - 2]) + rs = RadioSettingValueList(options, current_index=_settings.keyPD - 2) rset = RadioSetting("settings.keyPD", "Key PD", rs) pfkeys.append(rset) @@ -1487,7 +1519,7 @@ def _pswd_vfy(setting, obj, atrb): # DTMF Transmitting Time options = ["50 milliseconds", "100 milliseconds", "200 milliseconds", "300 milliseconds", "500 milliseconds"] - rs = RadioSettingValueList(options, options[_settings.dtmfTxTime]) + rs = RadioSettingValueList(options, current_index=_settings.dtmfTxTime) rset = RadioSetting("settings.dtmfTxTime", "DTMF transmitting time", rs) dtmf.append(rset) @@ -1511,7 +1543,7 @@ def apply_ic_listvalue(setting, obj): idx = IC_VALUES.index(0x0E) rs = RadioSetting("dtmf.intervalChar", "DTMF interval character", RadioSettingValueList(IC_CHOICES, - IC_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_ic_listvalue, _dtmf.intervalChar) dtmf.append(rs) @@ -1532,37 +1564,38 @@ def apply_gc_listvalue(setting, obj): idx = GC_VALUES.index(0x0A) rs = RadioSetting("dtmf.groupCode", "DTMF interval character", RadioSettingValueList(GC_CHOICES, - GC_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_gc_listvalue, _dtmf.groupCode) dtmf.append(rs) # Decoding Response options = ["None", "Beep tone", "Beep tone & respond"] - rs = RadioSettingValueList(options, options[_dtmf.decodingResponse]) + rs = RadioSettingValueList( + options, current_index=_dtmf.decodingResponse) rset = RadioSetting("dtmf.decodingResponse", "Decoding response", rs) dtmf.append(rset) # First Digit Time options = ["%s" % x for x in range(0, 2510, 10)] - rs = RadioSettingValueList(options, options[_dtmf.firstDigitTime]) + rs = RadioSettingValueList(options, current_index=_dtmf.firstDigitTime) rset = RadioSetting("dtmf.firstDigitTime", "First Digit Time(ms)", rs) dtmf.append(rset) # First Digit Time options = ["%s" % x for x in range(10, 2510, 10)] - rs = RadioSettingValueList(options, options[_dtmf.pretime - 1]) + rs = RadioSettingValueList(options, current_index=_dtmf.pretime - 1) rset = RadioSetting("dtmf.pretime", "Pretime(ms)", rs) dtmf.append(rset) # Auto Reset Time options = ["%s" % x for x in range(0, 25100, 100)] - rs = RadioSettingValueList(options, options[_dtmf.autoResetTime]) + rs = RadioSettingValueList(options, current_index=_dtmf.autoResetTime) rset = RadioSetting("dtmf.autoResetTime", "Auto Reset time(ms)", rs) dtmf.append(rset) # Time-Lapse After Encode options = ["%s" % x for x in range(10, 2510, 10)] - rs = RadioSettingValueList(options, options[_dtmf.timeLapse - 1]) + rs = RadioSettingValueList(options, current_index=_dtmf.timeLapse - 1) rset = RadioSetting("dtmf.timeLapse", "Time-lapse after encode(ms)", rs) dtmf.append(rset) @@ -1570,7 +1603,7 @@ def apply_gc_listvalue(setting, obj): # PTT ID Pause Time options = ["Off", "-", "-", "-", "-"] + [ "%s" % x for x in range(5, 76)] - rs = RadioSettingValueList(options, options[_dtmf.pauseTime]) + rs = RadioSettingValueList(options, current_index=_dtmf.pauseTime) rset = RadioSetting("dtmf.pauseTime", "PTT ID pause time(s)", rs) dtmf.append(rset) diff --git a/chirp/drivers/anytone_ht.py b/chirp/drivers/anytone_ht.py index 4e886d59..17755537 100644 --- a/chirp/drivers/anytone_ht.py +++ b/chirp/drivers/anytone_ht.py @@ -531,12 +531,12 @@ def get_memory(self, number): rs = RadioSetting("bcl", "Busy Channel Lockout", RadioSettingValueList(BCLO, - BCLO[_mem.bcl])) + current_index=_mem.bcl)) mem.extra.append(rs) rs = RadioSetting("squelch", "Squelch", RadioSettingValueList(SQUELCH, - SQUELCH[_mem.squelch])) + current_index=_mem.squelch)) mem.extra.append(rs) return mem @@ -652,43 +652,43 @@ def _filter(name): 0, 6, _filter(_msg.line2))) cfg_grp.append(rs) - rs = RadioSetting("display", "Display Mode", - RadioSettingValueList(DISPLAY, - DISPLAY[_settings.display])) + rs = RadioSetting("display", "Display Mode", RadioSettingValueList( + DISPLAY, current_index=_settings.display)) cfg_grp.append(rs) rs = RadioSetting("upvfomr", "Up VFO/MR", - RadioSettingValueList(VFOMR, - VFOMR[_settings.upvfomr])) + RadioSettingValueList( + VFOMR, current_index=_settings.upvfomr)) cfg_grp.append(rs) rs = RadioSetting("dnvfomr", "Down VFO/MR", - RadioSettingValueList(VFOMR, - VFOMR[_settings.dnvfomr])) + RadioSettingValueList( + VFOMR, current_index=_settings.dnvfomr)) cfg_grp.append(rs) - rs = RadioSetting("upwork", "Up Work Mode", - RadioSettingValueList(WORKMODE, - WORKMODE[_settings.upwork])) + rs = RadioSetting( + "upwork", "Up Work Mode", + RadioSettingValueList( + WORKMODE, current_index=_settings.upwork)) cfg_grp.append(rs) - rs = RadioSetting("upmrbank", "Up MR Bank", - RadioSettingValueList(MRBANK, - MRBANK[_settings.upmrbank])) + rs = RadioSetting("upmrbank", "Up MR Bank", RadioSettingValueList( + MRBANK, current_index=_settings.upmrbank)) cfg_grp.append(rs) rs = RadioSetting("upmrch", "Up MR Channel", RadioSettingValueInteger(0, 200, _settings.upmrch)) cfg_grp.append(rs) - rs = RadioSetting("dnwork", "Down Work Mode", - RadioSettingValueList(WORKMODE, - WORKMODE[_settings.dnwork])) + rs = RadioSetting( + "dnwork", "Down Work Mode", + RadioSettingValueList( + WORKMODE, current_index=_settings.dnwork)) cfg_grp.append(rs) rs = RadioSetting("dnmrbank", "Down MR Bank", - RadioSettingValueList(MRBANK, - MRBANK[_settings.dnmrbank])) + RadioSettingValueList( + MRBANK, current_index=_settings.dnmrbank)) cfg_grp.append(rs) rs = RadioSetting("dnmrch", "Down MR Channel", @@ -697,100 +697,106 @@ def _filter(name): rs = RadioSetting("main", "Main", RadioSettingValueList(MAIN, - MAIN[_settings.main])) + current_index=_settings.main)) cfg_grp.append(rs) rs = RadioSetting("pause", "Scan Pause Time", RadioSettingValueList(PAUSE, - PAUSE[_settings.pause])) + current_index=_settings.pause)) cfg_grp.append(rs) rs = RadioSetting("stop", "Function Keys Stop Time", RadioSettingValueList(STOP, - STOP[_settings.stop])) + current_index=_settings.stop)) cfg_grp.append(rs) - rs = RadioSetting("backlight", "Backlight", - RadioSettingValueList(BACKLIGHT, - BACKLIGHT[ - _settings.backlight])) + rs = RadioSetting( + "backlight", "Backlight", + RadioSettingValueList( + BACKLIGHT, current_index=_settings.backlight)) cfg_grp.append(rs) rs = RadioSetting("color", "Backlight Color", RadioSettingValueList(COLOR, - COLOR[_settings.color])) + current_index=_settings.color)) cfg_grp.append(rs) - rs = RadioSetting("vdisplay", "Vice-Machine Display", - RadioSettingValueList(VDISPLAY, - VDISPLAY[_settings.vdisplay])) + rs = RadioSetting( + "vdisplay", "Vice-Machine Display", + RadioSettingValueList( + VDISPLAY, current_index=_settings.vdisplay)) cfg_grp.append(rs) - rs = RadioSetting("voxlevel", "Vox Level", - RadioSettingValueList(VOXLEVEL, - VOXLEVEL[_settings.voxlevel])) + rs = RadioSetting( + "voxlevel", "Vox Level", + RadioSettingValueList( + VOXLEVEL, current_index=_settings.voxlevel)) cfg_grp.append(rs) - rs = RadioSetting("voxdelay", "Vox Delay", - RadioSettingValueList(VOXDELAY, - VOXDELAY[_settings.voxdelay])) + rs = RadioSetting( + "voxdelay", "Vox Delay", + RadioSettingValueList( + VOXDELAY, current_index=_settings.voxdelay)) cfg_grp.append(rs) rs = RadioSetting("tot", "Time Out Timer", RadioSettingValueList(TOT, - TOT[_settings.tot])) + current_index=_settings.tot)) cfg_grp.append(rs) rs = RadioSetting("tbst", "Tone Burst", RadioSettingValueList(TBST, - TBST[_settings.tbst])) + current_index=_settings.tbst)) cfg_grp.append(rs) rs = RadioSetting("monikey", "MONI Key Function", - RadioSettingValueList(MONI, - MONI[_settings.monikey])) + RadioSettingValueList( + MONI, current_index=_settings.monikey)) cfg_grp.append(rs) if self.MODEL == "TERMN-8R": - rs = RadioSetting("pf1key", "PF1 Key Function", - RadioSettingValueList(PFKEYT, - PFKEYT[_settings.pf1key])) + rs = RadioSetting( + "pf1key", "PF1 Key Function", + RadioSettingValueList( + PFKEYT, current_index=_settings.pf1key)) cfg_grp.append(rs) - rs = RadioSetting("pf2key", "PF2 Key Function", - RadioSettingValueList(PFKEYT, - PFKEYT[_settings.pf2key])) + rs = RadioSetting( + "pf2key", "PF2 Key Function", + RadioSettingValueList( + PFKEYT, current_index=_settings.pf2key)) cfg_grp.append(rs) if self.MODEL == "OBLTR-8R": - rs = RadioSetting("pf1key", "PF1 Key Function", - RadioSettingValueList(PFKEYO, - PFKEYO[_settings.pf1key])) + rs = RadioSetting( + "pf1key", "PF1 Key Function", + RadioSettingValueList( + PFKEYO, current_index=_settings.pf1key)) cfg_grp.append(rs) rs = RadioSetting("fmam", "PF2 Key Function", - RadioSettingValueList(PFKEYO, - PFKEYO[_settings.fmam])) + RadioSettingValueList( + PFKEYO, current_index=_settings.fmam)) cfg_grp.append(rs) rs = RadioSetting("apo", "Automatic Power Off", RadioSettingValueList(APO, - APO[_settings.apo])) + current_index=_settings.apo)) cfg_grp.append(rs) rs = RadioSetting("save", "Power Save", RadioSettingValueList(SAVE, - SAVE[_settings.save])) + current_index=_settings.save)) cfg_grp.append(rs) rs = RadioSetting("tail", "Tail Eliminator Type", RadioSettingValueList(TAIL, - TAIL[_settings.tail])) + current_index=_settings.tail)) cfg_grp.append(rs) rs = RadioSetting("fmvfomr", "FM VFO/MR", - RadioSettingValueList(VFOMR, - VFOMR[_settings.fmvfomr])) + RadioSettingValueList( + VFOMR, current_index=_settings.fmvfomr)) cfg_grp.append(rs) rs = RadioSetting("fmmrch", "FM MR Channel", @@ -799,27 +805,26 @@ def _filter(name): rs = RadioSetting("noaa", "NOAA", RadioSettingValueList(NOAA, - NOAA[_settings.noaa])) + current_index=_settings.noaa)) cfg_grp.append(rs) rs = RadioSetting("noaach", "NOAA Channel", - RadioSettingValueList(NOAACH, - NOAACH[_settings.noaach])) + RadioSettingValueList( + NOAACH, current_index=_settings.noaach)) cfg_grp.append(rs) - rs = RadioSetting("part95", "PART95", - RadioSettingValueList(PART95, - PART95[_settings.part95])) + rs = RadioSetting("part95", "PART95", RadioSettingValueList( + PART95, current_index=_settings.part95)) cfg_grp.append(rs) rs = RadioSetting("gmrs", "GMRS", RadioSettingValueList(GMRS, - GMRS[_settings.gmrs])) + current_index=_settings.gmrs)) cfg_grp.append(rs) rs = RadioSetting("murs", "MURS", RadioSettingValueList(MURS, - MURS[_settings.murs])) + current_index=_settings.murs)) cfg_grp.append(rs) for i in range(0, 9): diff --git a/chirp/drivers/anytone_iii.py b/chirp/drivers/anytone_iii.py index 1f9b56d4..4f33d26c 100644 --- a/chirp/drivers/anytone_iii.py +++ b/chirp/drivers/anytone_iii.py @@ -1008,17 +1008,17 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTT_IDS, - PTT_IDS[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("bclo", "Busy Channel Lockout", RadioSettingValueList(BCLO, - BCLO[_mem.bclo])) + current_index=_mem.bclo)) mem.extra.append(rs) rs = RadioSetting("optsig", "Optional Signaling", RadioSettingValueList(OPT_SIGS, - OPT_SIGS[_mem.optsig])) + current_index=_mem.optsig)) mem.extra.append(rs) rs = RadioSetting("OPTSIGSQL", "Squelch w/Opt Signaling", @@ -1029,24 +1029,25 @@ def get_memory(self, number): else "Off")) mem.extra.append(rs) - rs = RadioSetting("dtmf_enc_num", "DTMF", - RadioSettingValueList(DTMF_SLOTS, - DTMF_SLOTS[_mem.dtmf_enc_num])) + rs = RadioSetting( + "dtmf_enc_num", "DTMF", + RadioSettingValueList( + DTMF_SLOTS, current_index=_mem.dtmf_enc_num)) mem.extra.append(rs) rs = RadioSetting("twotone", "2-Tone", RadioSettingValueList(TONE2_SLOTS, - TONE2_SLOTS[_mem.twotone])) + current_index=_mem.twotone)) mem.extra.append(rs) rs = RadioSetting("fivetone", "5-Tone", RadioSettingValueList(TONE5_SLOTS, - TONE5_SLOTS[_mem.fivetone])) + current_index=_mem.fivetone)) mem.extra.append(rs) rs = RadioSetting("scramble", "Scrambler Switch", RadioSettingValueList(SCRAMBLE_CODES, - SCRAMBLE_CODES[_mem.scramble])) + current_index=_mem.scramble)) mem.extra.append(rs) # Memory properties dialog is only capable of Boolean and List @@ -1213,9 +1214,9 @@ def get_settings(self): chirp_common.CHARSET_ASCII)))) basic.append( RadioSetting( - "display", - "Display", - RadioSettingValueList(DISPLAY, DISPLAY[_settings.display]))) + "display", "Display", + RadioSettingValueList( + DISPLAY, current_index=_settings.display))) basic.append( RadioSetting( "disp_chan_lock", @@ -1227,24 +1228,24 @@ def get_settings(self): "Scan Pause Time", RadioSettingValueList( SCAN_PAUSES, - SCAN_PAUSES[_settings.scan_tot]))) + current_index=_settings.scan_tot))) basic.append( RadioSetting( "scan_mode", "Scan Mode", RadioSettingValueList( SCAN_MODES, - SCAN_MODES[_settings.scan_mode]))) + current_index=_settings.scan_mode))) basic.append( RadioSetting( "ptt_tot", "Talk Timeout", - RadioSettingValueList(TOT, TOT[_settings.ptt_tot]))) + RadioSettingValueList(TOT, current_index=_settings.ptt_tot))) basic.append( RadioSetting( "apo", "Auto Power Off", - RadioSettingValueList(APO, APO[_settings.apo]))) + RadioSettingValueList(APO, current_index=_settings.apo))) basic.append( RadioSetting( "beep_on", @@ -1252,9 +1253,9 @@ def get_settings(self): RadioSettingValueBoolean(_settings.beep_on))) basic.append( RadioSetting( - "beep_hi", - "Beep Volume", - RadioSettingValueList(BEEP_VOL, BEEP_VOL[_settings.beep_hi]))) + "beep_hi", "Beep Volume", + RadioSettingValueList( + BEEP_VOL, current_index=_settings.beep_hi))) basic.append( RadioSetting( "ext_spk_on", @@ -1266,14 +1267,14 @@ def get_settings(self): "Deputy Chan Mute", RadioSettingValueList( DEPUTY_CHAN_MUTES, - DEPUTY_CHAN_MUTES[_settings.deputy_mute]))) + current_index=_settings.deputy_mute))) basic.append( RadioSetting( "tail_elim_type", "Tail Eliminator", RadioSettingValueList( TAIL_ELIM_TYPES, - TAIL_ELIM_TYPES[_settings.tail_elim_type]))) + current_index=_settings.tail_elim_type))) basic.append( RadioSetting( "no_tone_elim_tail", @@ -1298,14 +1299,14 @@ def get_settings(self): "Left RF Squelch", RadioSettingValueList( RF_SQUELCHES, - RF_SQUELCHES[_settings.rfsql_left]))) + current_index=_settings.rfsql_left))) sqls.append( RadioSetting( "rfsql_right", "Right RF Squelch", RadioSettingValueList( RF_SQUELCHES, - RF_SQUELCHES[_settings.rfsql_right]))) + current_index=_settings.rfsql_right))) allGroups.append(sqls) keys = RadioSettingGroup("keys", "Keys / Buttons") @@ -1315,35 +1316,35 @@ def get_settings(self): "SQL Key Mode", RadioSettingValueList( SQL_BTN_MODES, - SQL_BTN_MODES[_settings.sql_key_mode]))) + current_index=_settings.sql_key_mode))) keys.append( RadioSetting( "key_a_func", "PA Key Function", RadioSettingValueList( KEY_FUNCS, - KEY_FUNCS[_settings.key_a_func]))) + current_index=_settings.key_a_func))) keys.append( RadioSetting( "key_b_func", "PB Key Function", RadioSettingValueList( KEY_FUNCS, - KEY_FUNCS[_settings.key_b_func]))) + current_index=_settings.key_b_func))) keys.append( RadioSetting( "key_c_func", "PC Key Function", RadioSettingValueList( KEY_FUNCS, - KEY_FUNCS[_settings.key_c_func]))) + current_index=_settings.key_c_func))) keys.append( RadioSetting( "key_d_func", "PD Key Function", RadioSettingValueList( KEY_FUNCS, - KEY_FUNCS[_settings.key_d_func]))) + current_index=_settings.key_d_func))) keys.append( RadioSetting( "key_bright", @@ -1360,7 +1361,7 @@ def get_settings(self): "PTT Key Lock", RadioSettingValueList( PTT_KEY_LOCKS, - PTT_KEY_LOCKS[_settings.ptt_lockout]))) + current_index=_settings.ptt_lockout))) keys.append( RadioSetting( "keypad_lock", @@ -1426,14 +1427,14 @@ def get_settings(self): "TBST Freq", RadioSettingValueList( TBST_FREQS, - TBST_FREQS[_settings.tbst_freq]))) + current_index=_settings.tbst_freq))) advanced.append( RadioSetting( "long_key_time", "Long Key Time", RadioSettingValueList( LONG_KEY_TIMES, - LONG_KEY_TIMES[int((_settings.long_key_time-100) / 50)]))) + current_index=int((_settings.long_key_time-100) / 50)))) advanced.append( RadioSetting( "clk_shift", @@ -1464,21 +1465,21 @@ def get_settings(self): "Main Band", RadioSettingValueList( HYPER_MAINS, - HYPER_MAINS[_hyperSettings.main]))) + current_index=_hyperSettings.main))) hyperGroup.append( RadioSetting( "sub_display", "Sub Display", RadioSettingValueList( HYPER_SUB_DISPLAYS, - HYPER_SUB_DISPLAYS[_hyperSettings.sub_display]))) + current_index=_hyperSettings.sub_display))) hyperGroup.append( RadioSetting( "spkr_mode", "Speakers", RadioSettingValueList( HYPER_SPKR_MODES, - HYPER_SPKR_MODES[_hyperSettings.spkr_mode]))) + current_index=_hyperSettings.spkr_mode))) hyperGroup.append( RadioSetting( "vfo_band_edge", @@ -1510,14 +1511,14 @@ def get_settings(self): "Left Mode", RadioSettingValueList( HYPER_MODES, - HYPER_MODES[_hyperSettings.left_mode]))) + current_index=_hyperSettings.left_mode))) hyperGroup.append( RadioSetting( "right_mode", "Right Mode", RadioSettingValueList( HYPER_MODES, - HYPER_MODES[_hyperSettings.right_mode]))) + current_index=_hyperSettings.right_mode))) hyperGroup.append( RadioSetting( "left_channel", @@ -1544,42 +1545,42 @@ def get_settings(self): "Left VFO Band", RadioSettingValueList( HYPER_L_VFOS, - HYPER_L_VFOS[_hyperSettings.left_vfo_band]))) + current_index=_hyperSettings.left_vfo_band))) hyperGroup.append( RadioSetting( "right_vfo_band", "Right VFO Band", RadioSettingValueList( HYPER_R_VFOS, - HYPER_R_VFOS[_hyperSettings.right_vfo_band]))) + current_index=_hyperSettings.right_vfo_band))) hyperGroup.append( RadioSetting( "left_work_bank", "Left Work Bank", RadioSettingValueList( BANK_CHOICES, - BANK_CHOICES[_hyperSettings.left_work_bank]))) + current_index=_hyperSettings.left_work_bank))) hyperGroup.append( RadioSetting( "right_work_bank", "Right Work Bank", RadioSettingValueList( BANK_CHOICES, - BANK_CHOICES[_hyperSettings.right_work_bank]))) + current_index=_hyperSettings.right_work_bank))) hyperGroup.append( RadioSetting( "left_bank_mode", "Left Bank Mode", RadioSettingValueList( HYPER_BANK_MODES, - HYPER_BANK_MODES[_hyperSettings.left_bank_mode]))) + current_index=_hyperSettings.left_bank_mode))) hyperGroup.append( RadioSetting( "right_bank_mode", "Right Bank Mode", RadioSettingValueList( HYPER_BANK_MODES, - HYPER_BANK_MODES[_hyperSettings.right_bank_mode]))) + current_index=_hyperSettings.right_bank_mode))) hyperGroup.append( RadioSetting( "left_bank_sw", @@ -1634,14 +1635,14 @@ def get_settings(self): "Alarm Mode", RadioSettingValueList( EMER_MODES, - EMER_MODES[_emergency.mode]))) + current_index=_emergency.mode))) emer.append( RadioSetting( "eni_type", "ENI Type", RadioSettingValueList( EMER_ENI_TYPES, - EMER_ENI_TYPES[_emergency.eni_type]))) + current_index=_emergency.eni_type))) emer.append( RadioSetting( "emergency.id", @@ -1686,7 +1687,7 @@ def get_settings(self): "ENI Channel", RadioSettingValueList( EMER_CHAN_SEL, - EMER_CHAN_SEL[_emergency.chan_select]))) + current_index=_emergency.chan_select))) emer.append( RadioSetting( "channel", @@ -1703,7 +1704,7 @@ def get_settings(self): "Cycle", RadioSettingValueList( EMER_CYCLES, - EMER_CYCLES[_emergency.cycle]))) + current_index=_emergency.cycle))) allGroups.append(emer) dtmfGroup = RadioSettingGroup("dtmf", "DTMF") @@ -1726,14 +1727,14 @@ def get_settings(self): "Encode Preload Time", RadioSettingValueList( DTMF_PRELOADS, - DTMF_PRELOADS[_settings.dtmf_preload_time]))) + current_index=_settings.dtmf_preload_time))) dtmfGroup.append( RadioSetting( "dtmf_speed", "Speed", RadioSettingValueList( DTMF_SPEEDS, - DTMF_SPEEDS[_settings.dtmf_speed]))) + current_index=_settings.dtmf_speed))) dtmfGroup.append( RadioSetting( "dtmf_interval_char", @@ -1756,7 +1757,7 @@ def get_settings(self): "Decode Response", RadioSettingValueList( DTMF_RESPONSES, - DTMF_RESPONSES[_settings.dtmf_dec_resp]))) + current_index=_settings.dtmf_dec_resp))) dtmfGroup.append( RadioSetting( "dtmf_first_dig_time", diff --git a/chirp/drivers/ap510.py b/chirp/drivers/ap510.py index 912371db..6cf9347a 100644 --- a/chirp/drivers/ap510.py +++ b/chirp/drivers/ap510.py @@ -496,15 +496,17 @@ def get_settings(self): RadioSettingValueInteger(0, 7, ssid3))) except NotImplementedError: aprs.append(RadioSetting("path", "Path", - RadioSettingValueList(PATH, - PATH[int(self._mmap.path)]))) + RadioSettingValueList( + PATH, + current_index=int(self._mmap.path)))) aprs.append(RadioSetting("table", "Table or Overlay", RadioSettingValueList(TABLE, self._mmap.symbol[1]))) aprs.append(RadioSetting("symbol", "Symbol", RadioSettingValueList(SYMBOL, self._mmap.symbol[0]))) aprs.append(RadioSetting("beacon", "Beacon Mode", - RadioSettingValueList(BEACON, - BEACON[int(self._mmap.beacon) - 1]))) + RadioSettingValueList( + BEACON, + current_index=int(self._mmap.beacon) - 1))) aprs.append(RadioSetting("rate", "Beacon Rate (seconds)", RadioSettingValueInteger(10, 9999, self._mmap.rate))) aprs.append(RadioSetting("comment", "Comment", @@ -634,7 +636,8 @@ def get_settings(self): system.append(RadioSetting("tf_card", "TF card format", RadioSettingValueList( TF_CARD, - TF_CARD[int(self._mmap.multiple['tf_card'])]))) + current_index=( + int(self._mmap.multiple['tf_card']))))) except NotImplementedError: pass diff --git a/chirp/drivers/baofeng_uv17.py b/chirp/drivers/baofeng_uv17.py index 52cd3219..17e10ef3 100644 --- a/chirp/drivers/baofeng_uv17.py +++ b/chirp/drivers/baofeng_uv17.py @@ -367,18 +367,19 @@ def _filter(name): val = _mem.settings.powersave rs = RadioSetting("settings.powersave", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) rs = RadioSetting("settings.scanmode", "Scan Mode", RadioSettingValueList( LIST_SCANMODE, - LIST_SCANMODE[_mem.settings.scanmode])) + current_index=_mem.settings.scanmode)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) rs = RadioSetting("settings.fmenable", "Enable FM radio", diff --git a/chirp/drivers/baofeng_uv17Pro.py b/chirp/drivers/baofeng_uv17Pro.py index c2cdf78c..c71e57cd 100644 --- a/chirp/drivers/baofeng_uv17Pro.py +++ b/chirp/drivers/baofeng_uv17Pro.py @@ -492,7 +492,7 @@ def get_settings_pro_dtmf(self, dtmfe, _mem): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -501,14 +501,14 @@ def get_settings_pro_dtmf(self, dtmfe, _mem): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if self._has_when_to_send_aniid: - rs = RadioSetting("ani.aniid", "When to send ANI ID", - RadioSettingValueList(LIST_PTTID, - LIST_PTTID[ - _mem.ani.aniid])) + rs = RadioSetting( + "ani.aniid", "When to send ANI ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.ani.aniid)) dtmfe.append(rs) if _mem.settings.hangup >= len(LIST_HANGUPTIME): @@ -517,8 +517,7 @@ def get_settings_pro_dtmf(self, dtmfe, _mem): val = _mem.settings.hangup rs = RadioSetting("settings.hangup", "Hang-up time", RadioSettingValueList(LIST_HANGUPTIME, - LIST_HANGUPTIME[ - val])) + current_index=val)) dtmfe.append(rs) def get_settings_common_basic(self, basic, _mem): @@ -584,7 +583,7 @@ def get_settings_common_basic(self, basic, _mem): rs = RadioSetting("settings.beep", "Beep", RadioSettingValueList( - LIST_BEEP, LIST_BEEP[_mem.settings.beep])) + LIST_BEEP, current_index=_mem.settings.beep)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger", @@ -617,20 +616,20 @@ def get_settings_pro_basic(self, basic, _mem): rs = RadioSetting("settings.totalarm", "Timeout Timer Alarm", RadioSettingValueList( LIST_TIMEOUT_ALARM, - LIST_TIMEOUT_ALARM[_mem.settings.totalarm])) + current_index=_mem.settings.totalarm)) basic.append(rs) if self._has_pilot_tone: rs = RadioSetting("settings.tone", "Pilot Tone", RadioSettingValueList( LIST_PILOT_TONE, - LIST_PILOT_TONE[_mem.settings.tone])) + current_index=_mem.settings.tone)) basic.append(rs) rs = RadioSetting("settings.sidetone", "Side Tone", RadioSettingValueList( LIST_SIDE_TONE, - LIST_SIDE_TONE[_mem.settings.sidetone])) + current_index=_mem.settings.sidetone)) basic.append(rs) rs = RadioSetting("settings.tailclear", "Tail Clear", @@ -640,13 +639,13 @@ def get_settings_pro_basic(self, basic, _mem): rs = RadioSetting("settings.scanmode", "Scan Mode", RadioSettingValueList( LIST_SCANMODE, - LIST_SCANMODE[_mem.settings.scanmode])) + current_index=_mem.settings.scanmode)) basic.append(rs) rs = RadioSetting("settings.alarmmode", "Alarm Mode", RadioSettingValueList( LIST_ALARMMODE, - LIST_ALARMMODE[_mem.settings.alarmmode])) + current_index=_mem.settings.alarmmode)) basic.append(rs) rs = RadioSetting("settings.alarmtone", "Sound Alarm", @@ -660,21 +659,20 @@ def get_settings_pro_basic(self, basic, _mem): rs = RadioSetting("settings.menuquittime", "Menu Quit Timer", RadioSettingValueList( LIST_MENU_QUIT_TIME, - LIST_MENU_QUIT_TIME[ - _mem.settings.menuquittime])) + current_index=_mem.settings.menuquittime)) basic.append(rs) if self._has_send_id_delay: rs = RadioSetting("settings.pttdly", "Send ID Delay", RadioSettingValueList( LIST_ID_DELAY, - LIST_ID_DELAY[_mem.settings.pttdly])) + current_index=_mem.settings.pttdly)) basic.append(rs) rs = RadioSetting("settings.ctsdcsscantype", "QT Save Mode", RadioSettingValueList( LIST_QT_SAVEMODE, - LIST_QT_SAVEMODE[_mem.settings.ctsdcsscantype])) + current_index=_mem.settings.ctsdcsscantype)) basic.append(rs) def getKey2shortIndex(value): @@ -696,35 +694,33 @@ def apply_Key2short(setting, obj): rs = RadioSetting("settings.key2short", "Skey2 Short", RadioSettingValueList( LIST_SKEY2_SHORT, - LIST_SKEY2_SHORT[ - getKey2shortIndex( - _mem.settings.key2short)])) + current_index=getKey2shortIndex( + _mem.settings.key2short))) rs.set_apply_callback(apply_Key2short, _mem.settings) basic.append(rs) rs = RadioSetting("settings.chaworkmode", "Channel A work mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.chaworkmode])) + current_index=_mem.settings.chaworkmode)) basic.append(rs) rs = RadioSetting("settings.chbworkmode", "Channel B work mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.chbworkmode])) + current_index=_mem.settings.chbworkmode)) basic.append(rs) rs = RadioSetting("settings.rpttailclear", "Rpt Tail Clear", RadioSettingValueList( LIST_RPT_TAIL_CLEAR, - LIST_RPT_TAIL_CLEAR[ - _mem.settings.rpttailclear])) + current_index=_mem.settings.rpttailclear)) basic.append(rs) rs = RadioSetting("settings.rpttaildet", "Rpt Tail Delay", RadioSettingValueList( LIST_RPT_TAIL_CLEAR, - LIST_RPT_TAIL_CLEAR[_mem.settings.rpttaildet])) + current_index=_mem.settings.rpttaildet)) basic.append(rs) rs = RadioSetting("settings.rstmenu", "Enable Menu Rst", @@ -739,19 +735,19 @@ def apply_Key2short(setting, obj): rs = RadioSetting("settings.vox", "Vox Level", RadioSettingValueList( LIST_VOX_LEVEL_ALT, - LIST_VOX_LEVEL_ALT[_mem.settings.vox])) + current_index=_mem.settings.vox)) basic.append(rs) else: rs = RadioSetting("settings.vox", "Vox Level", RadioSettingValueList( LIST_VOX_LEVEL, - LIST_VOX_LEVEL[_mem.settings.vox])) + current_index=_mem.settings.vox)) basic.append(rs) rs = RadioSetting("settings.voxdlytime", "Vox Delay Time", RadioSettingValueList( LIST_VOX_DELAY_TIME, - LIST_VOX_DELAY_TIME[_mem.settings.voxdlytime])) + current_index=_mem.settings.voxdlytime)) basic.append(rs) if self._has_gps: @@ -762,13 +758,13 @@ def apply_Key2short(setting, obj): rs = RadioSetting("settings.gpsmode", "GPS Mode", RadioSettingValueList( LIST_GPS_MODE, - LIST_GPS_MODE[_mem.settings.gpsmode])) + current_index=_mem.settings.gpsmode)) basic.append(rs) rs = RadioSetting("settings.gpstimezone", "GPS Timezone", RadioSettingValueList( LIST_GPS_TIMEZONE, - LIST_GPS_TIMEZONE[_mem.settings.gpstimezone])) + current_index=_mem.settings.gpstimezone)) basic.append(rs) rs = RadioSetting("settings.fmenable", "Disable FM radio", @@ -814,7 +810,8 @@ def apply_freq(setting, obj): else: val = _mem.vfo.a.sftd rs = RadioSetting("vfo.a.sftd", "Shift", - RadioSettingValueList(LIST_SHIFTS, LIST_SHIFTS[val])) + RadioSettingValueList( + LIST_SHIFTS, current_index=val)) vfoA.append(rs) if _mem.vfo.b.sftd >= len(LIST_SHIFTS): @@ -822,7 +819,8 @@ def apply_freq(setting, obj): else: val = _mem.vfo.b.sftd rs = RadioSetting("vfo.b.sftd", "Shift", - RadioSettingValueList(LIST_SHIFTS, LIST_SHIFTS[val])) + RadioSettingValueList( + LIST_SHIFTS, current_index=val)) vfoB.append(rs) def convert_bytes_to_offset(bytes): @@ -858,7 +856,7 @@ def apply_offset(setting, obj): val = _mem.vfo.a.lowpower rs = RadioSetting("vfo.a.lowpower", "Power", RadioSettingValueList(POWER_LEVELS, - POWER_LEVELS[val])) + current_index=val)) vfoA.append(rs) if _mem.vfo.b.lowpower >= len(POWER_LEVELS): @@ -867,7 +865,7 @@ def apply_offset(setting, obj): val = _mem.vfo.b.lowpower rs = RadioSetting("vfo.b.lowpower", "Power", RadioSettingValueList(POWER_LEVELS, - POWER_LEVELS[val])) + current_index=val)) vfoB.append(rs) if _mem.vfo.a.wide >= len(LIST_BANDWIDTH): @@ -876,7 +874,7 @@ def apply_offset(setting, obj): val = _mem.vfo.a.wide rs = RadioSetting("vfo.a.wide", "Bandwidth", RadioSettingValueList(LIST_BANDWIDTH, - LIST_BANDWIDTH[val])) + current_index=val)) vfoA.append(rs) if _mem.vfo.b.wide >= len(LIST_BANDWIDTH): @@ -885,7 +883,7 @@ def apply_offset(setting, obj): val = _mem.vfo.b.wide rs = RadioSetting("vfo.b.wide", "Bandwidth", RadioSettingValueList(LIST_BANDWIDTH, - LIST_BANDWIDTH[val])) + current_index=val)) vfoB.append(rs) if _mem.vfo.a.scode >= len(self.SCODE_LIST): @@ -911,7 +909,7 @@ def apply_offset(setting, obj): else: val = _mem.vfo.a.step rs = RadioSetting("vfo.a.step", "Tuning Step", - RadioSettingValueList(LIST_STEPS, LIST_STEPS[val])) + RadioSettingValueList(LIST_STEPS, current_index=val)) vfoA.append(rs) if _mem.vfo.b.step >= len(STEPS): @@ -919,7 +917,7 @@ def apply_offset(setting, obj): else: val = _mem.vfo.b.step rs = RadioSetting("vfo.b.step", "Tuning Step", - RadioSettingValueList(LIST_STEPS, LIST_STEPS[val])) + RadioSettingValueList(LIST_STEPS, current_index=val)) vfoB.append(rs) workmode.append(vfoA) diff --git a/chirp/drivers/baofeng_uv3r.py b/chirp/drivers/baofeng_uv3r.py index d2f1c307..18bd1d47 100644 --- a/chirp/drivers/baofeng_uv3r.py +++ b/chirp/drivers/baofeng_uv3r.py @@ -371,7 +371,7 @@ def get_settings(self): rs = RadioSetting("backlight", "LCD Back Light", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.backlight])) + current_index=_settings.backlight)) basic.append(rs) rs = RadioSetting("beep", "Keypad Beep", @@ -388,7 +388,7 @@ def get_settings(self): rs = RadioSetting("ste", "Squelch Tail Eliminate", RadioSettingValueList( - STE_LIST, STE_LIST[_settings.ste])) + STE_LIST, current_index=_settings.ste)) basic.append(rs) rs = RadioSetting("save", "Battery Saver", @@ -397,12 +397,12 @@ def get_settings(self): rs = RadioSetting("timeout", "Time Out Timer", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) basic.append(rs) rs = RadioSetting("scanm", "Scan Mode", RadioSettingValueList( - SCANM_LIST, SCANM_LIST[_settings.scanm])) + SCANM_LIST, current_index=_settings.scanm)) basic.append(rs) rs = RadioSetting("relaym", "Repeater Sound Response", @@ -419,12 +419,12 @@ def get_settings(self): rs = RadioSetting("pri_ch", "Priority Channel", RadioSettingValueList( - PRI_CH_LIST, PRI_CH_LIST[_settings.pri_ch])) + PRI_CH_LIST, current_index=_settings.pri_ch)) basic.append(rs) rs = RadioSetting("ch_flag", "Display Mode", RadioSettingValueList( - CH_FLAG_LIST, CH_FLAG_LIST[_settings.ch_flag])) + CH_FLAG_LIST, current_index=_settings.ch_flag)) basic.append(rs) _limit = int(self._memobj.limits.lower_vhf) / 10 @@ -496,7 +496,7 @@ def apply_vhf_freq(setting, obj): rs = RadioSetting("vfo.vhf.duplex", "Shift Direction", RadioSettingValueList( - DUPLEX_LIST, DUPLEX_LIST[_vfo.vhf.duplex])) + DUPLEX_LIST, current_index=_vfo.vhf.duplex)) vfo_preset.append(rs) def convert_bytes_to_offset(bytes): @@ -516,18 +516,18 @@ def apply_vhf_offset(setting, obj): rs = RadioSetting("vfo.vhf.power", "Power Level", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfo.vhf.power])) + POWER_LIST, current_index=_vfo.vhf.power)) vfo_preset.append(rs) rs = RadioSetting("vfo.vhf.bandwidth", "Bandwidth", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[_vfo.vhf.bandwidth])) + current_index=_vfo.vhf.bandwidth)) vfo_preset.append(rs) rs = RadioSetting("vfo.vhf.step", "Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfo.vhf.step])) + STEP_LIST, current_index=_vfo.vhf.step)) vfo_preset.append(rs) def apply_uhf_freq(setting, obj): @@ -543,7 +543,7 @@ def apply_uhf_freq(setting, obj): rs = RadioSetting("vfo.uhf.duplex", "Shift Direction", RadioSettingValueList( - DUPLEX_LIST, DUPLEX_LIST[_vfo.uhf.duplex])) + DUPLEX_LIST, current_index=_vfo.uhf.duplex)) vfo_preset.append(rs) def apply_uhf_offset(setting, obj): @@ -558,18 +558,18 @@ def apply_uhf_offset(setting, obj): rs = RadioSetting("vfo.uhf.power", "Power Level", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfo.uhf.power])) + POWER_LIST, current_index=_vfo.uhf.power)) vfo_preset.append(rs) rs = RadioSetting("vfo.uhf.bandwidth", "Bandwidth", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[_vfo.uhf.bandwidth])) + current_index=_vfo.uhf.bandwidth)) vfo_preset.append(rs) rs = RadioSetting("vfo.uhf.step", "Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfo.uhf.step])) + STEP_LIST, current_index=_vfo.uhf.step)) vfo_preset.append(rs) fm_preset = RadioSettingGroup("fm_preset", "FM Radio Presets") diff --git a/chirp/drivers/baofeng_wp970i.py b/chirp/drivers/baofeng_wp970i.py index 104d23db..3d099aa0 100644 --- a/chirp/drivers/baofeng_wp970i.py +++ b/chirp/drivers/baofeng_wp970i.py @@ -366,7 +366,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -375,7 +375,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -384,7 +384,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -393,7 +393,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -410,7 +410,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -419,12 +419,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -433,12 +434,13 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) if _mem.settings.pttlt > 0x1E: @@ -449,14 +451,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.autolk", "Automatic Key Lock", @@ -465,23 +469,23 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) if _mem.settings.tdrab > 0x02: @@ -490,7 +494,7 @@ def get_settings(self): val = _mem.settings.tdrab rs = RadioSetting("settings.tdrab", "Dual Watch TX Priority", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[val])) + LIST_OFFAB, current_index=val)) basic.append(rs) rs = RadioSetting("settings.ste", "Squelch Tail Eliminate (HT to HT)", @@ -504,7 +508,7 @@ def get_settings(self): rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - LIST_RPSTE, LIST_RPSTE[val])) + LIST_RPSTE, current_index=val)) basic.append(rs) if _mem.settings.rptrl > 0x0A: @@ -513,12 +517,13 @@ def get_settings(self): val = _mem.settings.rptrl rs = RadioSetting("settings.rptrl", "STE Repeater Delay", RadioSettingValueList( - LIST_STEDELAY, LIST_STEDELAY[val])) + LIST_STEDELAY, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", @@ -623,13 +628,13 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.workmode", "VFO/MR Mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.workmode])) + current_index=_mem.settings.workmode)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -681,12 +686,12 @@ def apply_freq(setting, obj): rs = RadioSetting("vfo.a.sftd", "VFO A Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.a.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.a.sftd)) work.append(rs) rs = RadioSetting("vfo.b.sftd", "VFO B Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.b.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.b.sftd)) work.append(rs) def convert_bytes_to_offset(bytes): @@ -728,7 +733,7 @@ def apply_txpower_listvalue(setting, obj): idx = TXP_VALUES.index(_mem.vfo.a.txpower3) else: idx = TXP_VALUES.index(0x00) - rs = RadioSettingValueList(TXP_CHOICES, TXP_CHOICES[idx]) + rs = RadioSettingValueList(TXP_CHOICES, current_index=idx) rset = RadioSetting("vfo.a.txpower3", "VFO A Power", rs) rset.set_apply_callback(apply_txpower_listvalue, _mem.vfo.a.txpower3) @@ -738,57 +743,57 @@ def apply_txpower_listvalue(setting, obj): idx = TXP_VALUES.index(_mem.vfo.b.txpower3) else: idx = TXP_VALUES.index(0x00) - rs = RadioSettingValueList(TXP_CHOICES, TXP_CHOICES[idx]) + rs = RadioSettingValueList(TXP_CHOICES, current_index=idx) rset = RadioSetting("vfo.b.txpower3", "VFO B Power", rs) rset.set_apply_callback(apply_txpower_listvalue, _mem.vfo.b.txpower3) work.append(rset) else: - rs = RadioSetting("vfo.a.txpower3", "VFO A Power", - RadioSettingValueList( - LIST_TXPOWER, - LIST_TXPOWER[min(_mem.vfo.a.txpower3, 0x02)] - )) + rs = RadioSetting( + "vfo.a.txpower3", "VFO A Power", + RadioSettingValueList( + LIST_TXPOWER, current_index=min( + _mem.vfo.a.txpower3, 0x02))) work.append(rs) - rs = RadioSetting("vfo.b.txpower3", "VFO B Power", - RadioSettingValueList( - LIST_TXPOWER, - LIST_TXPOWER[min(_mem.vfo.b.txpower3, 0x02)] - )) + rs = RadioSetting( + "vfo.b.txpower3", "VFO B Power", + RadioSettingValueList( + LIST_TXPOWER, current_index=min( + _mem.vfo.b.txpower3, 0x02))) work.append(rs) rs = RadioSetting("vfo.a.widenarr", "VFO A Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.a.widenarr])) + current_index=_mem.vfo.a.widenarr)) work.append(rs) rs = RadioSetting("vfo.b.widenarr", "VFO B Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.b.widenarr])) + current_index=_mem.vfo.b.widenarr)) work.append(rs) rs = RadioSetting("vfo.a.scode", "VFO A S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.a.scode])) + current_index=_mem.vfo.a.scode)) work.append(rs) rs = RadioSetting("vfo.b.scode", "VFO B S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.b.scode])) + current_index=_mem.vfo.b.scode)) work.append(rs) rs = RadioSetting("vfo.a.step", "VFO A Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.a.step])) + LIST_STEP, current_index=_mem.vfo.a.step)) work.append(rs) rs = RadioSetting("vfo.b.step", "VFO B Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.b.step])) + LIST_STEP, current_index=_mem.vfo.b.step)) work.append(rs) # broadcast FM settings @@ -838,7 +843,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -847,7 +852,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -860,7 +865,7 @@ def apply_code(setting, obj, length): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) # Service settings diff --git a/chirp/drivers/bf_t1.py b/chirp/drivers/bf_t1.py index 07937e21..cffc0038 100644 --- a/chirp/drivers/bf_t1.py +++ b/chirp/drivers/bf_t1.py @@ -740,7 +740,7 @@ def get_settings(self): # ## Basic Settings rs = RadioSetting("tx_pwr", "TX Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_settings.tx_pwr])) + POWER_LIST, current_index=_settings.tx_pwr)) basic.append(rs) rs = RadioSetting("channel", "Active Channel", @@ -764,29 +764,28 @@ def get_settings(self): basic.append(rs) rs = RadioSetting("scantype", "Scan Type", - RadioSettingValueList(SCAN_TYPE_LIST, SCAN_TYPE_LIST[ - _settings.scantype])) + RadioSettingValueList(SCAN_TYPE_LIST, current_index=_settings.scantype)) basic.append(rs) rs = RadioSetting("timeout", "Time Out Timer (seconds)", RadioSettingValueList( - TOT_LIST, TOT_LIST[_settings.timeout])) + TOT_LIST, current_index=_settings.timeout)) basic.append(rs) rs = RadioSetting("voice", "Voice Prompt", RadioSettingValueList( - LANGUAGE_LIST, LANGUAGE_LIST[_settings.voice])) + LANGUAGE_LIST, current_index=_settings.voice)) basic.append(rs) rs = RadioSetting("alarm", "Alarm Time", RadioSettingValueList( - TIMER_LIST, TIMER_LIST[_settings.alarm])) + TIMER_LIST, current_index=_settings.alarm)) basic.append(rs) rs = RadioSetting("backlight", "Backlight", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.backlight])) + current_index=_settings.backlight)) basic.append(rs) rs = RadioSetting("blo", "Busy Lockout", @@ -816,7 +815,7 @@ def get_settings(self): rs = RadioSetting("fmrange", "FM Range", RadioSettingValueList( - FM_RANGE_LIST, FM_RANGE_LIST[_settings.fmrange])) + FM_RANGE_LIST, current_index=_settings.fmrange)) fm.append(rs) # callbacks for the FM VFO @@ -876,7 +875,7 @@ def apply_limit(setting, obj): rs = RadioSetting("relaym", "Relay Mode", RadioSettingValueList(RELAY_MODE_LIST, - RELAY_MODE_LIST[_settings.relaym])) + current_index=_settings.relaym)) adv.append(rs) return group diff --git a/chirp/drivers/bf_t8.py b/chirp/drivers/bf_t8.py index 8c95aaf7..7e8db1af 100644 --- a/chirp/drivers/bf_t8.py +++ b/chirp/drivers/bf_t8.py @@ -668,15 +668,15 @@ def get_settings(self): model_list = ["RB27B", "RB27V", "RB627B"] if self.MODEL in model_list: # Menu 09 (RB27x/RB627x) - rs = RadioSettingValueList(TOT2_LIST, TOT2_LIST[_settings.tot]) + rs = RadioSettingValueList(TOT2_LIST, current_index=_settings.tot) else: # Menu 11 / 09 (RB27) - rs = RadioSettingValueList(TOT_LIST, TOT_LIST[_settings.tot]) + rs = RadioSettingValueList(TOT_LIST, current_index=_settings.tot) rset = RadioSetting("tot", "Time-out timer", rs) basic.append(rset) # Menu 06 - rs = RadioSettingValueList(VOX_LIST, VOX_LIST[_settings.vox]) + rs = RadioSettingValueList(VOX_LIST, current_index=_settings.vox) rset = RadioSetting("vox", "VOX Level", rs) basic.append(rset) @@ -695,13 +695,14 @@ def apply_voice_listvalue(setting, obj): idx = VOICE_VALUES.index(_settings.voice) else: idx = VOICE_VALUES.index(0x00) - rs = RadioSettingValueList(VOICE_CHOICES, VOICE_CHOICES[idx]) + rs = RadioSettingValueList(VOICE_CHOICES, current_index=idx) rset = RadioSetting("voice", "Voice", rs) rset.set_apply_callback(apply_voice_listvalue, _settings.voice) basic.append(rset) else: # Menu 15 (BF-T8) - rs = RadioSettingValueList(VOICE_LIST, VOICE_LIST[_settings.voice]) + rs = RadioSettingValueList( + VOICE_LIST, current_index=_settings.voice) rset = RadioSetting("voice", "Voice", rs) basic.append(rset) @@ -726,12 +727,12 @@ def apply_voice_listvalue(setting, obj): basic.append(rset) # Menu 04 - rs = RadioSettingValueList(ABR_LIST, ABR_LIST[_settings.abr]) + rs = RadioSettingValueList(ABR_LIST, current_index=_settings.abr) rset = RadioSetting("abr", "Back Light", rs) basic.append(rset) # Menu 13 / 11 (RB-27/RB627) - rs = RadioSettingValueList(RING_LIST, RING_LIST[_settings.ring]) + rs = RadioSettingValueList(RING_LIST, current_index=_settings.ring) rset = RadioSetting("ring", "Ring", rs) basic.append(rset) @@ -741,7 +742,7 @@ def apply_voice_listvalue(setting, obj): # Menu 15 (FRS-A1) if self.MODEL == "FRS-A1": - rs = RadioSettingValueList(MDF_LIST, MDF_LIST[_settings.mdf]) + rs = RadioSettingValueList(MDF_LIST, current_index=_settings.mdf) rset = RadioSetting("mdf", "Display Type", rs) basic.append(rset) @@ -759,14 +760,14 @@ def apply_voice_listvalue(setting, obj): rset = RadioSetting("mrb", "MR B Channel #", rs) basic.append(rset) - rs = RadioSettingValueList(AB_LIST, AB_LIST[_settings.disp_ab]) + rs = RadioSettingValueList(AB_LIST, current_index=_settings.disp_ab) rset = RadioSetting("disp_ab", "Selected Display Line", rs) basic.append(rset) if not self.MODEL.startswith("RB627"): if self.MODEL == "FRS-A1": del WX_LIST[7:] - rs = RadioSettingValueList(WX_LIST, WX_LIST[_settings2.wx]) + rs = RadioSettingValueList(WX_LIST, current_index=_settings2.wx) rset = RadioSetting("settings2.wx", "NOAA WX Radio", rs) basic.append(rset) @@ -792,11 +793,12 @@ def myset_freq(setting, obj, atrb, mult): model_list = ["BF-T8", "BF-U9", "AR-8"] if self.MODEL in model_list: rs = RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[_settings2.workmode]) + current_index=_settings2.workmode) rset = RadioSetting("settings2.workmode", "Work Mode", rs) basic.append(rset) - rs = RadioSettingValueList(AREA_LIST, AREA_LIST[_settings2.area]) + rs = RadioSettingValueList( + AREA_LIST, current_index=_settings2.area) rs.set_mutable(False) rset = RadioSetting("settings2.area", "Area", rs) basic.append(rset) diff --git a/chirp/drivers/bjuv55.py b/chirp/drivers/bjuv55.py index 4efda5d4..87cacb88 100644 --- a/chirp/drivers/bjuv55.py +++ b/chirp/drivers/bjuv55.py @@ -333,17 +333,17 @@ def _get_settings(self): rs = RadioSetting("wtled", "Standby LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.wtled])) + COLOR_LIST, current_index=_settings.wtled)) basic.append(rs) rs = RadioSetting("rxled", "RX LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.rxled])) + COLOR_LIST, current_index=_settings.rxled)) basic.append(rs) rs = RadioSetting("txled", "TX LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.txled])) + COLOR_LIST, current_index=_settings.txled)) basic.append(rs) rs = RadioSetting("reset", "RESET Menu", @@ -413,13 +413,13 @@ def _filter(name): options = ["A", "B"] rs = RadioSetting("displayab", "Display Selected", RadioSettingValueList( - options, options[_settings.displayab])) + options, current_index=_settings.displayab)) workmode.append(rs) options = ["Frequency", "Channel"] rs = RadioSetting("workmode", "VFO/MR Mode", RadioSettingValueList( - options, options[_settings.workmode])) + options, current_index=_settings.workmode)) workmode.append(rs) rs = RadioSetting("keylock", "Keypad Lock", @@ -468,12 +468,12 @@ def apply_freq(setting, obj): options = ["Off", "+", "-"] rs = RadioSetting("vfoa.sftd", "VFO A Shift", RadioSettingValueList( - options, options[self._memobj.vfoa.sftd])) + options, current_index=self._memobj.vfoa.sftd)) workmode.append(rs) rs = RadioSetting("vfob.sftd", "VFO B Shift", RadioSettingValueList( - options, options[self._memobj.vfob.sftd])) + options, current_index=self._memobj.vfob.sftd)) workmode.append(rs) def convert_bytes_to_offset(bytes): @@ -501,45 +501,49 @@ def apply_offset(setting, obj): workmode.append(rs) options = ["High", "Low"] - rs = RadioSetting("vfoa.txpower", "VFO A Power", - RadioSettingValueList( - options, options[self._memobj.vfoa.txpower])) + rs = RadioSetting( + "vfoa.txpower", "VFO A Power", + RadioSettingValueList( + options, current_index=self._memobj.vfoa.txpower)) workmode.append(rs) - rs = RadioSetting("vfob.txpower", "VFO B Power", - RadioSettingValueList( - options, options[self._memobj.vfob.txpower])) + rs = RadioSetting( + "vfob.txpower", "VFO B Power", + RadioSettingValueList( + options, current_index=self._memobj.vfob.txpower)) workmode.append(rs) options = ["Wide", "Narrow"] - rs = RadioSetting("vfoa.widenarr", "VFO A Bandwidth", - RadioSettingValueList( - options, options[self._memobj.vfoa.widenarr])) + rs = RadioSetting( + "vfoa.widenarr", "VFO A Bandwidth", + RadioSettingValueList( + options, current_index=self._memobj.vfoa.widenarr)) workmode.append(rs) - rs = RadioSetting("vfob.widenarr", "VFO B Bandwidth", - RadioSettingValueList( - options, options[self._memobj.vfob.widenarr])) + rs = RadioSetting( + "vfob.widenarr", "VFO B Bandwidth", + RadioSettingValueList( + options, current_index=self._memobj.vfob.widenarr)) workmode.append(rs) options = ["%s" % x for x in range(1, 16)] rs = RadioSetting("vfoa.scode", "VFO A PTT-ID", RadioSettingValueList( - options, options[self._memobj.vfoa.scode])) + options, current_index=self._memobj.vfoa.scode)) workmode.append(rs) rs = RadioSetting("vfob.scode", "VFO B PTT-ID", RadioSettingValueList( - options, options[self._memobj.vfob.scode])) + options, current_index=self._memobj.vfob.scode)) workmode.append(rs) rs = RadioSetting("vfoa.step", "VFO A Tuning Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[self._memobj.vfoa.step])) + STEP_LIST, current_index=self._memobj.vfoa.step)) workmode.append(rs) rs = RadioSetting("vfob.step", "VFO B Tuning Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[self._memobj.vfob.step])) + STEP_LIST, current_index=self._memobj.vfob.step)) workmode.append(rs) fm_preset = RadioSettingGroup("fm_preset", "FM Radio Preset") @@ -593,7 +597,7 @@ def apply_code(setting, obj): options = ["Off", "BOT", "EOT", "Both"] rs = RadioSetting("ani.aniid", "ANI ID", RadioSettingValueList( - options, options[self._memobj.ani.aniid])) + options, current_index=self._memobj.ani.aniid)) dtmf.append(rs) _codeobj = self._memobj.ani.alarmcode diff --git a/chirp/drivers/btech.py b/chirp/drivers/btech.py index f5a38488..b932d22d 100644 --- a/chirp/drivers/btech.py +++ b/chirp/drivers/btech.py @@ -895,7 +895,7 @@ def get_memory(self, number): pttid = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(pttid) # validating scode @@ -903,19 +903,19 @@ def get_memory(self, number): pttidcode = RadioSetting("scode", "PTT ID signal code", RadioSettingValueList( PTTIDCODE_LIST, - PTTIDCODE_LIST[scode])) + current_index=scode)) mem.extra.append(pttidcode) optsig = RadioSetting("optsig", "Optional signaling", RadioSettingValueList( OPTSIG_LIST, - OPTSIG_LIST[_mem.optsig])) + current_index=_mem.optsig)) mem.extra.append(optsig) spmute = RadioSetting("spmute", "Speaker mute", RadioSettingValueList( SPMUTE_LIST, - SPMUTE_LIST[_mem.spmute])) + current_index=_mem.spmute)) mem.extra.append(spmute) immutable = [] @@ -1143,7 +1143,7 @@ def get_settings(self): basic.append(mgain2) val = min(_mem.settings.tot, len(LIST_TOT) - 1) - rs = RadioSettingValueList(LIST_TOT, LIST_TOT[val]) + rs = RadioSettingValueList(LIST_TOT, current_index=val) tot = RadioSetting("settings.tot", "Time out timer", rs) basic.append(tot) @@ -1156,17 +1156,17 @@ def get_settings(self): if self.MODEL not in model_list: if self.VENDOR == "BTECH" or self.COLOR_LCD: val = min(_mem.settings.apo, len(LIST_APO) - 1) - rs = RadioSettingValueList(LIST_APO, LIST_APO[val]) + rs = RadioSettingValueList(LIST_APO, current_index=val) apo = RadioSetting("settings.apo", "Auto power off timer", rs) basic.append(apo) else: val = min(_mem.settings.apo, len(LIST_OFF1TO10) - 1) - rs = RadioSettingValueList(LIST_OFF1TO10, LIST_OFF1TO10[val]) + rs = RadioSettingValueList(LIST_OFF1TO10, current_index=val) toa = RadioSetting("settings.apo", "Time out alert timer", rs) basic.append(toa) val = min(_mem.settings.abr, len(LIST_OFF1TO50) - 1) - rs = RadioSettingValueList(LIST_OFF1TO50, LIST_OFF1TO50[val]) + rs = RadioSettingValueList(LIST_OFF1TO50, current_index=val) abr = RadioSetting("settings.abr", "Backlight timer", rs) basic.append(abr) @@ -1197,7 +1197,7 @@ def get_settings(self): basic.append(dtmfst) else: val = min(_mem.settings.dtmfst, len(LIST_DTMFST) - 1) - rs = RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[val]) + rs = RadioSettingValueList(LIST_DTMFST, current_index=val) dtmfst = RadioSetting("settings.dtmfst", "DTMF side tone", rs) basic.append(dtmfst) @@ -1212,7 +1212,7 @@ def get_settings(self): basic.append(prich) val = min(_mem.settings.screv, len(LIST_SCREV) - 1) - rs = RadioSettingValueList(LIST_SCREV, LIST_SCREV[val]) + rs = RadioSettingValueList(LIST_SCREV, current_index=val) screv = RadioSetting("settings.screv", "Scan resume method", rs) basic.append(screv) @@ -1224,12 +1224,12 @@ def get_settings(self): if self.VENDOR == "BTECH" and self.COLOR_LCD and not \ self.MODEL == "GMRS-20V2": val = min(_mem.settings.emctp, len(LIST_EMCTPX) - 1) - rs = RadioSettingValueList(LIST_EMCTPX, LIST_EMCTPX[val]) + rs = RadioSettingValueList(LIST_EMCTPX, current_index=val) emctp = RadioSetting("settings.emctp", "Alarm mode", rs) basic.append(emctp) else: val = min(_mem.settings.emctp, len(LIST_EMCTP) - 1) - rs = RadioSettingValueList(LIST_EMCTP, LIST_EMCTP[val]) + rs = RadioSettingValueList(LIST_EMCTP, current_index=val) emctp = RadioSetting("settings.emctp", "Alarm mode", rs) basic.append(emctp) @@ -1244,61 +1244,61 @@ def get_settings(self): basic.append(sigbp) else: val = min(_mem.settings.ringt, len(LIST_OFF1TO9) - 1) - rs = RadioSettingValueList(LIST_OFF1TO9, LIST_OFF1TO9[val]) + rs = RadioSettingValueList(LIST_OFF1TO9, current_index=val) ringt = RadioSetting("settings.ringt", "Ring time", rs) basic.append(ringt) val = min(_mem.settings.camdf, len(LIST_MDF) - 1) - rs = RadioSettingValueList(LIST_MDF, LIST_MDF[val]) + rs = RadioSettingValueList(LIST_MDF, current_index=val) camdf = RadioSetting("settings.camdf", "Display mode A", rs) basic.append(camdf) val = min(_mem.settings.cbmdf, len(LIST_MDF) - 1) - rs = RadioSettingValueList(LIST_MDF, LIST_MDF[val]) + rs = RadioSettingValueList(LIST_MDF, current_index=val) cbmdf = RadioSetting("settings.cbmdf", "Display mode B", rs) basic.append(cbmdf) if self.COLOR_LCD: val = min(_mem.settings.ccmdf, len(LIST_MDF) - 1) - rs = RadioSettingValueList(LIST_MDF, LIST_MDF[val]) + rs = RadioSettingValueList(LIST_MDF, current_index=val) ccmdf = RadioSetting("settings.ccmdf", "Display mode C", rs) basic.append(ccmdf) if not self.COLOR_LCD4: val = min(_mem.settings.cdmdf, len(LIST_MDF) - 1) - rs = RadioSettingValueList(LIST_MDF, LIST_MDF[val]) + rs = RadioSettingValueList(LIST_MDF, current_index=val) cdmdf = RadioSetting("settings.cdmdf", "Display mode D", rs) basic.append(cdmdf) if self.MODEL in ["UV-50X2_G2", "UV-25X2_G2", "UV-25X4_G2"]: val = min(_mem.settings.langua, len(LIST_VOX) - 1) - rs = RadioSettingValueList(LIST_VOX, LIST_VOX[val]) + rs = RadioSettingValueList(LIST_VOX, current_index=val) vox = RadioSetting("settings.langua", "VOX", rs) basic.append(vox) elif self.MODEL == "GMRS-50V2": val = min(_mem.settings.vox, len(LIST_VOX) - 1) - rs = RadioSettingValueList(LIST_VOX, LIST_VOX[val]) + rs = RadioSettingValueList(LIST_VOX, current_index=val) vox = RadioSetting("settings.vox", "VOX", rs) basic.append(vox) else: val = min(_mem.settings.langua, len(LIST_LANGUA) - 1) - rs = RadioSettingValueList(LIST_LANGUA, LIST_LANGUA[val]) + rs = RadioSettingValueList(LIST_LANGUA, current_index=val) langua = RadioSetting("settings.langua", "Language", rs) basic.append(langua) if self.MODEL == "KT-8R": val = min(_mem.settings.voice, len(LIST_VOICE) - 1) - rs = RadioSettingValueList(LIST_VOICE, LIST_VOICE[val]) + rs = RadioSettingValueList(LIST_VOICE, current_index=val) voice = RadioSetting("settings.voice", "Voice prompt", rs) basic.append(voice) if self.MODEL == "KT-8R" or self.COLOR_LCD4: val = min(_mem.settings.vox, len(LIST_VOX) - 1) - rs = RadioSettingValueList(LIST_VOX, LIST_VOX[val]) + rs = RadioSettingValueList(LIST_VOX, current_index=val) vox = RadioSetting("settings.vox", "VOX", rs) basic.append(vox) val = min(_mem.settings.voxt, len(LIST_VOX) - 1) - rs = RadioSettingValueList(LIST_VOXT, LIST_VOXT[val]) + rs = RadioSettingValueList(LIST_VOXT, current_index=val) voxt = RadioSetting("settings.voxt", "VOX delay time", rs) basic.append(voxt) @@ -1306,13 +1306,13 @@ def get_settings(self): if self.COLOR_LCD: if self.MODEL == "GMRS-20V2": val = min(_mem.settings.sync, len(LIST_SYNCV2) - 1) - rs = RadioSettingValueList(LIST_SYNCV2, LIST_SYNCV2[val]) + rs = RadioSettingValueList(LIST_SYNCV2, current_index=val) sync = RadioSetting("settings.sync", "Channel display sync", rs) basic.append(sync) else: val = min(_mem.settings.sync, len(LIST_SYNC) - 1) - rs = RadioSettingValueList(LIST_SYNC, LIST_SYNC[val]) + rs = RadioSettingValueList(LIST_SYNC, current_index=val) sync = RadioSetting("settings.sync", "Channel display sync", rs) basic.append(sync) @@ -1328,236 +1328,236 @@ def get_settings(self): if not self.COLOR_LCD: val = min(_mem.settings.ponmsg, len(LIST_PONMSG) - 1) - rs = RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[val]) + rs = RadioSettingValueList(LIST_PONMSG, current_index=val) ponmsg = RadioSetting("settings.ponmsg", "Power-on message", rs) basic.append(ponmsg) if self.COLOR_LCD and not (self.COLOR_LCD2 or self.COLOR_LCD3 or self.COLOR_LCD4): val = min(_mem.settings.mainfc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) mainfc = RadioSetting("settings.mainfc", "Main LCD foreground color", rs) basic.append(mainfc) if not self.COLOR_LCD4: val = min(_mem.settings.mainbc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) mainbc = RadioSetting("settings.mainbc", "Main LCD background color", rs) basic.append(mainbc) val = min(_mem.settings.menufc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) menufc = RadioSetting("settings.menufc", "Menu foreground color", rs) basic.append(menufc) if not self.COLOR_LCD4: val = min(_mem.settings.menubc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) menubc = RadioSetting("settings.menubc", "Menu background color", rs) basic.append(menubc) val = min(_mem.settings.stafc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) stafc = RadioSetting("settings.stafc", "Top status foreground color", rs) basic.append(stafc) if not self.COLOR_LCD4: val = min(_mem.settings.stabc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) stabc = RadioSetting("settings.stabc", "Top status background color", rs) basic.append(stabc) val = min(_mem.settings.sigfc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) sigfc = RadioSetting("settings.sigfc", "Bottom status foreground color", rs) basic.append(sigfc) if not self.COLOR_LCD4: val = min(_mem.settings.sigbc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) sigbc = RadioSetting("settings.sigbc", "Bottom status background color", rs) basic.append(sigbc) val = min(_mem.settings.rxfc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) rxfc = RadioSetting("settings.rxfc", "Receiving character color", rs) basic.append(rxfc) val = min(_mem.settings.txfc, len(LIST_COLOR9) - 1) - rs = RadioSettingValueList(LIST_COLOR9, LIST_COLOR9[val]) + rs = RadioSettingValueList(LIST_COLOR9, current_index=val) txfc = RadioSetting("settings.txfc", "Transmitting character color", rs) basic.append(txfc) if not self.COLOR_LCD4: val = min(_mem.settings.txdisp, len(LIST_TXDISP) - 1) - rs = RadioSettingValueList(LIST_TXDISP, LIST_TXDISP[val]) + rs = RadioSettingValueList(LIST_TXDISP, current_index=val) txdisp = RadioSetting("settings.txdisp", "Transmitting status display", rs) basic.append(txdisp) elif self.COLOR_LCD2 or self.COLOR_LCD3: val = min(_mem.settings.stfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) stfc = RadioSetting("settings.stfc", "ST-FC", rs) basic.append(stfc) val = min(_mem.settings.mffc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) mffc = RadioSetting("settings.mffc", "MF-FC", rs) basic.append(mffc) val = min(_mem.settings.sfafc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sfafc = RadioSetting("settings.sfafc", "SFA-FC", rs) basic.append(sfafc) val = min(_mem.settings.sfbfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sfbfc = RadioSetting("settings.sfbfc", "SFB-FC", rs) basic.append(sfbfc) val = min(_mem.settings.sfcfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sfcfc = RadioSetting("settings.sfcfc", "SFC-FC", rs) basic.append(sfcfc) val = min(_mem.settings.sfdfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sfdfc = RadioSetting("settings.sfdfc", "SFD-FC", rs) basic.append(sfdfc) val = min(_mem.settings.subfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) subfc = RadioSetting("settings.subfc", "SUB-FC", rs) basic.append(subfc) val = min(_mem.settings.fmfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) fmfc = RadioSetting("settings.fmfc", "FM-FC", rs) basic.append(fmfc) val = min(_mem.settings.sigfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sigfc = RadioSetting("settings.sigfc", "SIG-FC", rs) basic.append(sigfc) if not self.MODEL == "KT-8R": val = min(_mem.settings.modfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) modfc = RadioSetting("settings.modfc", "MOD-FC", rs) basic.append(modfc) val = min(_mem.settings.menufc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) menufc = RadioSetting("settings.menufc", "MENUFC", rs) basic.append(menufc) val = min(_mem.settings.txfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) txfc = RadioSetting("settings.txfc", "TX-FC", rs) basic.append(txfc) if self.MODEL == "KT-8R": val = min(_mem.settings.rxfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) rxfc = RadioSetting("settings.rxfc", "RX-FC", rs) basic.append(rxfc) if not self.MODEL == "KT-8R" and not self.MODEL == "GMRS-50V2": val = min(_mem.settings.txdisp, len(LIST_TXDISP) - 1) - rs = RadioSettingValueList(LIST_TXDISP, LIST_TXDISP[val]) + rs = RadioSettingValueList(LIST_TXDISP, current_index=val) txdisp = RadioSetting("settings.txdisp", "Transmitting status display", rs) basic.append(txdisp) elif self.COLOR_LCD4: val = min(_mem.settings.asfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) asfc = RadioSetting("settings.asfc", "Above Stat fore color", rs) basic.append(asfc) val = min(_mem.settings.mainfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) mainfc = RadioSetting("settings.mainfc", "Main fore color", rs) basic.append(mainfc) val = min(_mem.settings.a_fc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) a_fc = RadioSetting("settings.a_fc", "A - fore color", rs) basic.append(a_fc) val = min(_mem.settings.b_fc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) b_fc = RadioSetting("settings.b_fc", "B - fore color", rs) basic.append(b_fc) val = min(_mem.settings.c_fc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) c_fc = RadioSetting("settings.c_fc", "C - fore color", rs) basic.append(c_fc) val = min(_mem.settings.subfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) subfc = RadioSetting("settings.subfc", "Sub fore color", rs) basic.append(subfc) val = min(_mem.settings.battfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) battfc = RadioSetting("settings.battfc", "Battery fore color", rs) basic.append(battfc) val = min(_mem.settings.sigfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) sigfc = RadioSetting("settings.sigfc", "Signal fore color", rs) basic.append(sigfc) val = min(_mem.settings.menufc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) menufc = RadioSetting("settings.menufc", "Menu fore color", rs) basic.append(menufc) val = min(_mem.settings.txfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) txfc = RadioSetting("settings.txfc", "TX fore color", rs) basic.append(txfc) val = min(_mem.settings.rxfc, len(LIST_COLOR8) - 1) - rs = RadioSettingValueList(LIST_COLOR8, LIST_COLOR8[val]) + rs = RadioSettingValueList(LIST_COLOR8, current_index=val) rxfc = RadioSetting("settings.rxfc", "RX fore color", rs) basic.append(rxfc) else: val = min(_mem.settings.wtled, len(LIST_COLOR4) - 1) - rs = RadioSettingValueList(LIST_COLOR4, LIST_COLOR4[val]) + rs = RadioSettingValueList(LIST_COLOR4, current_index=val) wtled = RadioSetting("settings.wtled", "Standby backlight Color", rs) basic.append(wtled) val = min(_mem.settings.rxled, len(LIST_COLOR4) - 1) - rs = RadioSettingValueList(LIST_COLOR4, LIST_COLOR4[val]) + rs = RadioSettingValueList(LIST_COLOR4, current_index=val) rxled = RadioSetting("settings.rxled", "RX backlight Color", rs) basic.append(rxled) val = min(_mem.settings.txled, len(LIST_COLOR4) - 1) - rs = RadioSettingValueList(LIST_COLOR4, LIST_COLOR4[val]) + rs = RadioSettingValueList(LIST_COLOR4, current_index=val) txled = RadioSetting("settings.txled", "TX backlight Color", rs) basic.append(txled) val = min(_mem.settings.anil, len(LIST_ANIL) - 1) - rs = RadioSettingValueList(LIST_ANIL, LIST_ANIL[val]) + rs = RadioSettingValueList(LIST_ANIL, current_index=val) anil = RadioSetting("settings.anil", "ANI length", rs) basic.append(anil) val = min(_mem.settings.reps, len(LIST_REPS) - 1) - rs = RadioSettingValueList(LIST_REPS, LIST_REPS[val]) + rs = RadioSettingValueList(LIST_REPS, current_index=val) reps = RadioSetting("settings.reps", "Relay signal (tone burst)", rs) basic.append(reps) @@ -1568,26 +1568,26 @@ def get_settings(self): if self.MODEL == "GMRS-20V2": val = min(_mem.settings.repsw, len(LIST_REPSW) - 1) - rs = RadioSettingValueList(LIST_REPSW, LIST_REPSW[val]) + rs = RadioSettingValueList(LIST_REPSW, current_index=val) repsw = RadioSetting("settings.repsw", "Repeater SW", rs) basic.append(repsw) model_list = ["KT-8R", "KT-WP12", "WP-9900"] if self.MODEL not in model_list: val = min(_mem.settings.repm, len(LIST_REPM) - 1) - rs = RadioSettingValueList(LIST_REPM, LIST_REPM[val]) + rs = RadioSettingValueList(LIST_REPM, current_index=val) repm = RadioSetting("settings.repm", "Relay condition", rs) basic.append(repm) if self.VENDOR == "BTECH" or self.COLOR_LCD: if self.COLOR_LCD: val = min(_mem.settings.tmrmr, len(LIST_OFF1TO50) - 1) - rs = RadioSettingValueList(LIST_OFF1TO50, LIST_OFF1TO50[val]) + rs = RadioSettingValueList(LIST_OFF1TO50, current_index=val) tmrmr = RadioSetting("settings.tmrmr", "TMR return time", rs) basic.append(tmrmr) else: val = min(_mem.settings.tdrab, len(LIST_OFF1TO50) - 1) - rs = RadioSettingValueList(LIST_OFF1TO50, LIST_OFF1TO50[val]) + rs = RadioSettingValueList(LIST_OFF1TO50, current_index=val) tdrab = RadioSetting("settings.tdrab", "TDR return time", rs) basic.append(tdrab) @@ -1597,24 +1597,24 @@ def get_settings(self): if self.COLOR_LCD4: val = min(_mem.settings.rpste, len(LIST_OFF1TO10) - 1) - rs = RadioSettingValueList(LIST_OFF1TO10, LIST_OFF1TO10[val]) + rs = RadioSettingValueList(LIST_OFF1TO10, current_index=val) rpste = RadioSetting("settings.rpste", "Repeater STE", rs) basic.append(rpste) else: val = min(_mem.settings.rpste, len(LIST_OFF1TO9) - 1) - rs = RadioSettingValueList(LIST_OFF1TO9, LIST_OFF1TO9[val]) + rs = RadioSettingValueList(LIST_OFF1TO9, current_index=val) rpste = RadioSetting("settings.rpste", "Repeater STE", rs) basic.append(rpste) if self.COLOR_LCD4: val = min(_mem.settings.rptdl, len(LIST_OFF1TO60) - 1) - rs = RadioSettingValueList(LIST_OFF1TO60, LIST_OFF1TO60[val]) + rs = RadioSettingValueList(LIST_OFF1TO60, current_index=val) rptdl = RadioSetting("settings.rptdl", "Repeater STE delay", rs) basic.append(rptdl) else: val = min(_mem.settings.rptdl, len(LIST_RPTDL) - 1) - rs = RadioSettingValueList(LIST_RPTDL, LIST_RPTDL[val]) + rs = RadioSettingValueList(LIST_RPTDL, current_index=val) rptdl = RadioSetting("settings.rptdl", "Repeater STE delay", rs) basic.append(rptdl) @@ -1644,12 +1644,12 @@ def get_settings(self): basic.append(mgain) val = min(_mem.settings.skiptx, len(LIST_SKIPTX) - 1) - rs = RadioSettingValueList(LIST_SKIPTX, LIST_SKIPTX[val]) + rs = RadioSettingValueList(LIST_SKIPTX, current_index=val) skiptx = RadioSetting("settings.skiptx", "Skip TX", rs) basic.append(skiptx) val = min(_mem.settings.scmode, len(LIST_SCMODE) - 1) - rs = RadioSettingValueList(LIST_SCMODE, LIST_SCMODE[val]) + rs = RadioSettingValueList(LIST_SCMODE, current_index=val) scmode = RadioSetting("settings.scmode", "Scan mode", rs) basic.append(scmode) @@ -1657,14 +1657,14 @@ def get_settings(self): "GMRS-20V2", "UV-50X2_G2", "GMRS-50V2", "UV-25X2_G2", "UV-25X4_G2"]: val = min(_mem.settings.tmrtx, len(LIST_TMRTX) - 1) - rs = RadioSettingValueList(LIST_TMRTX, LIST_TMRTX[val]) + rs = RadioSettingValueList(LIST_TMRTX, current_index=val) tmrtx = RadioSetting("settings.tmrtx", "TX in multi-standby", rs) basic.append(tmrtx) if self.MODEL in ["UV-50X2_G2", "GMRS-50V2", "UV-25X2_G2", "UV-25X4_G2"]: val = min(_mem.settings.earpho, len(LIST_EARPH) - 1) - rs = RadioSettingValueList(LIST_EARPH, LIST_EARPH[val]) + rs = RadioSettingValueList(LIST_EARPH, current_index=val) earpho = RadioSetting("settings.earpho", "Earphone", rs) basic.append(earpho) @@ -1830,44 +1830,44 @@ def convert_bytes_to_limit(bytes): # Work if self.COLOR_LCD4: val = min(_mem.settings2.dispab, len(LIST_ABC) - 1) - rs = RadioSettingValueList(LIST_ABC, LIST_ABC[val]) + rs = RadioSettingValueList(LIST_ABC, current_index=val) dispab = RadioSetting("settings2.dispab", "Display", rs) work.append(dispab) elif self.COLOR_LCD: val = min(_mem.settings2.dispab, len(LIST_ABCD) - 1) - rs = RadioSettingValueList(LIST_ABCD, LIST_ABCD[val]) + rs = RadioSettingValueList(LIST_ABCD, current_index=val) dispab = RadioSetting("settings2.dispab", "Display", rs) work.append(dispab) else: val = min(_mem.settings2.dispab, len(LIST_AB) - 1) - rs = RadioSettingValueList(LIST_AB, LIST_AB[val]) + rs = RadioSettingValueList(LIST_AB, current_index=val) dispab = RadioSetting("settings2.dispab", "Display", rs) work.append(dispab) if self.COLOR_LCD: val = min(_mem.settings2.vfomra, len(LIST_VFOMR) - 1) - rs = RadioSettingValueList(LIST_VFOMR, LIST_VFOMR[val]) + rs = RadioSettingValueList(LIST_VFOMR, current_index=val) vfomra = RadioSetting("settings2.vfomra", "VFO/MR A mode", rs) work.append(vfomra) val = min(_mem.settings2.vfomrb, len(LIST_VFOMR) - 1) - rs = RadioSettingValueList(LIST_VFOMR, LIST_VFOMR[val]) + rs = RadioSettingValueList(LIST_VFOMR, current_index=val) vfomrb = RadioSetting("settings2.vfomrb", "VFO/MR B mode", rs) work.append(vfomrb) val = min(_mem.settings2.vfomrc, len(LIST_VFOMR) - 1) - rs = RadioSettingValueList(LIST_VFOMR, LIST_VFOMR[val]) + rs = RadioSettingValueList(LIST_VFOMR, current_index=val) vfomrc = RadioSetting("settings2.vfomrc", "VFO/MR C mode", rs) work.append(vfomrc) if not self.COLOR_LCD4: val = min(_mem.settings2.vfomrd, len(LIST_VFOMR) - 1) - rs = RadioSettingValueList(LIST_VFOMR, LIST_VFOMR[val]) + rs = RadioSettingValueList(LIST_VFOMR, current_index=val) vfomrd = RadioSetting("settings2.vfomrd", "VFO/MR D mode", rs) work.append(vfomrd) else: val = min(_mem.settings2.vfomr, len(LIST_VFOMR) - 1) - rs = RadioSettingValueList(LIST_VFOMR, LIST_VFOMR[val]) + rs = RadioSettingValueList(LIST_VFOMR, current_index=val) vfomr = RadioSetting("settings2.vfomr", "VFO/MR mode", rs) work.append(vfomr) @@ -1988,24 +1988,24 @@ def apply_freq(setting, obj): if not self.MODEL == "GMRS-50X1": val = min(_mem.vfo.a.shiftd, len(LIST_SHIFT) - 1) - rs = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[val]) + rs = RadioSettingValueList(LIST_SHIFT, current_index=val) vfoashiftd = RadioSetting("vfo.a.shiftd", "VFO A shift", rs) work.append(vfoashiftd) val = min(_mem.vfo.b.shiftd, len(LIST_SHIFT) - 1) - rs = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[val]) + rs = RadioSettingValueList(LIST_SHIFT, current_index=val) vfobshiftd = RadioSetting("vfo.b.shiftd", "VFO B shift", rs) work.append(vfobshiftd) if self.COLOR_LCD: val = min(_mem.vfo.c.shiftd, len(LIST_SHIFT) - 1) - rs = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[val]) + rs = RadioSettingValueList(LIST_SHIFT, current_index=val) vfocshiftd = RadioSetting("vfo.c.shiftd", "VFO C shift", rs) work.append(vfocshiftd) if not self.COLOR_LCD4: val = min(_mem.vfo.d.shiftd, len(LIST_SHIFT) - 1) - rs = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[val]) + rs = RadioSettingValueList(LIST_SHIFT, current_index=val) vfodshiftd = RadioSetting("vfo.d.shiftd", "VFO D shift", rs) work.append(vfodshiftd) @@ -2074,116 +2074,116 @@ def apply_offset(setting, obj): if not self.MODEL == "GMRS-50X1": val = min(_mem.vfo.a.power, len(LIST_TXP) - 1) - rs = RadioSettingValueList(LIST_TXP, LIST_TXP[val]) + rs = RadioSettingValueList(LIST_TXP, current_index=val) vfoatxp = RadioSetting("vfo.a.power", "VFO A power", rs) work.append(vfoatxp) val = min(_mem.vfo.b.power, len(LIST_TXP) - 1) - rs = RadioSettingValueList(LIST_TXP, LIST_TXP[val]) + rs = RadioSettingValueList(LIST_TXP, current_index=val) vfobtxp = RadioSetting("vfo.b.power", "VFO B power", rs) work.append(vfobtxp) if self.COLOR_LCD: val = min(_mem.vfo.c.power, len(LIST_TXP) - 1) - rs = RadioSettingValueList(LIST_TXP, LIST_TXP[val]) + rs = RadioSettingValueList(LIST_TXP, current_index=val) vfoctxp = RadioSetting("vfo.c.power", "VFO C power", rs) work.append(vfoctxp) if not self.COLOR_LCD4: val = min(_mem.vfo.d.power, len(LIST_TXP) - 1) - rs = RadioSettingValueList(LIST_TXP, LIST_TXP[val]) + rs = RadioSettingValueList(LIST_TXP, current_index=val) vfodtxp = RadioSetting("vfo.d.power", "VFO D power", rs) work.append(vfodtxp) if not self.MODEL == "GMRS-50X1": val = min(_mem.vfo.a.wide, len(LIST_WIDE) - 1) - rs = RadioSettingValueList(LIST_WIDE, LIST_WIDE[val]) + rs = RadioSettingValueList(LIST_WIDE, current_index=val) vfoawide = RadioSetting("vfo.a.wide", "VFO A bandwidth", rs) work.append(vfoawide) val = min(_mem.vfo.b.wide, len(LIST_WIDE) - 1) - rs = RadioSettingValueList(LIST_WIDE, LIST_WIDE[val]) + rs = RadioSettingValueList(LIST_WIDE, current_index=val) vfobwide = RadioSetting("vfo.b.wide", "VFO B bandwidth", rs) work.append(vfobwide) if self.COLOR_LCD: val = min(_mem.vfo.c.wide, len(LIST_WIDE) - 1) - rs = RadioSettingValueList(LIST_WIDE, LIST_WIDE[val]) + rs = RadioSettingValueList(LIST_WIDE, current_index=val) vfocwide = RadioSetting("vfo.c.wide", "VFO C bandwidth", rs) work.append(vfocwide) if not self.COLOR_LCD4: val = min(_mem.vfo.d.wide, len(LIST_WIDE) - 1) - rs = RadioSettingValueList(LIST_WIDE, LIST_WIDE[val]) + rs = RadioSettingValueList(LIST_WIDE, current_index=val) vfodwide = RadioSetting("vfo.d.wide", "VFO D bandwidth", rs) work.append(vfodwide) val = min(_mem.vfo.a.step, len(LIST_STEP) - 1) - rs = RadioSettingValueList(LIST_STEP, LIST_STEP[val]) + rs = RadioSettingValueList(LIST_STEP, current_index=val) vfoastep = RadioSetting("vfo.a.step", "VFO A step", rs) work.append(vfoastep) val = min(_mem.vfo.b.step, len(LIST_STEP) - 1) - rs = RadioSettingValueList(LIST_STEP, LIST_STEP[val]) + rs = RadioSettingValueList(LIST_STEP, current_index=val) vfobstep = RadioSetting("vfo.b.step", "VFO B step", rs) work.append(vfobstep) if self.COLOR_LCD: val = min(_mem.vfo.c.step, len(LIST_STEP) - 1) - rs = RadioSettingValueList(LIST_STEP, LIST_STEP[val]) + rs = RadioSettingValueList(LIST_STEP, current_index=val) vfocstep = RadioSetting("vfo.c.step", "VFO C step", rs) work.append(vfocstep) if not self.COLOR_LCD4: val = min(_mem.vfo.d.step, len(LIST_STEP) - 1) - rs = RadioSettingValueList(LIST_STEP, LIST_STEP[val]) + rs = RadioSettingValueList(LIST_STEP, current_index=val) vfodstep = RadioSetting("vfo.d.step", "VFO D step", rs) work.append(vfodstep) val = min(_mem.vfo.a.optsig, len(OPTSIG_LIST) - 1) - rs = RadioSettingValueList(OPTSIG_LIST, OPTSIG_LIST[val]) + rs = RadioSettingValueList(OPTSIG_LIST, current_index=val) vfoaoptsig = RadioSetting("vfo.a.optsig", "VFO A optional signal", rs) work.append(vfoaoptsig) val = min(_mem.vfo.b.optsig, len(OPTSIG_LIST) - 1) - rs = RadioSettingValueList(OPTSIG_LIST, OPTSIG_LIST[val]) + rs = RadioSettingValueList(OPTSIG_LIST, current_index=val) vfoboptsig = RadioSetting("vfo.b.optsig", "VFO B optional signal", rs) work.append(vfoboptsig) if self.COLOR_LCD: val = min(_mem.vfo.c.optsig, len(OPTSIG_LIST) - 1) - rs = RadioSettingValueList(OPTSIG_LIST, OPTSIG_LIST[val]) + rs = RadioSettingValueList(OPTSIG_LIST, current_index=val) vfocoptsig = RadioSetting("vfo.c.optsig", "VFO C optional signal", rs) work.append(vfocoptsig) if not self.COLOR_LCD4: val = min(_mem.vfo.d.optsig, len(OPTSIG_LIST) - 1) - rs = RadioSettingValueList(OPTSIG_LIST, OPTSIG_LIST[val]) + rs = RadioSettingValueList(OPTSIG_LIST, current_index=val) vfodoptsig = RadioSetting("vfo.d.optsig", "VFO D optional signal", rs) work.append(vfodoptsig) val = min(_mem.vfo.a.spmute, len(SPMUTE_LIST) - 1) - rs = RadioSettingValueList(SPMUTE_LIST, SPMUTE_LIST[val]) + rs = RadioSettingValueList(SPMUTE_LIST, current_index=val) vfoaspmute = RadioSetting("vfo.a.spmute", "VFO A speaker mute", rs) work.append(vfoaspmute) val = min(_mem.vfo.b.spmute, len(SPMUTE_LIST) - 1) - rs = RadioSettingValueList(SPMUTE_LIST, SPMUTE_LIST[val]) + rs = RadioSettingValueList(SPMUTE_LIST, current_index=val) vfobspmute = RadioSetting("vfo.b.spmute", "VFO B speaker mute", rs) work.append(vfobspmute) if self.COLOR_LCD: val = min(_mem.vfo.c.spmute, len(SPMUTE_LIST) - 1) - rs = RadioSettingValueList(SPMUTE_LIST, SPMUTE_LIST[val]) + rs = RadioSettingValueList(SPMUTE_LIST, current_index=val) vfocspmute = RadioSetting("vfo.c.spmute", "VFO C speaker mute", rs) work.append(vfocspmute) if not self.COLOR_LCD4: val = min(_mem.vfo.d.spmute, len(SPMUTE_LIST) - 1) - rs = RadioSettingValueList(SPMUTE_LIST, SPMUTE_LIST[val]) + rs = RadioSettingValueList(SPMUTE_LIST, current_index=val) vfodspmute = RadioSetting("vfo.d.spmute", "VFO D speaker mute", rs) work.append(vfodspmute) @@ -2209,31 +2209,31 @@ def apply_offset(setting, obj): if not self.MODEL == "GMRS-50X1": val = min(_mem.vfo.a.scode, len(PTTIDCODE_LIST) - 1) - rs = RadioSettingValueList(PTTIDCODE_LIST, PTTIDCODE_LIST[val]) + rs = RadioSettingValueList(PTTIDCODE_LIST, current_index=val) vfoascode = RadioSetting("vfo.a.scode", "VFO A PTT-ID", rs) work.append(vfoascode) val = min(_mem.vfo.b.scode, len(PTTIDCODE_LIST) - 1) - rs = RadioSettingValueList(PTTIDCODE_LIST, PTTIDCODE_LIST[val]) + rs = RadioSettingValueList(PTTIDCODE_LIST, current_index=val) vfobscode = RadioSetting("vfo.b.scode", "VFO B PTT-ID", rs) work.append(vfobscode) if self.COLOR_LCD: val = min(_mem.vfo.c.scode, len(PTTIDCODE_LIST) - 1) - rs = RadioSettingValueList(PTTIDCODE_LIST, PTTIDCODE_LIST[val]) + rs = RadioSettingValueList(PTTIDCODE_LIST, current_index=val) vfocscode = RadioSetting("vfo.c.scode", "VFO C PTT-ID", rs) work.append(vfocscode) if not self.COLOR_LCD4: val = min(_mem.vfo.d.scode, len(PTTIDCODE_LIST) - 1) rs = RadioSettingValueList(PTTIDCODE_LIST, - PTTIDCODE_LIST[val]) + current_index=val) vfodscode = RadioSetting("vfo.d.scode", "VFO D PTT-ID", rs) work.append(vfodscode) if not self.MODEL == "GMRS-50X1": val = min(_mem.settings.pttid, len(PTTID_LIST) - 1) - rs = RadioSettingValueList(PTTID_LIST, PTTID_LIST[val]) + rs = RadioSettingValueList(PTTID_LIST, current_index=val) pttid = RadioSetting("settings.pttid", "PTT ID", rs) work.append(pttid) @@ -2314,8 +2314,7 @@ def apply_fm_freq(setting, obj): "dtmf_settings.dtmfspeed_on", "DTMF Speed (On Time)", RadioSettingValueList(LIST_DTMF_SPEED, - LIST_DTMF_SPEED[ - val])) + current_index=val)) dtmf_enc_settings.append(dtmfspeed_on) if _mem.dtmf_settings.dtmfspeed_off > 0x0F: @@ -2326,8 +2325,7 @@ def apply_fm_freq(setting, obj): "dtmf_settings.dtmfspeed_off", "DTMF Speed (Off Time)", RadioSettingValueList(LIST_DTMF_SPEED, - LIST_DTMF_SPEED[ - val])) + current_index=val)) dtmf_enc_settings.append(dtmfspeed_off) def memory2string(dmtf_mem): @@ -2516,7 +2514,7 @@ def apply_dmtf_listvalue(setting, obj): "dtmf_settings.groupcode", "Group Code", RadioSettingValueList(LIST_DTMF_SPECIAL_DIGITS, - LIST_DTMF_SPECIAL_DIGITS[idx])) + current_index=idx)) line.set_apply_callback(apply_dmtf_listvalue, _mem.dtmf_settings.groupcode) dtmf_dec_settings.append(line) @@ -2530,7 +2528,7 @@ def apply_dmtf_listvalue(setting, obj): "dtmf_settings.spacecode", "Space Code", RadioSettingValueList(LIST_DTMF_SPECIAL_DIGITS, - LIST_DTMF_SPECIAL_DIGITS[idx])) + current_index=idx)) line.set_apply_callback(apply_dmtf_listvalue, _mem.dtmf_settings.spacecode) dtmf_dec_settings.append(line) @@ -2544,8 +2542,7 @@ def apply_dmtf_listvalue(setting, obj): "dtmf_settings.resettime", "Reset time", RadioSettingValueList(LIST_5TONE_RESET_COLOR, - LIST_5TONE_RESET_COLOR[ - val])) + current_index=val)) dtmf_dec_settings.append(line) else: if _mem.dtmf_settings.resettime > 0x4F: @@ -2556,8 +2553,7 @@ def apply_dmtf_listvalue(setting, obj): "dtmf_settings.resettime", "Reset time", RadioSettingValueList(LIST_5TONE_RESET, - LIST_5TONE_RESET[ - val])) + current_index=val)) dtmf_dec_settings.append(line) if _mem.dtmf_settings.delayproctime > 0x27: @@ -2568,8 +2564,7 @@ def apply_dmtf_listvalue(setting, obj): "dtmf_settings.delayproctime", "Delay processing time", RadioSettingValueList(LIST_DTMF_DELAY, - LIST_DTMF_DELAY[ - val])) + current_index=val)) dtmf_dec_settings.append(line) # 5 Tone Settings @@ -2604,7 +2599,7 @@ def apply_list_value(setting, obj): "_5tone_std_settings_" + str(i) + "_period", "Period (ms)", RadioSettingValueList (LIST_5TONE_STANDARD_PERIODS, - LIST_5TONE_STANDARD_PERIODS[period])) + current_index=period)) line.set_apply_callback(apply_list_value, standard.period) std_5tone.append(line) else: @@ -2621,8 +2616,7 @@ def apply_list_value(setting, obj): "_5tone_std_settings_" + str(i) + "_grouptone", "Group Tone", RadioSettingValueList(LIST_5TONE_DIGITS, - LIST_5TONE_DIGITS[ - group_tone])) + current_index=group_tone)) line.set_apply_callback(apply_list_value, standard.group_tone) std_5tone.append(line) @@ -2640,8 +2634,7 @@ def apply_list_value(setting, obj): "_5tone_std_settings_" + str(i) + "_repttone", "Repeat Tone", RadioSettingValueList(LIST_5TONE_DIGITS, - LIST_5TONE_DIGITS[ - repeat_tone])) + current_index=repeat_tone)) line.set_apply_callback(apply_list_value, standard.repeat_tone) std_5tone.append(line) @@ -2703,11 +2696,10 @@ def frame2string(frame): currentVal = 15 else: currentVal = code.standard - line = RadioSetting("_5tone_code_" + str(i) + "_std", - " Standard", - RadioSettingValueList(LIST_5TONE_STANDARDS, - LIST_5TONE_STANDARDS[ - currentVal])) + line = RadioSetting( + "_5tone_code_" + str(i) + "_std", " Standard", + RadioSettingValueList( + LIST_5TONE_STANDARDS, current_index=currentVal)) line.set_apply_callback(my_apply_5tonestdlist_value, code.standard) code_5tone.append(line) @@ -2787,8 +2779,7 @@ def frame2string(frame): "5 Tone-decode Standard", RadioSettingValueList( LIST_5TONE_STANDARDS_without_none, - LIST_5TONE_STANDARDS_without_none[ - decode_standard])) + current_index=decode_standard)) group_5tone.append(line) else: LOG.debug("Invalid decode std...") @@ -2799,8 +2790,7 @@ def frame2string(frame): if _5tone_delay1 <= len(LIST_5TONE_DELAY): list = RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - _5tone_delay1]) + current_index=_5tone_delay1) line = RadioSetting("_5tone_settings._5tone_delay1", "5 Tone Delay Frame 1", list) group_5tone.append(line) @@ -2815,8 +2805,7 @@ def frame2string(frame): if _5tone_delay2 <= len(LIST_5TONE_DELAY): list = RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - _5tone_delay2]) + current_index=_5tone_delay2) line = RadioSetting("_5tone_settings._5tone_delay2", "5 Tone Delay Frame 2", list) group_5tone.append(line) @@ -2830,8 +2819,7 @@ def frame2string(frame): if _5tone_delay3 <= len(LIST_5TONE_DELAY): list = RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - _5tone_delay3]) + current_index=_5tone_delay3) line = RadioSetting("_5tone_settings._5tone_delay3", "5 Tone Delay Frame 3", list) group_5tone.append(line) @@ -2846,8 +2834,7 @@ def frame2string(frame): if ext_length <= len(LIST_5TONE_DELAY): list = RadioSettingValueList( LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - ext_length]) + current_index=ext_length) line = RadioSetting( "_5tone_settings._5tone_first_digit_ext_length", "First digit extend length", list) @@ -2862,8 +2849,7 @@ def frame2string(frame): if decode_reset_time <= len(LIST_5TONE_RESET): list = RadioSettingValueList( LIST_5TONE_RESET, - LIST_5TONE_RESET[ - decode_reset_time]) + current_index=decode_reset_time) line = RadioSetting("_5tone_settings.decode_reset_time", "Decode reset time", list) group_5tone.append(line) @@ -2885,8 +2871,7 @@ def frame2string(frame): if duration_1st_tone <= len(LIST_5TONE_DELAY): val = RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - duration_1st_tone]) + current_index=duration_1st_tone) line = RadioSetting("_2tone.duration_1st_tone", "Duration 1st Tone", val) encode_2tone.append(line) @@ -2899,8 +2884,7 @@ def frame2string(frame): if duration_2nd_tone <= len(LIST_5TONE_DELAY): val = RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - duration_2nd_tone]) + current_index=duration_2nd_tone) line = RadioSetting("_2tone.duration_2nd_tone", "Duration 2nd Tone", val) encode_2tone.append(line) @@ -2912,10 +2896,10 @@ def frame2string(frame): duration_gap = 30 if duration_gap <= len(LIST_5TONE_DELAY): - line = RadioSetting("_2tone.duration_gap", "Duration of gap", - RadioSettingValueList(LIST_5TONE_DELAY, - LIST_5TONE_DELAY[ - duration_gap])) + line = RadioSetting( + "_2tone.duration_gap", "Duration of gap", + RadioSettingValueList( + LIST_5TONE_DELAY, current_index=duration_gap)) encode_2tone.append(line) def _2tone_validate(value): @@ -2970,8 +2954,7 @@ def apply_2tone_freq(setting, obj): if decode_reset_time <= len(LIST_5TONE_RESET): list = RadioSettingValueList( LIST_5TONE_RESET, - LIST_5TONE_RESET[ - decode_reset_time]) + current_index=decode_reset_time) line = RadioSetting("_2tone.reset_time", "Decode reset time", list) decode_2tone.append(line) @@ -3015,7 +2998,7 @@ def apply_2tone_freq_pair(setting, obj): "_2tone_dec_settings_" + str(i) + "_dec_" + str(j), "Dec " + str(j), RadioSettingValueList (LIST_2TONE_DEC, - LIST_2TONE_DEC[val])) + current_index=val)) line.set_apply_callback(apply_list_value, dec.dec) _2tone_dec_code.append(line) else: @@ -3034,7 +3017,7 @@ def apply_2tone_freq_pair(setting, obj): str(i) + "_resp_" + str(j), "Response " + str(j), RadioSettingValueList (LIST_2TONE_RESPONSE, - LIST_2TONE_RESPONSE[val])) + current_index=val)) line.set_apply_callback(apply_list_value, dec.response) _2tone_dec_code.append(line) else: @@ -3054,7 +3037,7 @@ def apply_2tone_freq_pair(setting, obj): str(i) + "_alert_" + str(j), "Alert " + str(j), RadioSettingValueList (PTTIDCODE_LIST, - PTTIDCODE_LIST[val])) + current_index=val)) line.set_apply_callback(apply_list_value, dec.alert) _2tone_dec_code.append(line) else: diff --git a/chirp/drivers/fd268.py b/chirp/drivers/fd268.py index 455832cd..39ea7c2e 100644 --- a/chirp/drivers/fd268.py +++ b/chirp/drivers/fd268.py @@ -507,27 +507,23 @@ def get_settings(self): # Basic sql = RadioSetting("settings.sql", "Squelch Level", - RadioSettingValueList(LIST_SQL, LIST_SQL[ - _mem.settings.sql])) + RadioSettingValueList(LIST_SQL, current_index=_mem.settings.sql)) basic.append(sql) tot = RadioSetting("settings.tot", "Time out timer", - RadioSettingValueList(LIST_TOT, LIST_TOT[ - _mem.settings.tot])) + RadioSettingValueList(LIST_TOT, current_index=_mem.settings.tot)) basic.append(tot) key_lock = RadioSetting("settings.key", "Keyboard Lock", - RadioSettingValueList(KEY_LOCK, KEY_LOCK[ - _mem.settings.key])) + RadioSettingValueList(KEY_LOCK, current_index=_mem.settings.key)) basic.append(key_lock) bw = RadioSetting("settings.bw", "Bandwidth", - RadioSettingValueList(BW, BW[_mem.settings.bw])) + RadioSettingValueList(BW, current_index=_mem.settings.bw)) basic.append(bw) powerrank = RadioSetting("settings.powerrank", "Power output adjust", - RadioSettingValueList(POWER_RANK, POWER_RANK[ - _mem.settings.powerrank])) + RadioSettingValueList(POWER_RANK, current_index=_mem.settings.powerrank)) basic.append(powerrank) lamp = RadioSetting("settings.lamp", "LCD Lamp", @@ -554,17 +550,15 @@ def get_settings(self): # Work mode settings wmset = RadioSetting("settings.wmem", "VFO/MR Mode", RadioSettingValueList( - W_MODE, W_MODE[_mem.settings.wmem])) + W_MODE, current_index=_mem.settings.wmem)) work.append(wmset) power = RadioSetting("settings.power", "Actual Power", - RadioSettingValueList(POWER_LEVELS, POWER_LEVELS[ - _mem.settings.power])) + RadioSettingValueList(POWER_LEVELS, current_index=_mem.settings.power)) work.append(power) active_ch = RadioSetting("settings.active_ch", "Work Channel", - RadioSettingValueList(ACTIVE_CH, ACTIVE_CH[ - _mem.settings.active_ch])) + RadioSettingValueList(ACTIVE_CH, current_index=_mem.settings.active_ch)) work.append(active_ch) # vfo rx validation @@ -598,7 +592,7 @@ def apply_freq(setting, obj): sset = 2 shift = RadioSetting("none.shift", "VFO Shift", - RadioSettingValueList(VSHIFT, VSHIFT[sset])) + RadioSettingValueList(VSHIFT, current_index=sset)) work.append(shift) # vfo shift validation if none set it to ZERO @@ -616,15 +610,13 @@ def apply_freq(setting, obj): work.append(offset) step = RadioSetting("settings", "VFO step", - RadioSettingValueList(STEPF, STEPF[ - _mem.settings.step])) + RadioSettingValueList(STEPF, current_index=_mem.settings.step)) work.append(step) # FD-288 Family ANI settings if "FD-288" in self.MODEL: ani_mode = RadioSetting("ani_mode", "ANI ID", - RadioSettingValueList(ANI, ANI[ - _mem.settings.ani_mode])) + RadioSettingValueList(ANI, current_index=_mem.settings.ani_mode)) work.append(ani_mode) # it can't be \xFF diff --git a/chirp/drivers/ft1d.py b/chirp/drivers/ft1d.py index 4882766e..6d1836a0 100644 --- a/chirp/drivers/ft1d.py +++ b/chirp/drivers/ft1d.py @@ -1329,7 +1329,7 @@ def _get_aprs_general_settings(self): if aprs.custom_symbol >= len(chirp_common.APRS_SYMBOLS): symbols.append("%d" % aprs.custom_symbol) selected = len(symbols) - 1 - val = RadioSettingValueList(symbols, symbols[selected]) + val = RadioSettingValueList(symbols, current_index=selected) rs = RadioSetting("aprs.custom_symbol_text", "User Selected Symbol", val) rs.set_apply_callback(self.apply_custom_symbol, aprs) @@ -1360,7 +1360,7 @@ def _get_aprs_general_settings(self): # position_str[1] = "%s %s" % (latitude, longitude) # position_str[2] = "%s %s" % (latitude, longitude) val = RadioSettingValueList(position_str, - position_str[aprs.selected_position]) + current_index=aprs.selected_position) rs = RadioSetting("aprs.selected_position", "My Position", val) menu.append(rs) @@ -1685,8 +1685,8 @@ def _get_aprs_tx_settings(self): rs.set_apply_callback(self.apply_ff_padded_string, self._memobj.aprs_beacon_status_txt[index]) menu.append(rs) - val = RadioSettingValueList(desc, - desc[aprs.selected_beacon_status_txt]) + val = RadioSettingValueList( + desc, current_index=aprs.selected_beacon_status_txt) rs = RadioSetting("aprs.selected_beacon_status_txt", "Beacon Status Text", val) menu.append(rs) @@ -1745,7 +1745,7 @@ def _get_aprs_tx_settings(self): path_str[6] = self._DIGI_PATHS[6] path_str[7] = self._DIGI_PATHS[7] val = RadioSettingValueList(path_str, - path_str[aprs.selected_digi_path]) + current_index=aprs.selected_digi_path) rs = RadioSetting("aprs.selected_digi_path", "Selected Digi Path", val) menu.append(rs) diff --git a/chirp/drivers/ft2900.py b/chirp/drivers/ft2900.py index 11401552..cf23501b 100644 --- a/chirp/drivers/ft2900.py +++ b/chirp/drivers/ft2900.py @@ -741,53 +741,57 @@ def get_settings(self): misc.append( RadioSetting( "apo", "Automatic Power Off", - RadioSettingValueList(opts, opts[_settings.apo]))) + RadioSettingValueList(opts, current_index=_settings.apo))) # 2 AR.BEP opts = ["Off", "In Range", "Always"] arts.append( RadioSetting( "arts_beep", "ARTS Beep", - RadioSettingValueList(opts, opts[_settings.arts_beep]))) + RadioSettingValueList( + opts, current_index=_settings.arts_beep))) # 3 AR.INT opts = ["15 Sec", "25 Sec"] arts.append( RadioSetting( "arts_interval", "ARTS Polling Interval", - RadioSettingValueList(opts, opts[_settings.arts_interval]))) + RadioSettingValueList( + opts, current_index=_settings.arts_interval))) # 4 ARS opts = ["Off", "On"] repeater.append( RadioSetting( "ars", "Automatic Repeater Shift", - RadioSettingValueList(opts, opts[_settings.ars]))) + RadioSettingValueList(opts, current_index=_settings.ars))) # 5 BCLO opts = ["Off", "On"] misc.append(RadioSetting( "busy_lockout", "Busy Channel Lock-Out", - RadioSettingValueList(opts, opts[_settings.busy_lockout]))) + RadioSettingValueList(opts, current_index=_settings.busy_lockout))) # 6 BEEP opts = ["Off", "Key+Scan", "Key"] switch.append(RadioSetting( "beep", "Enable the Beeper", - RadioSettingValueList(opts, opts[_settings.beep]))) + RadioSettingValueList(opts, current_index=_settings.beep))) # 7 BELL opts = ["Off", "1", "3", "5", "8", "Continuous"] - ctcss.append(RadioSetting("bell", "Bell Repetitions", - RadioSettingValueList(opts, opts[ - _settings.bell]))) + ctcss.append( + RadioSetting( + "bell", "Bell Repetitions", + RadioSettingValueList( + opts, current_index=_settings.bell))) # 8 BNK.LNK for i in range(0, 8): opts = ["Off", "On"] mbs = (self._memobj.mbs >> i) & 1 rs = RadioSetting("mbs%i" % i, "Bank %s Scan" % (i + 1), - RadioSettingValueList(opts, opts[mbs])) + RadioSettingValueList(opts, current_index=mbs)) def apply_mbs(s, index): if int(s.value): @@ -803,9 +807,11 @@ def apply_mbs(s, index): # 11 CW.ID opts = ["Off", "On"] - arts.append(RadioSetting("cw_id", "CW ID Enable", - RadioSettingValueList(opts, opts[ - _settings.cw_id]))) + arts.append( + RadioSetting( + "cw_id", "CW ID Enable", + RadioSettingValueList( + opts, current_index=_settings.cw_id))) cw_id_text = "" for i in _settings.cw_id_string: @@ -834,17 +840,19 @@ def apply_cw_id(s): opts = ["Off", "4WPM", "5WPM", "6WPM", "7WPM", "8WPM", "9WPM", "10WPM", "11WPM", "12WPM", "13WPM", "15WPM", "17WPM", "20WPM", "24WPM", "30WPM", "40WPM"] - misc.append(RadioSetting("cw_trng", "CW Training", - RadioSettingValueList(opts, opts[ - _settings.cw_trng]))) + misc.append( + RadioSetting( + "cw_trng", "CW Training", + RadioSettingValueList( + opts, current_index=_settings.cw_trng))) # todo: make the setting of the units here affect the display # of the speed. Not critical, but would be slick. opts = ["CPM", "WPM"] misc.append(RadioSetting("cw_trng_units", "CW Training Units", RadioSettingValueList(opts, - opts[_settings. - cw_trng_units]))) + current_index=_settings. + cw_trng_units))) # 13 DC VLT - a read-only status, so nothing to do here @@ -852,32 +860,32 @@ def apply_cw_id(s): # 15 DCS.RV opts = ["Disabled", "Enabled"] - ctcss.append(RadioSetting( - "inverted_dcs", - "\"Inverted\" DCS Code Decoding", - RadioSettingValueList(opts, - opts[_settings.inverted_dcs]))) + ctcss.append( + RadioSetting( + "inverted_dcs", "\"Inverted\" DCS Code Decoding", + RadioSettingValueList( + opts, current_index=_settings.inverted_dcs))) # 16 DIMMER opts = ["Off"] + ["Level %d" % (x) for x in range(1, 11)] disp.append(RadioSetting("dimmer", "Dimmer", RadioSettingValueList(opts, - opts[_settings - .dimmer]))) + current_index=_settings + .dimmer))) # 17 DT.A/M opts = ["Manual", "Auto"] dtmf.append(RadioSetting("dtmf_mode", "DTMF Autodialer", RadioSettingValueList(opts, - opts[_settings - .dtmf_mode]))) + current_index=_settings + .dtmf_mode))) # 18 DT.DLY opts = ["50 ms", "250 ms", "450 ms", "750 ms", "1000 ms"] dtmf.append(RadioSetting("dtmf_delay", "DTMF Autodialer Delay Time", RadioSettingValueList(opts, - opts[_settings - .dtmf_delay]))) + current_index=_settings + .dtmf_delay))) # 19 DT.SET for memslot in range(0, 10): @@ -912,66 +920,69 @@ def apply_dtmf(s, i): dtmf.append(RadioSetting("dtmf_speed", "DTMF Autodialer Sending Speed", RadioSettingValueList(opts, - opts[_settings. - dtmf_speed]))) + current_index=_settings. + dtmf_speed))) # 21 EDG.BEP opts = ["Off", "On"] mbls.append(RadioSetting("edge_beep", "Band Edge Beeper", RadioSettingValueList(opts, - opts[_settings. - edge_beep]))) + current_index=_settings. + edge_beep))) # 22 INT.CD opts = ["DTMF %X" % (x) for x in range(0, 16)] - wires.append(RadioSetting("int_cd", "Access Number for WiRES(TM)", - RadioSettingValueList(opts, opts[ - _settings.int_cd]))) + wires.append( + RadioSetting( + "int_cd", "Access Number for WiRES(TM)", + RadioSettingValueList( + opts, current_index=_settings.int_cd))) # 23 ING MD opts = ["Sister Radio Group", "Friends Radio Group"] - wires.append(RadioSetting("wires_mode", - "Internet Link Connection Mode", - RadioSettingValueList(opts, - opts[_settings. - wires_mode]))) + wires.append( + RadioSetting( + "wires_mode", "Internet Link Connection Mode", + RadioSettingValueList( + opts, current_index=_settings.wires_mode))) # 24 INT.A/M opts = ["Manual", "Auto"] wires.append(RadioSetting("wires_auto", "Internet Link Autodialer", RadioSettingValueList(opts, - opts[_settings - .wires_auto]))) + current_index=_settings + .wires_auto))) # 25 INT.SET opts = ["F%d" % (x) for x in range(0, 10)] wires.append(RadioSetting("int_set", "Memory Register for " "non-WiRES Internet", RadioSettingValueList(opts, - opts[_settings - .int_set]))) + current_index=_settings + .int_set))) # 26 LOCK opts = ["Key", "Dial", "Key + Dial", "PTT", "Key + PTT", "Dial + PTT", "All"] - switch.append(RadioSetting("lock", "Control Locking", - RadioSettingValueList(opts, - opts[_settings - .lock]))) + switch.append( + RadioSetting( + "lock", "Control Locking", + RadioSettingValueList( + opts, current_index=_settings.lock))) # 27 MCGAIN opts = ["Level %d" % (x) for x in range(1, 10)] misc.append(RadioSetting("mic_gain", "Microphone Gain", RadioSettingValueList(opts, - opts[_settings - .mic_gain]))) + current_index=_settings + .mic_gain))) # 28 MEM.SCN opts = ["Tag 1", "Tag 2", "All Channels"] rs = RadioSetting("scan_mode", "Memory Scan Mode", RadioSettingValueList(opts, - opts[_settings - .scan_mode - 1])) + current_index=_settings + .scan_mode - 1)) # this setting is unusual in that it starts at 1 instead of 0. # that is, index 1 corresponds to "Tag 1", and index 0 is invalid. # so we create a custom callback to handle this. @@ -986,8 +997,8 @@ def apply_scan_mode(s): opts = ["Lower", "Next"] mbls.append(RadioSetting("mw_mode", "Memory Write Mode", RadioSettingValueList(opts, - opts[_settings - .mw_mode]))) + current_index=_settings + .mw_mode))) # 30 NM SET - This is per channel, so nothing to do here @@ -995,8 +1006,8 @@ def apply_scan_mode(s): opts = ["Off", "DC Supply Voltage", "Text Message"] disp.append(RadioSetting("open_msg", "Opening Message Type", RadioSettingValueList(opts, - opts[_settings. - open_msg]))) + current_index=_settings. + open_msg))) openmsg = "" for i in _settings.openMsg_Text: @@ -1027,32 +1038,32 @@ def apply_openmsg(s): opts = ["Off", "On"] ctcss.append(RadioSetting("pag_abk", "Paging Answer Back", RadioSettingValueList(opts, - opts[_settings - .pag_abk]))) + current_index=_settings + .pag_abk))) # 34 PAG.CDR opts = ["%2.2d" % (x) for x in range(1, 50)] ctcss.append(RadioSetting("pag_cdr_1", "Receive Page Code 1", RadioSettingValueList(opts, - opts[_settings - .pag_cdr_1]))) + current_index=_settings + .pag_cdr_1))) ctcss.append(RadioSetting("pag_cdr_2", "Receive Page Code 2", RadioSettingValueList(opts, - opts[_settings - .pag_cdr_2]))) + current_index=_settings + .pag_cdr_2))) # 35 PAG.CDT opts = ["%2.2d" % (x) for x in range(1, 50)] ctcss.append(RadioSetting("pag_cdt_1", "Transmit Page Code 1", RadioSettingValueList(opts, - opts[_settings - .pag_cdt_1]))) + current_index=_settings + .pag_cdt_1))) ctcss.append(RadioSetting("pag_cdt_2", "Transmit Page Code 2", RadioSettingValueList(opts, - opts[_settings - .pag_cdt_2]))) + current_index=_settings + .pag_cdt_2))) # Common Button Options button_opts = ["Squelch Off", "Weather", "Smart Search", @@ -1062,25 +1073,25 @@ def apply_openmsg(s): opts = button_opts + ["DC Volts"] switch.append(RadioSetting( "prog_p1", "P1 Button", - RadioSettingValueList(opts, opts[_settings.prog_p1]))) + RadioSettingValueList(opts, current_index=_settings.prog_p1))) # 37 PRG P2 opts = button_opts + ["Dimmer"] switch.append(RadioSetting( "prog_p2", "P2 Button", - RadioSettingValueList(opts, opts[_settings.prog_p2]))) + RadioSettingValueList(opts, current_index=_settings.prog_p2))) # 38 PRG P3 opts = button_opts + ["Mic Gain"] switch.append(RadioSetting( "prog_p3", "P3 Button", - RadioSettingValueList(opts, opts[_settings.prog_p3]))) + RadioSettingValueList(opts, current_index=_settings.prog_p3))) # 39 PRG P4 opts = button_opts + ["Skip"] switch.append(RadioSetting( "prog_p4", "P4 Button", - RadioSettingValueList(opts, opts[_settings.prog_p4]))) + RadioSettingValueList(opts, current_index=_settings.prog_p4))) # 40 PSWD password = "" @@ -1108,29 +1119,37 @@ def apply_password(s): # 41 RESUME opts = ["3 Sec", "5 Sec", "10 Sec", "Busy", "Hold"] - scan.append(RadioSetting("resume", "Scan Resume Mode", - RadioSettingValueList(opts, opts[ - _settings.resume]))) + scan.append( + RadioSetting( + "resume", "Scan Resume Mode", + RadioSettingValueList( + opts, current_index=_settings.resume))) # 42 RF.SQL opts = ["Off"] + ["S-%d" % (x) for x in range(1, 10)] - misc.append(RadioSetting("rf_sql", "RF Squelch Threshold", - RadioSettingValueList(opts, opts[ - _settings.rf_sql]))) + misc.append( + RadioSetting( + "rf_sql", "RF Squelch Threshold", + RadioSettingValueList( + opts, current_index=_settings.rf_sql))) # 43 RPT - per channel attribute, nothing to do here # 44 RVRT opts = ["Off", "On"] - misc.append(RadioSetting("revert", "Priority Revert", - RadioSettingValueList(opts, opts[ - _settings.revert]))) + misc.append( + RadioSetting( + "revert", "Priority Revert", + RadioSettingValueList( + opts, current_index=_settings.revert))) # 45 S.SRCH opts = ["Single", "Continuous"] - misc.append(RadioSetting("s_search", "Smart Search Sweep Mode", - RadioSettingValueList(opts, opts[ - _settings.s_search]))) + misc.append( + RadioSetting( + "s_search", "Smart Search Sweep Mode", + RadioSettingValueList( + opts, current_index=_settings.s_search))) # 46 SHIFT - per channel setting, nothing to do here @@ -1148,42 +1167,48 @@ def apply_password(s): # 53 TOT opts = ["Off", "1 Min", "3 Min", "5 Min", "10 Min"] - misc.append(RadioSetting("tot", "Timeout Timer", - RadioSettingValueList(opts, - opts[_settings.tot]))) + misc.append( + RadioSetting( + "tot", "Timeout Timer", + RadioSettingValueList( + opts, current_index=_settings.tot))) # 54 TS MUT opts = ["Off", "On"] ctcss.append(RadioSetting("ts_mut", "Tone Search Mute", RadioSettingValueList(opts, - opts[_settings - .ts_mut]))) + current_index=_settings + .ts_mut))) # 55 TS SPEED opts = ["Fast", "Slow"] ctcss.append(RadioSetting("ts_speed", "Tone Search Scanner Speed", RadioSettingValueList(opts, - opts[_settings - .ts_speed]))) + current_index=_settings + .ts_speed))) # 56 VFO.SCN opts = ["+/- 1 MHz", "+/- 2 MHz", "+/-5 MHz", "All"] scan.append(RadioSetting("vfo_scan", "VFO Scanner Width", RadioSettingValueList(opts, - opts[_settings - .vfo_scan]))) + current_index=_settings + .vfo_scan))) # 57 WX.ALT opts = ["Off", "On"] - misc.append(RadioSetting("wx_alert", "Weather Alert Scan", - RadioSettingValueList(opts, opts[ - _settings.wx_alert]))) + misc.append( + RadioSetting( + "wx_alert", "Weather Alert Scan", + RadioSettingValueList( + opts, current_index=_settings.wx_alert))) # 58 WX.VOL opts = ["Normal", "Maximum"] - misc.append(RadioSetting("wx_vol_max", "Weather Alert Volume", - RadioSettingValueList(opts, opts[ - _settings.wx_vol_max]))) + misc.append( + RadioSetting( + "wx_vol_max", "Weather Alert Volume", + RadioSettingValueList( + opts, current_index=_settings.wx_vol_max))) # 59 W/N DV - this is a per-channel attribute, nothing to do here diff --git a/chirp/drivers/ft450d.py b/chirp/drivers/ft450d.py index f6293c2d..ace1cc5e 100644 --- a/chirp/drivers/ft450d.py +++ b/chirp/drivers/ft450d.py @@ -928,7 +928,7 @@ def _get_memory(self, mem, _mem): options = DATA_MODES rs = RadioSetting("data_modes", "DATA MODE", RadioSettingValueList(options, - options[vx_data])) + current_index=vx_data)) rs.set_doc("Extended Data Modes") mem.extra.append(rs) @@ -950,20 +950,20 @@ def _get_memory(self, mem, _mem): options = ["Peak", "Null"] rs = RadioSetting("cnturpk", "Contour Filter Mode", RadioSettingValueList(options, - options[_mem.cnturpk])) + current_index=_mem.cnturpk)) mem.extra.append(rs) options = ["Low", "High"] rs = RadioSetting("cnturgn", "Contour Filter Gain", RadioSettingValueList(options, - options[_mem.cnturgn])) + current_index=_mem.cnturgn)) rs.set_doc("Filter gain/attenuation") mem.extra.append(rs) options = ["-2", "-1", "Center", "+1", "+2"] rs = RadioSetting("cnturmd", "Contour Filter Notch", RadioSettingValueList(options, - options[_mem.cnturmd])) + current_index=_mem.cnturmd)) rs.set_doc("Filter notch offset") mem.extra.append(rs) @@ -979,7 +979,7 @@ def _get_memory(self, mem, _mem): if _mem.notch_pos > 0: vx = 2 rs = RadioSetting("notch_pos", "Notch Position", - RadioSettingValueList(options, options[vx])) + RadioSettingValueList(options, current_index=vx)) rs.set_doc("IF bandpass filter shift") mem.extra.append(rs) @@ -999,7 +999,7 @@ def _get_memory(self, mem, _mem): "8", "9", "10", "11"] rs = RadioSetting("dnr_val", "DSP Noise Reduction Alg", RadioSettingValueList(options, - options[_mem.dnr_val])) + current_index=_mem.dnr_val)) rs.set_doc("Digital noise reduction algorithm number (1-11)") mem.extra.append(rs) @@ -1216,7 +1216,7 @@ def _do_general_settings(self, tab): options[0] = "Off" rs = RadioSetting("tot", "TX 'TOT' time-out (mins)", RadioSettingValueList(options, - options[_settings.tot])) + current_index=_settings.tot)) tab.append(rs) bx = not _settings.cat_rts # Convert from Enable=0 @@ -1228,13 +1228,13 @@ def _do_general_settings(self, tab): options = ["0", "100ms", "1000ms", "3000ms"] rs = RadioSetting("cat_tot", "CAT Timeout", RadioSettingValueList(options, - options[_settings.cat_tot])) + current_index=_settings.cat_tot)) tab.append(rs) options = ["4800", "9600", "19200", "38400", "Data"] rs = RadioSetting("catrate", "CAT rate", RadioSettingValueList(options, - options[_settings.catrate])) + current_index=_settings.catrate)) tab.append(rs) rs = RadioSetting("mem_grp", "Mem groups", @@ -1268,7 +1268,7 @@ def _do_general_settings(self, tab): options = ["ATAS", "EXT ATU", "INT ATU", "INTRATU", "F-TRANS"] rs = RadioSetting("tuner", "Antenna Tuner", RadioSettingValueList(options, - options[_settings.tuner])) + current_index=_settings.tuner)) tab.append(rs) rs = RadioSetting("rfpower", "RF power (watts)", @@ -1286,7 +1286,7 @@ def _do_cw_settings(self, cw): # - - - CW - - - options = ["%i Hz" % i for i in range(400, 801, 100)] rs = RadioSetting("cwpitch", "CW pitch", RadioSettingValueList(options, - options[_settings.cwpitch])) + current_index=_settings.cwpitch)) cw.append(rs) rs = RadioSetting("cwspeed", "CW speed (wpm)", @@ -1297,13 +1297,13 @@ def _do_cw_settings(self, cw): # - - - CW - - - options = ["1:%1.1f" % (i / 10) for i in range(25, 46, 1)] rs = RadioSetting("cwweigt", "CW weight", RadioSettingValueList(options, - options[_settings.cwweigt])) + current_index=_settings.cwweigt)) cw.append(rs) options = ["15ms", "20ms", "25ms", "30ms"] rs = RadioSetting("cw_qsk", "CW delay before TX in QSK mode", RadioSettingValueList(options, - options[_settings.cw_qsk])) + current_index=_settings.cw_qsk)) cw.append(rs) rs = RadioSetting("cwstone_sgn", "CW sidetone volume Linked", @@ -1324,7 +1324,7 @@ def _do_cw_settings(self, cw): # - - - CW - - - options = ["Numeric", "Alpha", "Mixed"] rs = RadioSetting("cwtrain", "CW Training mode", RadioSettingValueList(options, - options[_settings.cwtrain])) + current_index=_settings.cwtrain)) cw.append(rs) rs = RadioSetting("cw_auto", "CW key jack- auto CW mode", @@ -1335,7 +1335,7 @@ def _do_cw_settings(self, cw): # - - - CW - - - options = ["Normal", "Reverse"] rs = RadioSetting("cw_key", "CW paddle wiring", RadioSettingValueList(options, - options[_settings.cw_key])) + current_index=_settings.cw_key)) cw.append(rs) rs = RadioSetting("beacon_time", "CW beacon Tx interval (secs)", @@ -1373,7 +1373,7 @@ def _do_panel_settings(self, pnlset): # - - - Panel settings options = ["440 Hz", "880 Hz", "1760 Hz"] rs = RadioSetting("beepton", "Beep frequency", RadioSettingValueList(options, - options[_settings.beepton])) + current_index=_settings.beepton)) pnlset.append(rs) rs = RadioSetting("beepvol_sgn", "Beep volume Linked", @@ -1405,19 +1405,19 @@ def _do_panel_settings(self, pnlset): # - - - Panel settings options = ["RF-Gain", "Squelch"] rs = RadioSetting("sql_rfg", "Squelch/RF-Gain", RadioSettingValueList(options, - options[_settings.sql_rfg])) + current_index=_settings.sql_rfg)) pnlset.append(rs) options = ["Frequencies", "Panel", "All"] rs = RadioSetting("lockmod", "Lock Mode", RadioSettingValueList(options, - options[_settings.lockmod])) + current_index=_settings.lockmod)) pnlset.append(rs) options = ["Dial", "SEL"] rs = RadioSetting("clar_btn", "CLAR button control", RadioSettingValueList(options, - options[_settings.clar_btn])) + current_index=_settings.clar_btn)) pnlset.append(rs) if _settings.dialstp_mode == 0: # AM/FM @@ -1426,13 +1426,13 @@ def _do_panel_settings(self, pnlset): # - - - Panel settings options = ["AM/FM:100Hz", "AM/FM:200Hz"] rs = RadioSetting("dialstp", "Dial tuning step", RadioSettingValueList(options, - options[_settings.dialstp])) + current_index=_settings.dialstp)) pnlset.append(rs) options = ["0.5secs", "1.0secs", "1.5secs", "2.0secs"] rs = RadioSetting("keyhold", "Buttons hold-to-activate time", RadioSettingValueList(options, - options[_settings.keyhold])) + current_index=_settings.keyhold)) pnlset.append(rs) rs = RadioSetting("m_tune", "Memory tune", @@ -1447,7 +1447,7 @@ def _do_panel_settings(self, pnlset): # - - - Panel settings "Mic Gain", "RF Power"] rs = RadioSetting("seldial", "SEL dial 2nd function (push)", RadioSettingValueList(options, - options[_settings.seldial])) + current_index=_settings.seldial)) pnlset.append(rs) # End _do_panel_settings @@ -1472,12 +1472,12 @@ def _do_panel_buttons(self, pnlcfg): # - - - Current Panel Config FT450agc = _settings.agc & int('0x7',16) rs = RadioSetting("agc", "AGC", RadioSettingValueList(options, - options[FT450agc])) + current_index=FT450agc)) else: options = ["Auto", "Fast", "Slow", "Auto/Fast", "Auto/Slow", "?5?"] rs = RadioSetting("agc", "AGC", RadioSettingValueList(options, - options[_settings.agc])) + current_index=_settings.agc)) pnlcfg.append(rs) rs = RadioSetting("keyer", "Keyer", @@ -1495,7 +1495,7 @@ def _do_panel_buttons(self, pnlcfg): # - - - Current Panel Config options = ["PO", "ALC", "SWR"] rs = RadioSetting("mtr_mode", "S-Meter mode", RadioSettingValueList(options, - options[_settings.mtr_mode])) + current_index=_settings.mtr_mode)) pnlcfg.append(rs) # End _do_panel_Buttons @@ -1524,24 +1524,24 @@ def _do_vox_settings(self, voxdat): # - - VOX and DATA Settings options = ["170 Hz", "200 Hz", "425 Hz", "850 Hz"] rs = RadioSetting("rty_sft", "RTTY FSK Freq Shift", RadioSettingValueList(options, - options[_settings.rty_sft])) + current_index=_settings.rty_sft)) voxdat.append(rs) options = ["1275 Hz", "2125 Hz"] rs = RadioSetting("rty_ton", "RTTY FSK Mark tone", RadioSettingValueList(options, - options[_settings.rty_ton])) + current_index=_settings.rty_ton)) voxdat.append(rs) options = ["Normal", "Reverse"] rs = RadioSetting("rtyrpol", "RTTY Mark/Space RX polarity", RadioSettingValueList(options, - options[_settings.rtyrpol])) + current_index=_settings.rtyrpol)) voxdat.append(rs) rs = RadioSetting("rtytpol", "RTTY Mark/Space TX polarity", RadioSettingValueList(options, - options[_settings.rtytpol])) + current_index=_settings.rtytpol)) voxdat.append(rs) # End _do_vox_settings @@ -1555,7 +1555,7 @@ def _do_mic_settings(self, mic): # - - MIC Settings options = ["Low", "Normal", "High"] rs = RadioSetting("micgain", "Mic Gain", RadioSettingValueList(options, - options[_settings.micgain])) + current_index=_settings.micgain)) mic.append(rs) rs = RadioSetting("micscan", "Mic scan enabled", diff --git a/chirp/drivers/ft50.py b/chirp/drivers/ft50.py index 3acb571a..d1813881 100644 --- a/chirp/drivers/ft50.py +++ b/chirp/drivers/ft50.py @@ -388,38 +388,39 @@ def get_settings(self): options = ["off", "30m", "1h", "3h", "5h", "8h"] rs = RadioSetting( "apo", "APO time (hrs)", - RadioSettingValueList(options, options[_settings.apo])) + RadioSettingValueList(options, current_index=_settings.apo)) basic.append(rs) options = ["off", "1m", "2.5m", "5m", "10m"] rs = RadioSetting( - "timeout", "Time Out Timer", - RadioSettingValueList(options, options[_settings.timeout])) + "timeout", "Time Out Timer", + RadioSettingValueList( + options, current_index=_settings.timeout)) basic.append(rs) options = ["key", "dial", "key+dial", "ptt", "key+ptt", "dial+ptt", "all"] rs = RadioSetting( "lock", "Lock mode", - RadioSettingValueList(options, options[_settings.lock])) + RadioSettingValueList(options, current_index=_settings.lock)) basic.append(rs) options = ["off", "0.2", "0.3", "0.5", "1.0", "2.0"] rs = RadioSetting( "rxsave", "RX Save (sec)", - RadioSettingValueList(options, options[_settings.rxsave])) + RadioSettingValueList(options, current_index=_settings.rxsave)) basic.append(rs) options = ["5sec", "key", "tgl"] rs = RadioSetting( "lamp", "Lamp mode", - RadioSettingValueList(options, options[_settings.lamp])) + RadioSettingValueList(options, current_index=_settings.lamp)) basic.append(rs) options = ["off", "1", "3", "5", "8", "rpt"] rs = RadioSetting( "bell", "Bell Repetitions", - RadioSettingValueList(options, options[_settings.bell])) + RadioSettingValueList(options, current_index=_settings.bell)) basic.append(rs) rs = RadioSetting( @@ -437,13 +438,14 @@ def get_settings(self): rs = RadioSetting( "artsmode", "ARTS Mode", RadioSettingValueList( - options, options[_settings.artsmode])) + options, current_index=_settings.artsmode)) arts.append(rs) options = ["off", "in range", "always"] rs = RadioSetting( - "artsbeep", "ARTS Beep", - RadioSettingValueList(options, options[_settings.artsbeep])) + "artsbeep", "ARTS Beep", + RadioSettingValueList( + options, current_index=_settings.artsbeep)) arts.append(rs) for i in range(0, 8): @@ -469,27 +471,30 @@ def get_settings(self): options = ["50ms", "100ms"] rs = RadioSetting( - "pagingspeed", "Paging Speed", - RadioSettingValueList(options, options[_settings.pagingspeed])) + "pagingspeed", "Paging Speed", + RadioSettingValueList( + options, current_index=_settings.pagingspeed)) dtmf.append(rs) options = ["250ms", "450ms", "750ms", "1000ms"] rs = RadioSetting( - "pagingdelay", "Paging Delay", - RadioSettingValueList(options, options[_settings.pagingdelay])) + "pagingdelay", "Paging Delay", + RadioSettingValueList( + options, current_index=_settings.pagingdelay)) dtmf.append(rs) options = ["off", "1", "3", "5", "8", "rpt"] rs = RadioSetting( - "pagingbell", "Paging Bell Repetitions", - RadioSettingValueList(options, options[_settings.pagingbell])) + "pagingbell", "Paging Bell Repetitions", + RadioSettingValueList( + options, current_index=_settings.pagingbell)) dtmf.append(rs) options = ["off", "ans", "for"] rs = RadioSetting( "paginganswer", "Paging Answerback", RadioSettingValueList(options, - options[_settings.paginganswer])) + current_index=_settings.paginganswer)) dtmf.append(rs) rs = RadioSetting( diff --git a/chirp/drivers/ft60.py b/chirp/drivers/ft60.py index 4e4c9bbe..361bbbb2 100644 --- a/chirp/drivers/ft60.py +++ b/chirp/drivers/ft60.py @@ -442,41 +442,41 @@ def get_settings(self): misc.append( RadioSetting( "apo", "Automatic Power Off", - RadioSettingValueList(opts, opts[_settings.apo]))) + RadioSettingValueList(opts, current_index=_settings.apo))) # AR.BEP opts = ["OFF", "INRANG", "ALWAYS"] arts.append( RadioSetting( "ar_bep", "ARTS Beep", - RadioSettingValueList(opts, opts[_settings.ar_bep]))) + RadioSettingValueList(opts, current_index=_settings.ar_bep))) # AR.INT opts = ["25 SEC", "15 SEC"] arts.append( RadioSetting( "ar_int", "ARTS Polling Interval", - RadioSettingValueList(opts, opts[_settings.ar_int]))) + RadioSettingValueList(opts, current_index=_settings.ar_int))) # ARS opts = ["OFF", "ON"] repeater.append( RadioSetting( "ars", "Automatic Repeater Shift", - RadioSettingValueList(opts, opts[_settings.ars]))) + RadioSettingValueList(opts, current_index=_settings.ars))) # BCLO opts = ["OFF", "ON"] misc.append(RadioSetting( "bclo", "Busy Channel Lock-Out", - RadioSettingValueList(opts, opts[_settings.bclo]))) + RadioSettingValueList(opts, current_index=_settings.bclo))) # BEEP opts = ["OFF", "KEY", "KEY+SC"] rs = RadioSetting( "beep_key", "Enable the Beeper", RadioSettingValueList( - opts, opts[_settings.beep_key + _settings.beep_sc])) + opts, current_index=_settings.beep_key + _settings.beep_sc)) def apply_beep(s, obj): setattr(obj, "beep_key", @@ -487,33 +487,43 @@ def apply_beep(s, obj): # BELL opts = ["OFF", "1T", "3T", "5T", "8T", "CONT"] - ctcss.append(RadioSetting("bell", "Bell Repetitions", - RadioSettingValueList(opts, opts[ - _settings.bell]))) + ctcss.append( + RadioSetting( + "bell", "Bell Repetitions", + RadioSettingValueList( + opts, current_index=_settings.bell))) # BSY.LED opts = ["ON", "OFF"] - misc.append(RadioSetting("bsy_led", "Busy LED", - RadioSettingValueList(opts, opts[ - _settings.bsy_led]))) + misc.append( + RadioSetting( + "bsy_led", "Busy LED", + RadioSettingValueList( + opts, current_index=_settings.bsy_led))) # DCS.NR opts = ["TR/X N", "RX R", "TX R", "T/RX R"] - ctcss.append(RadioSetting("dcs_nr", "\"Inverted\" DCS Code Decoding", - RadioSettingValueList(opts, opts[ - _settings.dcs_nr]))) + ctcss.append( + RadioSetting( + "dcs_nr", "\"Inverted\" DCS Code Decoding", + RadioSettingValueList( + opts, current_index=_settings.dcs_nr))) # DT.DLY opts = ["50 ms", "100 ms", "250 ms", "450 ms", "750 ms", "1000 ms"] - ctcss.append(RadioSetting("dt_dly", "DTMF Autodialer Delay Time", - RadioSettingValueList(opts, opts[ - _settings.dt_dly]))) + ctcss.append( + RadioSetting( + "dt_dly", "DTMF Autodialer Delay Time", + RadioSettingValueList( + opts, current_index=_settings.dt_dly))) # DT.SPD opts = ["50 ms", "100 ms"] - ctcss.append(RadioSetting("dt_spd", "DTMF Autodialer Sending Speed", - RadioSettingValueList(opts, opts[ - _settings.dt_spd]))) + ctcss.append( + RadioSetting( + "dt_spd", "DTMF Autodialer Sending Speed", + RadioSettingValueList( + opts, current_index=_settings.dt_spd))) # DT.WRT for i in range(0, 9): @@ -540,15 +550,17 @@ def apply_dtmf(s, obj): # EDG.BEP opts = ["OFF", "ON"] - misc.append(RadioSetting("edg_bep", "Band Edge Beeper", - RadioSettingValueList(opts, opts[ - _settings.edg_bep]))) + misc.append( + RadioSetting( + "edg_bep", "Band Edge Beeper", + RadioSettingValueList( + opts, current_index=_settings.edg_bep))) # I.NET opts = ["OFF", "COD", "MEM"] rs = RadioSetting("inet", "Internet Link Connection", RadioSettingValueList( - opts, opts[_settings.inet - 1])) + opts, current_index=_settings.inet - 1)) def apply_inet(s, obj): setattr(obj, s.get_name(), int(s.value) + 1) @@ -559,28 +571,34 @@ def apply_inet(s, obj): opts = ["CODE 0", "CODE 1", "CODE 2", "CODE 3", "CODE 4", "CODE 5", "CODE 6", "CODE 7", "CODE 8", "CODE 9", "CODE A", "CODE B", "CODE C", "CODE D", "CODE E", "CODE F"] - wires.append(RadioSetting("int_cd", "Access Number for WiRES(TM)", - RadioSettingValueList(opts, opts[ - _settings.int_cd]))) + wires.append( + RadioSetting( + "int_cd", "Access Number for WiRES(TM)", + RadioSettingValueList( + opts, current_index=_settings.int_cd))) # INT.MR opts = ["d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9"] - wires.append(RadioSetting( - "int_mr", "Access Number (DTMF) for Non-WiRES(TM)", - RadioSettingValueList(opts, opts[_settings.int_mr]))) + wires.append( + RadioSetting( + "int_mr", "Access Number (DTMF) for Non-WiRES(TM)", + RadioSettingValueList( + opts, current_index=_settings.int_mr))) # LAMP opts = ["KEY", "5SEC", "TOGGLE"] - switch.append(RadioSetting("lamp", "Lamp Mode", - RadioSettingValueList(opts, opts[ - _settings.lamp]))) + switch.append( + RadioSetting( + "lamp", "Lamp Mode", + RadioSettingValueList( + opts, current_index=_settings.lamp))) # LOCK opts = ["LK KEY", "LKDIAL", "LK K+D", "LK PTT", "LK P+K", "LK P+D", "LK ALL"] rs = RadioSetting("lock", "Control Locking", RadioSettingValueList( - opts, opts[_settings.lock - 1])) + opts, current_index=_settings.lock - 1)) def apply_lock(s, obj): setattr(obj, s.get_name(), int(s.value) + 1) @@ -589,101 +607,131 @@ def apply_lock(s, obj): # M/T-CL opts = ["MONI", "T-CALL"] - switch.append(RadioSetting("mt_cl", "MONI Switch Function", - RadioSettingValueList(opts, opts[ - _settings.mt_cl]))) + switch.append( + RadioSetting( + "mt_cl", "MONI Switch Function", + RadioSettingValueList( + opts, current_index=_settings.mt_cl))) # PAG.ABK opts = ["OFF", "ON"] - eai.append(RadioSetting("pag_abk", "Paging Answer Back", - RadioSettingValueList(opts, opts[ - _settings.pag_abk]))) + eai.append( + RadioSetting( + "pag_abk", "Paging Answer Back", + RadioSettingValueList( + opts, current_index=_settings.pag_abk))) # RESUME opts = ["TIME", "HOLD", "BUSY"] - scan.append(RadioSetting("resume", "Scan Resume Mode", - RadioSettingValueList(opts, opts[ - _settings.resume]))) + scan.append( + RadioSetting( + "resume", "Scan Resume Mode", + RadioSettingValueList( + opts, current_index=_settings.resume))) # REV/HM opts = ["REV", "HOME"] - switch.append(RadioSetting("rev_hm", "HM/RV Key Function", - RadioSettingValueList(opts, opts[ - _settings.rev_hm]))) + switch.append( + RadioSetting( + "rev_hm", "HM/RV Key Function", + RadioSettingValueList( + opts, current_index=_settings.rev_hm))) # RF.SQL opts = ["OFF", "S-1", "S-2", "S-3", "S-4", "S-5", "S-6", "S-7", "S-8", "S-FULL"] - misc.append(RadioSetting("rf_sql", "RF Squelch Threshold", - RadioSettingValueList(opts, opts[ - _settings.rf_sql]))) + misc.append( + RadioSetting( + "rf_sql", "RF Squelch Threshold", + RadioSettingValueList( + opts, current_index=_settings.rf_sql))) # PRI.RVT opts = ["OFF", "ON"] - scan.append(RadioSetting("pri_rvt", "Priority Revert", - RadioSettingValueList(opts, opts[ - _settings.pri_rvt]))) + scan.append( + RadioSetting( + "pri_rvt", "Priority Revert", + RadioSettingValueList( + opts, current_index=_settings.pri_rvt))) # RXSAVE opts = ["OFF", "200 ms", "300 ms", "500 ms", "1 s", "2 s"] - power.append(RadioSetting( - "rxsave", "Receive Mode Battery Savery Interval", - RadioSettingValueList(opts, opts[_settings.rxsave]))) + power.append( + RadioSetting( + "rxsave", "Receive Mode Battery Savery Interval", + RadioSettingValueList( + opts, current_index=_settings.rxsave))) # S.SRCH opts = ["SINGLE", "CONT"] - misc.append(RadioSetting("ssrch", "Smart Search Sweep Mode", - RadioSettingValueList(opts, opts[ - _settings.ssrch]))) + misc.append( + RadioSetting( + "ssrch", "Smart Search Sweep Mode", + RadioSettingValueList( + opts, current_index=_settings.ssrch))) # SCN.MD opts = ["MEM", "ONLY"] - scan.append(RadioSetting( - "scn_md", "Memory Scan Channel Selection Mode", - RadioSettingValueList(opts, opts[_settings.scn_md]))) + scan.append( + RadioSetting( + "scn_md", "Memory Scan Channel Selection Mode", + RadioSettingValueList( + opts, current_index=_settings.scn_md))) # SCN.LMP opts = ["OFF", "ON"] - scan.append(RadioSetting("scn_lmp", "Scan Lamp", - RadioSettingValueList(opts, opts[ - _settings.scn_lmp]))) + scan.append( + RadioSetting( + "scn_lmp", "Scan Lamp", + RadioSettingValueList( + opts, current_index=_settings.scn_lmp))) # TOT opts = ["OFF"] + ["%dMIN" % (x) for x in range(1, 30 + 1)] - misc.append(RadioSetting("tot", "Timeout Timer", - RadioSettingValueList(opts, opts[ - _settings.tot]))) + misc.append( + RadioSetting( + "tot", "Timeout Timer", + RadioSettingValueList( + opts, current_index=_settings.tot))) # TX.LED opts = ["ON", "OFF"] - misc.append(RadioSetting("tx_led", "TX LED", - RadioSettingValueList(opts, opts[ - _settings.tx_led]))) + misc.append( + RadioSetting( + "tx_led", "TX LED", + RadioSettingValueList( + opts, current_index=_settings.tx_led))) # TXSAVE opts = ["OFF", "ON"] - power.append(RadioSetting("txsave", "Transmitter Battery Saver", - RadioSettingValueList(opts, opts[ - _settings.txsave]))) + power.append( + RadioSetting( + "txsave", "Transmitter Battery Saver", + RadioSettingValueList( + opts, current_index=_settings.txsave))) # VFO.BND opts = ["BAND", "ALL"] - misc.append(RadioSetting("vfo_bnd", "VFO Band Edge Limiting", - RadioSettingValueList(opts, opts[ - _settings.vfo_bnd]))) + misc.append( + RadioSetting( + "vfo_bnd", "VFO Band Edge Limiting", + RadioSettingValueList( + opts, current_index=_settings.vfo_bnd))) # WX.ALT opts = ["OFF", "ON"] - scan.append(RadioSetting("wx_alt", "Weather Alert Scan", - RadioSettingValueList(opts, opts[ - _settings.wx_alt]))) + scan.append( + RadioSetting( + "wx_alt", "Weather Alert Scan", + RadioSettingValueList( + opts, current_index=_settings.wx_alt))) # MBS for i in range(0, 10): opts = ["OFF", "ON"] mbs = (self._memobj.mbs >> i) & 1 rs = RadioSetting("mbs%i" % i, "Bank %s Scan" % (i + 1), - RadioSettingValueList(opts, opts[mbs])) + RadioSettingValueList(opts, current_index=mbs)) def apply_mbs(s, index): if int(s.value): diff --git a/chirp/drivers/ft7100.py b/chirp/drivers/ft7100.py index a2dbc72e..dc97daaa 100644 --- a/chirp/drivers/ft7100.py +++ b/chirp/drivers/ft7100.py @@ -808,18 +808,18 @@ def get_settings(self): common.append( RadioSetting( "apo", "Automatic Power Off", - RadioSettingValueList(opts, opts[_overlay.apo]))) + RadioSettingValueList(opts, current_index=_overlay.apo))) # 2 Automatic Repeater Shift function opts = ["Off", "On"] band.append( RadioSetting( "ars_vhf", "Automatic Repeater Shift VHF", - RadioSettingValueList(opts, opts[_overlay.ars_vhf]))) + RadioSettingValueList(opts, current_index=_overlay.ars_vhf))) band.append( RadioSetting( "ars_uhf", "Automatic Repeater Shift UHF", - RadioSettingValueList(opts, opts[_overlay.ars_uhf]))) + RadioSettingValueList(opts, current_index=_overlay.ars_uhf))) # 3 Selects the ARTS mode. # -> Only useful to set it on the radio directly @@ -829,14 +829,14 @@ def get_settings(self): common.append( RadioSetting( "beep", "Key/Button Beep", - RadioSettingValueList(opts, opts[_overlay.beep]))) + RadioSettingValueList(opts, current_index=_overlay.beep))) # 5 Enables/disables the CW IDer during ARTS operation. opts = ["Off", "On"] arts.append( RadioSetting( "cwid", "Enables/Disables the CW ID", - RadioSettingValueList(opts, opts[_overlay.cwid]))) + RadioSettingValueList(opts, current_index=_overlay.cwid))) # 6 Callsign during ARTS operation. cwidw = _overlay.cwidw.get_raw(asbytes=False) @@ -856,7 +856,7 @@ def apply_cwid(setting): common.append( RadioSetting( "dim", "Display Illumination", - RadioSettingValueList(opts, opts[_overlay.dim]))) + RadioSettingValueList(opts, current_index=_overlay.dim))) # 8 Setting the DCS code number. # Note: This Menu item can be set independently for each band, @@ -870,11 +870,11 @@ def apply_cwid(setting): band.append( RadioSetting( "dcsnr_vhf", "DCS coding VHF", - RadioSettingValueList(opts, opts[_overlay.dcsnr_vhf]))) + RadioSettingValueList(opts, current_index=_overlay.dcsnr_vhf))) band.append( RadioSetting( "dcsnr_uhf", "DCS coding UHF", - RadioSettingValueList(opts, opts[_overlay.dcsnr_uhf]))) + RadioSettingValueList(opts, current_index=_overlay.dcsnr_uhf))) # 11 Selects the 'sub' band display format opts = ["Frequency", "Off / Sub Band disabled", @@ -882,21 +882,21 @@ def apply_cwid(setting): common.append( RadioSetting( "disp", "Sub Band Display Format", - RadioSettingValueList(opts, opts[_overlay.disp]))) + RadioSettingValueList(opts, current_index=_overlay.disp))) # 12 Setting the DTMF Autodialer delay time opts = ["50 ms", "250 ms", "450 ms", "750 ms", "1 s"] dtmf.append( RadioSetting( "dtmfd", "Autodialer delay time", - RadioSettingValueList(opts, opts[_overlay.dtmfd]))) + RadioSettingValueList(opts, current_index=_overlay.dtmfd))) # 13 Setting the DTMF Autodialer sending speed opts = ["50 ms", "75 ms", "100 ms"] dtmf.append( RadioSetting( "dtmfs", "Autodialer sending speed", - RadioSettingValueList(opts, opts[_overlay.dtmfs]))) + RadioSettingValueList(opts, current_index=_overlay.dtmfs))) # 14 Current DTMF Autodialer memory rs = RadioSetting("dtmfw", "Current Autodialer memory", @@ -953,14 +953,14 @@ def apply_dtmf(setting, index): common.append( RadioSetting( "lockt", "PTT switch lock", - RadioSettingValueList(opts, opts[_overlay.lockt]))) + RadioSettingValueList(opts, current_index=_overlay.lockt))) # 17 Selects the Microphone type to be used opts = ["MH-42", "MH-48"] common.append( RadioSetting( "mic", "Microphone type", - RadioSettingValueList(opts, opts[_overlay.mic]))) + RadioSettingValueList(opts, current_index=_overlay.mic))) # 18 Reduces the audio level on the sub receiver when the # main receiver is active @@ -968,7 +968,7 @@ def apply_dtmf(setting, index): common.append( RadioSetting( "mute", "Mute Sub Receiver", - RadioSettingValueList(opts, opts[_overlay.mute]))) + RadioSettingValueList(opts, current_index=_overlay.mute))) # 20 - 23 Programming the microphones button assignment buttons = [ @@ -984,7 +984,7 @@ def apply_dtmf(setting, index): rs = RadioSetting( "button" + str(i), button, RadioSettingValueList(opts_button, - opts_button[_overlay.button[i]])) + current_index=_overlay.button[i])) def apply_button(setting, index): value_string = setting.value.get_value() @@ -998,29 +998,32 @@ def apply_button(setting, index): band.append( RadioSetting( "rf_sql_vhf", "RF Sql VHF", - RadioSettingValueList(opts, opts[_overlay.rf_sql_vhf]))) + RadioSettingValueList( + opts, current_index=_overlay.rf_sql_vhf))) band.append( RadioSetting( "rf_sql_uhf", "RF Sql UHF", - RadioSettingValueList(opts, opts[_overlay.rf_sql_uhf]))) + RadioSettingValueList( + opts, current_index=_overlay.rf_sql_uhf))) # 25 Selects the Scan-Resume mode opts = ["Busy", "Time"] band.append( RadioSetting( "scan_vhf", "Scan-Resume VHF", - RadioSettingValueList(opts, opts[_overlay.scan_vhf]))) + RadioSettingValueList(opts, current_index=_overlay.scan_vhf))) band.append( RadioSetting( "scan_uhf", "Scan-Resume UHF", - RadioSettingValueList(opts, opts[_overlay.scan_uhf]))) + RadioSettingValueList(opts, current_index=_overlay.scan_uhf))) # 28 Defining the audio path to the external speaker opts = ["Off", "Band A", "Band B", "Both"] common.append( RadioSetting( "speaker_cnt", "External Speaker", - RadioSettingValueList(opts, opts[_overlay.speaker_cnt]))) + RadioSettingValueList( + opts, current_index=_overlay.speaker_cnt))) # 31 Sets the Time-Out Timer opts = ["Off", "Band A", "Band B", "Both"] @@ -1034,32 +1037,33 @@ def apply_button(setting, index): band.append( RadioSetting( "txnar_vhf", "TX Narrowband VHF", - RadioSettingValueList(opts, opts[_overlay.txnar_vhf]))) + RadioSettingValueList(opts, current_index=_overlay.txnar_vhf))) band.append( RadioSetting( "txnar_uhf", "TX Narrowband UHF", - RadioSettingValueList(opts, opts[_overlay.txnar_uhf]))) + RadioSettingValueList(opts, current_index=_overlay.txnar_uhf))) # 33 Enables/disables the VFO Tracking feature opts = ["Off", "On"] common.append( RadioSetting( "vfotr", "VFO Tracking", - RadioSettingValueList(opts, opts[_overlay.vfotr]))) + RadioSettingValueList(opts, current_index=_overlay.vfotr))) # 34 Selects the receiving mode on the VHF band opts = ["Inhibit (only FM)", "AM", "Auto"] common.append( RadioSetting( "am", "AM Mode", - RadioSettingValueList(opts, opts[_overlay.am]))) + RadioSettingValueList(opts, current_index=_overlay.am))) # Current Band opts = ["VHF", "UHF"] common.append( RadioSetting( "current_band", "Current Band", - RadioSettingValueList(opts, opts[_overlay.current_band]))) + RadioSettingValueList( + opts, current_index=_overlay.current_band))) # Show number of VHF and UHF channels val = RadioSettingValueString(0, 7, diff --git a/chirp/drivers/ft7800.py b/chirp/drivers/ft7800.py index d8849efa..237e2226 100644 --- a/chirp/drivers/ft7800.py +++ b/chirp/drivers/ft7800.py @@ -586,7 +586,7 @@ def get_settings(self): opts = ["off"] + ["%0.1f" % (t / 60.0) for t in range(30, 750, 30)] basic.append(RadioSetting( "apo", "APO time (hrs)", - RadioSettingValueList(opts, opts[_settings.apo]))) + RadioSettingValueList(opts, current_index=_settings.apo))) basic.append(RadioSetting( "beep_scan", "Beep: Scan", @@ -601,62 +601,76 @@ def get_settings(self): RadioSettingValueBoolean(_settings.beep_key))) opts = ["T/RX Normal", "RX Reverse", "TX Reverse", "T/RX Reverse"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "dcs_polarity", "DCS polarity", - RadioSettingValueList(opts, opts[_settings.dcs_polarity]))) + RadioSettingValueList( + opts, current_index=_settings.dcs_polarity))) opts = ["off", "dim 1", "dim 2", "dim 3"] basic.append(RadioSetting( "dimmer", "Dimmer", - RadioSettingValueList(opts, opts[_settings.dimmer]))) + RadioSettingValueList(opts, current_index=_settings.dimmer))) opts = ["manual", "auto", "1-auto"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "hyper_write", "Hyper Write", - RadioSettingValueList(opts, opts[_settings.hyper_write]))) + RadioSettingValueList( + opts, current_index=_settings.hyper_write))) opts = ["", "key", "dial", "key+dial", "ptt", "ptt+key", "ptt+dial", "all"] basic.append(RadioSetting( "lock", "Lock mode", - RadioSettingValueList(opts, opts[_settings.lock]))) + RadioSettingValueList(opts, current_index=_settings.lock))) opts = ["MH-42", "MH-48"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "microphone_type", "Microphone Type", - RadioSettingValueList(opts, opts[_settings.microphone_type]))) + RadioSettingValueList( + opts, current_index=_settings.microphone_type))) opts = ["off"] + ["S-%d" % n for n in range(2, 10)] + ["S-Full"] basic.append(RadioSetting( "rf_sql", "RF Squelch", - RadioSettingValueList(opts, opts[_settings.rf_sql]))) + RadioSettingValueList(opts, current_index=_settings.rf_sql))) opts = ["time", "hold", "busy"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "scan_resume", "Scan Resume", - RadioSettingValueList(opts, opts[_settings.scan_resume]))) + RadioSettingValueList( + opts, current_index=_settings.scan_resume))) opts = ["single", "continuous"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "smart_search", "Smart Search", - RadioSettingValueList(opts, opts[_settings.smart_search]))) + RadioSettingValueList( + opts, current_index=_settings.smart_search))) opts = ["off"] + ["%d" % t for t in range(1, 31)] basic.append(RadioSetting( "tot", "Time-out timer (mins)", - RadioSettingValueList(opts, opts[_settings.tot]))) + RadioSettingValueList(opts, current_index=_settings.tot))) # dtmf tab opts = ["50", "100", "250", "450", "750", "1000"] - dtmf.append(RadioSetting( + dtmf.append( + RadioSetting( "dtmf_delay", "DTMF delay (ms)", - RadioSettingValueList(opts, opts[_settings.dtmf_delay]))) + RadioSettingValueList( + opts, current_index=_settings.dtmf_delay))) opts = ["50", "75", "100"] - dtmf.append(RadioSetting( + dtmf.append( + RadioSetting( "dtmf_speed", "DTMF speed (ms)", - RadioSettingValueList(opts, opts[_settings.dtmf_speed]))) + RadioSettingValueList( + opts, current_index=_settings.dtmf_speed))) for i in range(16): name = "dtmf%02d" % i @@ -676,14 +690,18 @@ def get_settings(self): # arts tab opts = ["off", "in range", "always"] - arts.append(RadioSetting( + arts.append( + RadioSetting( "arts_mode", "ARTS beep", - RadioSettingValueList(opts, opts[_settings.arts_mode]))) + RadioSettingValueList( + opts, current_index=_settings.arts_mode))) opts = ["15", "25"] - arts.append(RadioSetting( + arts.append( + RadioSetting( "arts_interval", "ARTS interval", - RadioSettingValueList(opts, opts[_settings.arts_interval]))) + RadioSettingValueList( + opts, current_index=_settings.arts_interval))) arts.append(RadioSetting( "arts_cwid_enable", "CW ID", @@ -698,14 +716,18 @@ def get_settings(self): # prog buttons opts = ["WX", "Reverse", "Repeater", "SQL Off", "Lock", "Dimmer"] - prog.append(RadioSetting( + prog.append( + RadioSetting( "prog_panel_acc", "Prog Panel - Low(ACC)", - RadioSettingValueList(opts, opts[_settings.prog_panel_acc]))) + RadioSettingValueList( + opts, current_index=_settings.prog_panel_acc))) opts = ["Reverse", "Home"] - prog.append(RadioSetting( + prog.append( + RadioSetting( "prog_tone_vm", "TONE | V/M", - RadioSettingValueList(opts, opts[_settings.prog_tone_vm]))) + RadioSettingValueList( + opts, current_index=_settings.prog_tone_vm))) opts = ["" for n in range(26)] + \ ["Priority", "Low", "Tone", "MHz", "Reverse", "Home", "Band", @@ -714,19 +736,19 @@ def get_settings(self): prog.append(RadioSetting( "prog_p1", "P1", - RadioSettingValueList(opts, opts[_settings.prog_p1]))) + RadioSettingValueList(opts, current_index=_settings.prog_p1))) prog.append(RadioSetting( "prog_p2", "P2", - RadioSettingValueList(opts, opts[_settings.prog_p2]))) + RadioSettingValueList(opts, current_index=_settings.prog_p2))) prog.append(RadioSetting( "prog_p3", "P3", - RadioSettingValueList(opts, opts[_settings.prog_p3]))) + RadioSettingValueList(opts, current_index=_settings.prog_p3))) prog.append(RadioSetting( "prog_p4", "P4", - RadioSettingValueList(opts, opts[_settings.prog_p4]))) + RadioSettingValueList(opts, current_index=_settings.prog_p4))) return top diff --git a/chirp/drivers/ft817.py b/chirp/drivers/ft817.py index 9798a12f..ea9e1c2e 100644 --- a/chirp/drivers/ft817.py +++ b/chirp/drivers/ft817.py @@ -787,53 +787,58 @@ def get_settings(self): _settings.pkt9600_mic)) packet.append(rs) options = ["enable", "disable"] - rs = RadioSetting("disable_amfm_dial", "AM&FM Dial", - RadioSettingValueList(options, - options[ - _settings.disable_amfm_dial - ])) + rs = RadioSetting( + "disable_amfm_dial", "AM&FM Dial", + RadioSettingValueList( + options, current_index=_settings.disable_amfm_dial)) panel.append(rs) rs = RadioSetting("am_mic", "AM mic level", RadioSettingValueInteger(0, 100, _settings.am_mic)) basic.append(rs) options = ["OFF", "1h", "2h", "3h", "4h", "5h", "6h"] - rs = RadioSetting("apo_time", "APO time", - RadioSettingValueList(options, - options[_settings.apo_time])) + rs = RadioSetting( + "apo_time", "APO time", + RadioSettingValueList( + options, current_index=_settings.apo_time)) basic.append(rs) options = ["OFF", "Range", "All"] - rs = RadioSetting("arts_beep", "ARTS beep", - RadioSettingValueList(options, - options[_settings.arts_beep])) + rs = RadioSetting( + "arts_beep", "ARTS beep", + RadioSettingValueList( + options, current_index=_settings.arts_beep)) basic.append(rs) options = ["OFF", "ON", "Auto"] - rs = RadioSetting("backlight", "Backlight", - RadioSettingValueList(options, - options[_settings.backlight])) + rs = RadioSetting( + "backlight", "Backlight", + RadioSettingValueList( + options, current_index=_settings.backlight)) panel.append(rs) options = ["6h", "8h", "10h"] - rs = RadioSetting("batt_chg", "Battery charge", - RadioSettingValueList(options, - options[_settings.batt_chg])) + rs = RadioSetting( + "batt_chg", "Battery charge", + RadioSettingValueList( + options, current_index=_settings.batt_chg)) basic.append(rs) options = ["440 Hz", "880 Hz"] - rs = RadioSetting("beep_freq", "Beep frequency", - RadioSettingValueList(options, - options[_settings.beep_freq])) + rs = RadioSetting( + "beep_freq", "Beep frequency", + RadioSettingValueList( + options, current_index=_settings.beep_freq)) panel.append(rs) rs = RadioSetting("beep_volume", "Beep volume", RadioSettingValueInteger(0, 100, _settings.beep_volume)) panel.append(rs) options = ["4800", "9600", "38400"] - rs = RadioSetting("cat_rate", "CAT rate", - RadioSettingValueList(options, - options[_settings.cat_rate])) + rs = RadioSetting( + "cat_rate", "CAT rate", + RadioSettingValueList( + options, current_index=_settings.cat_rate)) basic.append(rs) options = ["Blue", "Amber", "Violet"] rs = RadioSetting("color", "Color", RadioSettingValueList(options, - options[_settings.color])) + current_index=_settings.color)) panel.append(rs) rs = RadioSetting("contrast", "Contrast", RadioSettingValueInteger(1, 12, @@ -847,24 +852,28 @@ def get_settings(self): RadioSettingValueBoolean(_settings.cw_id)) cw.append(rs) options = ["Normal", "Reverse"] - rs = RadioSetting("cw_paddle", "CW paddle", - RadioSettingValueList(options, - options[_settings.cw_paddle])) + rs = RadioSetting( + "cw_paddle", "CW paddle", + RadioSettingValueList( + options, current_index=_settings.cw_paddle)) cw.append(rs) options = ["%i Hz" % i for i in range(300, 1001, 50)] - rs = RadioSetting("cw_pitch", "CW pitch", - RadioSettingValueList(options, - options[_settings.cw_pitch])) + rs = RadioSetting( + "cw_pitch", "CW pitch", + RadioSettingValueList( + options, current_index=_settings.cw_pitch)) cw.append(rs) options = ["%i wpm" % i for i in range(4, 61)] - rs = RadioSetting("cw_speed", "CW speed", - RadioSettingValueList(options, - options[_settings.cw_speed])) + rs = RadioSetting( + "cw_speed", "CW speed", + RadioSettingValueList( + options, current_index=_settings.cw_speed)) cw.append(rs) options = ["1:%1.1f" % (i / 10) for i in range(25, 46, 1)] - rs = RadioSetting("cw_weight", "CW weight", - RadioSettingValueList(options, - options[_settings.cw_weight])) + rs = RadioSetting( + "cw_weight", "CW weight", + RadioSettingValueList( + options, current_index=_settings.cw_weight)) cw.append(rs) rs = RadioSetting("dig_disp", "Dig disp (*10 Hz)", RadioSettingValueInteger(-300, 300, @@ -875,9 +884,10 @@ def get_settings(self): _settings.dig_mic)) packet.append(rs) options = ["RTTY", "PSK31-L", "PSK31-U", "USER-L", "USER-U"] - rs = RadioSetting("dig_mode", "Dig mode", - RadioSettingValueList(options, - options[_settings.dig_mode])) + rs = RadioSetting( + "dig_mode", "Dig mode", + RadioSettingValueList( + options, current_index=_settings.dig_mode)) packet.append(rs) rs = RadioSetting("dig_shift", "Dig shift (*10 Hz)", RadioSettingValueInteger(-300, 300, @@ -888,14 +898,16 @@ def get_settings(self): _settings.fm_mic)) basic.append(rs) options = ["Dial", "Freq", "Panel"] - rs = RadioSetting("lock_mode", "Lock mode", - RadioSettingValueList(options, - options[_settings.lock_mode])) + rs = RadioSetting( + "lock_mode", "Lock mode", + RadioSettingValueList( + options, current_index=_settings.lock_mode)) panel.append(rs) options = ["Fine", "Coarse"] - rs = RadioSetting("main_step", "Main step", - RadioSettingValueList(options, - options[_settings.main_step])) + rs = RadioSetting( + "main_step", "Main step", + RadioSettingValueList( + options, current_index=_settings.main_step)) panel.append(rs) rs = RadioSetting("mem_group", "Mem group", RadioSettingValueBoolean(_settings.mem_group)) @@ -907,46 +919,49 @@ def get_settings(self): RadioSettingValueBoolean(_settings.mic_scan)) basic.append(rs) options = ["Off", "SSB", "CW"] - rs = RadioSetting("op_filter", "Optional filter", - RadioSettingValueList(options, - options[_settings.op_filter])) + rs = RadioSetting( + "op_filter", "Optional filter", + RadioSettingValueList( + options, current_index=_settings.op_filter)) basic.append(rs) rs = RadioSetting("pkt_mic", "Packet mic", RadioSettingValueInteger(0, 100, _settings.pkt_mic)) packet.append(rs) options = ["1200", "9600"] - rs = RadioSetting("pkt_rate", "Packet rate", - RadioSettingValueList(options, - options[_settings.pkt_rate])) + rs = RadioSetting( + "pkt_rate", "Packet rate", + RadioSettingValueList( + options, current_index=_settings.pkt_rate)) packet.append(rs) options = ["Off", "3 sec", "5 sec", "10 sec"] - rs = RadioSetting("resume_scan", "Resume scan", - RadioSettingValueList(options, - options[_settings.resume_scan]) - ) + rs = RadioSetting( + "resume_scan", "Resume scan", + RadioSettingValueList( + options, current_index=_settings.resume_scan)) basic.append(rs) options = ["Cont", "Chk"] rs = RadioSetting("scope", "Scope", RadioSettingValueList(options, - options[_settings.scope])) + current_index=_settings.scope)) basic.append(rs) rs = RadioSetting("sidetone", "Sidetone", RadioSettingValueInteger(0, 100, _settings.sidetone)) cw.append(rs) options = ["RF-Gain", "Squelch"] - rs = RadioSetting("sql_rf_gain", "Squelch/RF-Gain", - RadioSettingValueList(options, - options[_settings.sql_rf_gain]) - ) + rs = RadioSetting( + "sql_rf_gain", "Squelch/RF-Gain", + RadioSettingValueList( + options, current_index=_settings.sql_rf_gain)) panel.append(rs) rs = RadioSetting("ssb_mic", "SSB Mic", RadioSettingValueInteger(0, 100, _settings.ssb_mic)) basic.append(rs) options = ["%i" % i for i in range(0, 21)] options[0] = "Off" - rs = RadioSetting("tot_time", "Time-out timer", - RadioSettingValueList(options, - options[_settings.tot_time])) + rs = RadioSetting( + "tot_time", "Time-out timer", + RadioSettingValueList( + options, current_index=_settings.tot_time)) basic.append(rs) rs = RadioSetting("vox_delay", "VOX delay (*100 ms)", RadioSettingValueInteger(1, 25, _settings.vox_delay)) @@ -958,9 +973,8 @@ def get_settings(self): RadioSettingValueBoolean(_settings.extended_menu)) extended.append(rs) options = ["Tn-Rn", "Tn-Riv", "Tiv-Rn", "Tiv-Riv"] - rs = RadioSetting("dcs_inv", "DCS coding", - RadioSettingValueList(options, - options[_settings.dcs_inv])) + rs = RadioSetting("dcs_inv", "DCS coding", RadioSettingValueList( + options, current_index=_settings.dcs_inv)) extended.append(rs) rs = RadioSetting("r_lsb_car", "LSB Rx carrier point (*10 Hz)", RadioSettingValueInteger(-30, 30, @@ -980,39 +994,42 @@ def get_settings(self): extended.append(rs) options = ["Hi", "L3", "L2", "L1"] - rs = RadioSetting("tx_power", "TX power", - RadioSettingValueList(options, - options[_settings.tx_power])) + rs = RadioSetting( + "tx_power", "TX power", + RadioSettingValueList( + options, current_index=_settings.tx_power)) basic.append(rs) options = ["Front", "Rear"] - rs = RadioSetting("hf_antenna", "HF", - RadioSettingValueList(options, - options[_settings.hf_antenna])) + rs = RadioSetting( + "hf_antenna", "HF", + RadioSettingValueList( + options, current_index=_settings.hf_antenna)) antenna.append(rs) - rs = RadioSetting("sixm_antenna", "6M", - RadioSettingValueList(options, - options[_settings.sixm_antenna] - )) + rs = RadioSetting( + "sixm_antenna", "6M", + RadioSettingValueList( + options, current_index=_settings.sixm_antenna)) antenna.append(rs) - rs = RadioSetting("bc_antenna", "Broadcasting", - RadioSettingValueList(options, - options[_settings.bc_antenna])) + rs = RadioSetting( + "bc_antenna", "Broadcasting", + RadioSettingValueList( + options, current_index=_settings.bc_antenna)) antenna.append(rs) - rs = RadioSetting("air_antenna", "Air band", - RadioSettingValueList(options, - options[_settings.air_antenna]) - ) + rs = RadioSetting( + "air_antenna", "Air band", + RadioSettingValueList( + options, current_index=_settings.air_antenna)) antenna.append(rs) - rs = RadioSetting("vhf_antenna", "VHF", - RadioSettingValueList(options, - options[_settings.vhf_antenna]) - ) + rs = RadioSetting( + "vhf_antenna", "VHF", + RadioSettingValueList( + options, current_index=_settings.vhf_antenna)) antenna.append(rs) - rs = RadioSetting("uhf_antenna", "UHF", - RadioSettingValueList(options, - options[_settings.uhf_antenna]) - ) + rs = RadioSetting( + "uhf_antenna", "UHF", + RadioSettingValueList( + options, current_index=_settings.uhf_antenna)) antenna.append(rs) st = RadioSettingValueString(0, 7, ''.join([self._CALLSIGN_CHARSET[x] @@ -1026,9 +1043,10 @@ def get_settings(self): RadioSettingValueBoolean(_settings.spl)) panelcontr.append(rs) options = ["None", "Up", "Down", "PMS"] - rs = RadioSetting("scn_mode", "Scan mode", - RadioSettingValueList(options, - options[_settings.scn_mode])) + rs = RadioSetting( + "scn_mode", "Scan mode", + RadioSettingValueList( + options, current_index=_settings.scn_mode)) panelcontr.append(rs) rs = RadioSetting("pri", "Priority", RadioSettingValueBoolean(_settings.pri)) @@ -1043,16 +1061,14 @@ def get_settings(self): RadioSettingValueBoolean(_settings.nb)) panelcontr.append(rs) options = ["Auto", "Fast", "Slow", "Off"] - rs = RadioSetting("agc", "AGC", - RadioSettingValueList(options, options[_settings.agc] - )) + rs = RadioSetting("agc", "AGC", RadioSettingValueList( + options, current_index=_settings.agc)) panelcontr.append(rs) options = ["PWR", "ALC", "SWR", "MOD"] - rs = RadioSetting("pwr_meter_mode", "Power meter mode", - RadioSettingValueList(options, - options[ - _settings.pwr_meter_mode - ])) + rs = RadioSetting( + "pwr_meter_mode", "Power meter mode", + RadioSettingValueList( + options, current_index=_settings.pwr_meter_mode)) panelcontr.append(rs) rs = RadioSetting("vox", "Vox", RadioSettingValueBoolean(_settings.vox)) @@ -1064,14 +1080,13 @@ def get_settings(self): RadioSettingValueBoolean(_settings.kyr)) cw.append(rs) options = ["enabled", "disabled"] - rs = RadioSetting("fst", "Fast", - RadioSettingValueList(options, options[_settings.fst] - )) + rs = RadioSetting("fst", "Fast", RadioSettingValueList( + options, current_index=_settings.fst)) panelcontr.append(rs) options = ["enabled", "disabled"] rs = RadioSetting("lock", "Lock", RadioSettingValueList(options, - options[_settings.lock])) + current_index=_settings.lock)) panelcontr.append(rs) return top diff --git a/chirp/drivers/ft857.py b/chirp/drivers/ft857.py index 13e13f0d..811fd7dd 100644 --- a/chirp/drivers/ft857.py +++ b/chirp/drivers/ft857.py @@ -548,24 +548,25 @@ def get_settings(self): RadioSettingValueBoolean(_settings.ars_430)) basic.append(rs) options = ["enable", "disable"] - rs = RadioSetting("disable_amfm_dial", "AM&FM Dial", - RadioSettingValueList(options, - options[ - _settings.disable_amfm_dial - ])) + rs = RadioSetting( + "disable_amfm_dial", "AM&FM Dial", + RadioSettingValueList( + options, current_index=_settings.disable_amfm_dial)) panel.append(rs) rs = RadioSetting("am_mic", "AM mic gain", RadioSettingValueInteger(0, 100, _settings.am_mic)) basic.append(rs) options = ["OFF", "1h", "2h", "3h", "4h", "5h", "6h"] - rs = RadioSetting("apo_time", "APO time", - RadioSettingValueList(options, - options[_settings.apo_time])) + rs = RadioSetting( + "apo_time", "APO time", + RadioSettingValueList( + options, current_index=_settings.apo_time)) basic.append(rs) options = ["OFF", "Range", "All"] - rs = RadioSetting("arts_beep", "ARTS beep", - RadioSettingValueList(options, - options[_settings.arts_beep])) + rs = RadioSetting( + "arts_beep", "ARTS beep", + RadioSettingValueList( + options, current_index=_settings.arts_beep)) basic.append(rs) rs = RadioSetting("arts_id", "ARTS ID", RadioSettingValueBoolean(_settings.arts_id)) @@ -603,15 +604,16 @@ def get_settings(self): rs = RadioSetting("beacon_text3", "Beacon text3", st) extended.append(rs) options = ["OFF"] + ["%i sec" % i for i in range(1, 256)] - rs = RadioSetting("beacon_time", "Beacon time", - RadioSettingValueList(options, - options[_settings.beacon_time]) - ) + rs = RadioSetting( + "beacon_time", "Beacon time", + RadioSettingValueList( + options, current_index=_settings.beacon_time)) extended.append(rs) options = ["440 Hz", "880 Hz", "1760 Hz"] - rs = RadioSetting("beep_tone", "Beep tone", - RadioSettingValueList(options, - options[_settings.beep_tone])) + rs = RadioSetting( + "beep_tone", "Beep tone", + RadioSettingValueList( + options, current_index=_settings.beep_tone)) panel.append(rs) rs = RadioSetting("beep_vol", "Beep volume", RadioSettingValueInteger(0, 100, _settings.beep_vol)) @@ -633,84 +635,87 @@ def get_settings(self): _settings.t_usb_car)) extended.append(rs) options = ["4800", "9600", "38400"] - rs = RadioSetting("cat_rate", "CAT rate", - RadioSettingValueList(options, - options[_settings.cat_rate])) + rs = RadioSetting( + "cat_rate", "CAT rate", + RadioSettingValueList( + options, current_index=_settings.cat_rate)) basic.append(rs) options = ["CAT", "Linear", "Tuner"] - rs = RadioSetting("cat_lin_tun", "CAT/LIN/TUN selection", - RadioSettingValueList(options, - options[_settings.cat_lin_tun]) - ) + rs = RadioSetting( + "cat_lin_tun", "CAT/LIN/TUN selection", + RadioSettingValueList( + options, current_index=_settings.cat_lin_tun)) extended.append(rs) options = ["MAIN", "VFO/MEM", "CLAR"] # TODO test the 3 options on non D radio # which have only SEL and MAIN - rs = RadioSetting("clar_dial_sel", "Clarifier dial selection", - RadioSettingValueList(options, - options[ - _settings.clar_dial_sel])) + rs = RadioSetting( + "clar_dial_sel", "Clarifier dial selection", + RadioSettingValueList( + options, current_index=_settings.clar_dial_sel)) panel.append(rs) rs = RadioSetting("cw_auto_mode", "CW Automatic mode", RadioSettingValueBoolean(_settings.cw_auto_mode)) cw.append(rs) options = ["USB", "LSB", "AUTO"] - rs = RadioSetting("cw_bfo", "CW BFO", - RadioSettingValueList(options, - options[_settings.cw_bfo])) + rs = RadioSetting("cw_bfo", "CW BFO", RadioSettingValueList( + options, current_index=_settings.cw_bfo)) cw.append(rs) options = ["FULL"] + ["%i ms" % (i * 10) for i in range(3, 301)] val = (_settings.cw_delay + _settings.cw_delay_hi * 256) - 2 rs = RadioSetting("cw_delay", "CW delay", - RadioSettingValueList(options, options[val])) + RadioSettingValueList(options, current_index=val)) cw.append(rs) options = ["Normal", "Reverse"] - rs = RadioSetting("cw_key_rev", "CW key reverse", - RadioSettingValueList(options, - options[_settings.cw_key_rev])) + rs = RadioSetting( + "cw_key_rev", "CW key reverse", + RadioSettingValueList( + options, current_index=_settings.cw_key_rev)) cw.append(rs) rs = RadioSetting("cw_paddle", "CW paddle", RadioSettingValueBoolean(_settings.cw_paddle)) cw.append(rs) options = ["%i Hz" % i for i in range(400, 801, 100)] - rs = RadioSetting("cw_pitch", "CW pitch", - RadioSettingValueList(options, - options[_settings.cw_pitch])) + rs = RadioSetting( + "cw_pitch", "CW pitch", + RadioSettingValueList( + options, current_index=_settings.cw_pitch)) cw.append(rs) options = ["%i ms" % i for i in range(5, 31, 5)] - rs = RadioSetting("cw_qsk", "CW QSK", - RadioSettingValueList(options, - options[_settings.cw_qsk])) + rs = RadioSetting("cw_qsk", "CW QSK", RadioSettingValueList( + options, current_index=_settings.cw_qsk)) cw.append(rs) rs = RadioSetting("cw_sidetone", "CW sidetone volume", RadioSettingValueInteger(0, 100, _settings.cw_sidetone)) cw.append(rs) options = ["%i wpm" % i for i in range(4, 61)] - rs = RadioSetting("cw_speed", "CW speed", - RadioSettingValueList(options, - options[_settings.cw_speed])) + rs = RadioSetting( + "cw_speed", "CW speed", + RadioSettingValueList( + options, current_index=_settings.cw_speed)) cw.append(rs) options = ["Numeric", "Alphabet", "AlphaNumeric"] - rs = RadioSetting("cw_training", "CW training", - RadioSettingValueList(options, - options[_settings.cw_training]) - ) + rs = RadioSetting( + "cw_training", "CW training", + RadioSettingValueList( + options, current_index=_settings.cw_training)) cw.append(rs) options = ["1:%1.1f" % (i / 10) for i in range(25, 46, 1)] - rs = RadioSetting("cw_weight", "CW weight", - RadioSettingValueList(options, - options[_settings.cw_weight])) + rs = RadioSetting( + "cw_weight", "CW weight", + RadioSettingValueList( + options, current_index=_settings.cw_weight)) cw.append(rs) options = ["Tn-Rn", "Tn-Riv", "Tiv-Rn", "Tiv-Riv"] - rs = RadioSetting("dcs_inv", "DCS inv", - RadioSettingValueList(options, - options[_settings.dcs_inv])) + rs = RadioSetting("dcs_inv", "DCS inv", RadioSettingValueList( + options, current_index=_settings.dcs_inv)) extended.append(rs) options = ["Fine", "Coarse"] - rs = RadioSetting("dial_step", "Dial step", - RadioSettingValueList(options, - options[_settings.dial_step])) + rs = RadioSetting( + "dial_step", "Dial step", + RadioSettingValueList( + options, current_index=_settings.dial_step)) panel.append(rs) rs = RadioSetting("dig_disp", "Dig disp (*10 Hz)", RadioSettingValueInteger(-300, 300, @@ -721,9 +726,10 @@ def get_settings(self): _settings.dig_mic)) packet.append(rs) options = ["RTTYL", "RTTYU", "PSK31-L", "PSK31-U", "USER-L", "USER-U"] - rs = RadioSetting("dig_mode", "Dig mode", - RadioSettingValueList(options, - options[_settings.dig_mode])) + rs = RadioSetting( + "dig_mode", "Dig mode", + RadioSettingValueList( + options, current_index=_settings.dig_mode)) packet.append(rs) rs = RadioSetting("dig_shift", "Dig shift (*10 Hz)", RadioSettingValueInteger(-300, 300, @@ -733,9 +739,10 @@ def get_settings(self): RadioSettingValueInteger(0, 100, _settings.dig_vox)) packet.append(rs) options = ["ARTS", "BAND", "FIX", "MEMGRP", "MODE", "MTR", "VFO"] - rs = RadioSetting("disp_color", "Display color mode", - RadioSettingValueList(options, - options[_settings.disp_color])) + rs = RadioSetting( + "disp_color", "Display color mode", + RadioSettingValueList( + options, current_index=_settings.disp_color)) panel.append(rs) rs = RadioSetting("disp_color_arts", "Display color ARTS set", RadioSettingValueInteger(0, 1, @@ -778,21 +785,22 @@ def get_settings(self): _settings.disp_intensity)) panel.append(rs) options = ["OFF", "Auto1", "Auto2", "ON"] - rs = RadioSetting("disp_mode", "Display backlight mode", - RadioSettingValueList(options, - options[_settings.disp_mode])) + rs = RadioSetting( + "disp_mode", "Display backlight mode", + RadioSettingValueList( + options, current_index=_settings.disp_mode)) panel.append(rs) options = ["60 Hz", "120 Hz", "240 Hz"] rs = RadioSetting("dsp_bpf", "Dsp band pass filter", - RadioSettingValueList(options, - options[_settings.dsp_bpf])) + RadioSettingValueList( + options, current_index=_settings.dsp_bpf)) cw.append(rs) options = ["100 Hz", "160 Hz", "220 Hz", "280 Hz", "340 Hz", "400 Hz", "460 Hz", "520 Hz", "580 Hz", "640 Hz", "720 Hz", "760 Hz", "820 Hz", "880 Hz", "940 Hz", "1000 Hz"] - rs = RadioSetting("dsp_hpf", "Dsp hi pass filter cut off", - RadioSettingValueList(options, - options[_settings.dsp_hpf])) + rs = RadioSetting( + "dsp_hpf", "Dsp hi pass filter cut off", + RadioSettingValueList(options, current_index=_settings.dsp_hpf)) basic.append(rs) options = ["1000 Hz", "1160 Hz", "1320 Hz", "1480 Hz", "1650 Hz", "1800 Hz", "1970 Hz", "2130 Hz", "2290 Hz", "2450 Hz", @@ -801,14 +809,15 @@ def get_settings(self): "4230 Hz", "4390 Hz", "4550 Hz", "4710 Hz", "4870 Hz", "5030 Hz", "5190 Hz", "5390 Hz", "5520 Hz", "5680 Hz", "5840 Hz", "6000 Hz"] - rs = RadioSetting("dsp_lpf", "Dsp low pass filter cut off", - RadioSettingValueList(options, - options[_settings.dsp_lpf])) + rs = RadioSetting( + "dsp_lpf", "Dsp low pass filter cut off", + RadioSettingValueList(options, current_index=_settings.dsp_lpf)) basic.append(rs) options = ["OFF", "LPF", "HPF", "BOTH"] - rs = RadioSetting("dsp_mic_eq", "Dsp mic equalization", - RadioSettingValueList(options, - options[_settings.dsp_mic_eq])) + rs = RadioSetting( + "dsp_mic_eq", "Dsp mic equalization", + RadioSettingValueList( + options, current_index=_settings.dsp_mic_eq)) basic.append(rs) rs = RadioSetting("dsp_nr", "DSP noise reduction level", RadioSettingValueInteger(1, 16, @@ -822,40 +831,40 @@ def get_settings(self): RadioSettingValueBoolean(_settings.home_vfo)) panel.append(rs) options = ["Dial", "Freq", "Panel", "All"] - rs = RadioSetting("lock_mode", "Lock mode", - RadioSettingValueList(options, - options[_settings.lock_mode])) + rs = RadioSetting( + "lock_mode", "Lock mode", + RadioSettingValueList( + options, current_index=_settings.lock_mode)) panel.append(rs) rs = RadioSetting("mem_group", "Mem group", RadioSettingValueBoolean(_settings.mem_group)) basic.append(rs) options = ["CW SIDETONE", "CW SPEED", "MHz/MEM GRP", "MIC GAIN", "NB LEVEL", "RF POWER", "STEP"] - rs = RadioSetting("mem_vfo_dial_mode", "Mem/VFO dial mode", - RadioSettingValueList(options, - options[ - _settings.mem_vfo_dial_mode - ])) + rs = RadioSetting( + "mem_vfo_dial_mode", "Mem/VFO dial mode", + RadioSettingValueList( + options, current_index=_settings.mem_vfo_dial_mode)) panel.append(rs) rs = RadioSetting("mic_scan", "Mic scan", RadioSettingValueBoolean(_settings.mic_scan)) basic.append(rs) options = ["NOR", "RMT", "CAT"] rs = RadioSetting("mic_sel", "Mic selection", - RadioSettingValueList(options, - options[_settings.mic_sel])) + RadioSettingValueList( + options, current_index=_settings.mic_sel)) extended.append(rs) options = ["SIG", "CTR", "VLT", "N/A", "FS", "OFF"] - rs = RadioSetting("mtr_arx_sel", "Meter receive selection", - RadioSettingValueList(options, - options[_settings.mtr_arx_sel]) - ) + rs = RadioSetting( + "mtr_arx_sel", "Meter receive selection", + RadioSettingValueList( + options, current_index=_settings.mtr_arx_sel)) extended.append(rs) options = ["PWR", "ALC", "MOD", "SWR", "VLT", "N/A", "OFF"] - rs = RadioSetting("mtr_atx_sel", "Meter transmit selection", - RadioSettingValueList(options, - options[_settings.mtr_atx_sel]) - ) + rs = RadioSetting( + "mtr_atx_sel", "Meter transmit selection", + RadioSettingValueList( + options, current_index=_settings.mtr_atx_sel)) extended.append(rs) rs = RadioSetting("mtr_peak_hold", "Meter peak hold", RadioSettingValueBoolean(_settings.mtr_peak_hold)) @@ -917,9 +926,10 @@ def get_settings(self): RadioSettingValueInteger(0, 100, _settings.pkt9600)) packet.append(rs) options = ["1200", "9600"] - rs = RadioSetting("pkt_rate", "Packet rate", - RadioSettingValueList(options, - options[_settings.pkt_rate])) + rs = RadioSetting( + "pkt_rate", "Packet rate", + RadioSettingValueList( + options, current_index=_settings.pkt_rate)) packet.append(rs) rs = RadioSetting("proc_level", "Proc level", RadioSettingValueInteger(0, 100, @@ -942,9 +952,10 @@ def get_settings(self): _settings.rf_power_uhf)) basic.append(rs) options = ["TIME", "BUSY", "STOP"] - rs = RadioSetting("scan_mode", "Scan mode", - RadioSettingValueList(options, - options[_settings.scan_mode])) + rs = RadioSetting( + "scan_mode", "Scan mode", + RadioSettingValueList( + options, current_index=_settings.scan_mode)) basic.append(rs) rs = RadioSetting("scan_resume", "Scan resume", RadioSettingValueInteger(1, 10, @@ -954,23 +965,25 @@ def get_settings(self): RadioSettingValueBoolean(_settings.split_tone)) extended.append(rs) options = ["RF-Gain", "Squelch"] - rs = RadioSetting("sql_rf_gain", "Squelch/RF-Gain", - RadioSettingValueList(options, - options[_settings.sql_rf_gain]) - ) + rs = RadioSetting( + "sql_rf_gain", "Squelch/RF-Gain", + RadioSettingValueList( + options, current_index=_settings.sql_rf_gain)) panel.append(rs) rs = RadioSetting("ssb_mic", "SSB Mic gain", RadioSettingValueInteger(0, 100, _settings.ssb_mic)) basic.append(rs) options = ["Off"] + ["%i" % i for i in range(1, 21)] - rs = RadioSetting("tot_time", "Time-out timer", - RadioSettingValueList(options, - options[_settings.tot_time])) + rs = RadioSetting( + "tot_time", "Time-out timer", + RadioSettingValueList( + options, current_index=_settings.tot_time)) basic.append(rs) options = ["OFF", "ATAS(HF)", "ATAS(HF&50)", "ATAS(ALL)", "TUNER"] - rs = RadioSetting("tuner_atas", "Tuner/ATAS device", - RadioSettingValueList(options, - options[_settings.tuner_atas])) + rs = RadioSetting( + "tuner_atas", "Tuner/ATAS device", + RadioSettingValueList( + options, current_index=_settings.tuner_atas)) extended.append(rs) rs = RadioSetting("tx_if_filter", "Transmit IF filter", RadioSettingValueList(self.FILTERS, @@ -997,9 +1010,10 @@ def get_settings(self): (-1 if _settings.xvtr_b_negative else 1))) extended.append(rs) options = ["OFF", "XVTR A", "XVTR B"] - rs = RadioSetting("xvtr_sel", "Transverter function selection", - RadioSettingValueList(options, - options[_settings.xvtr_sel])) + rs = RadioSetting( + "xvtr_sel", "Transverter function selection", + RadioSettingValueList( + options, current_index=_settings.xvtr_sel)) extended.append(rs) rs = RadioSetting("disp", "Display large", @@ -1011,13 +1025,13 @@ def get_settings(self): options = ["Auto", "Fast", "Slow", "Off"] rs = RadioSetting("agc", "AGC", RadioSettingValueList(options, - options[_settings.agc])) + current_index=_settings.agc)) panelcontr.append(rs) options = ["PWR", "ALC", "SWR", "MOD"] - rs = RadioSetting("pwr_meter_mode", "Power meter mode", - RadioSettingValueList(options, - options[ - _settings.pwr_meter_mode])) + rs = RadioSetting( + "pwr_meter_mode", "Power meter mode", + RadioSettingValueList( + options, current_index=_settings.pwr_meter_mode)) panelcontr.append(rs) rs = RadioSetting("vox", "Vox", RadioSettingValueBoolean(_settings.vox)) @@ -1029,23 +1043,22 @@ def get_settings(self): RadioSettingValueBoolean(_settings.kyr)) cw.append(rs) options = ["enabled", "disabled"] - rs = RadioSetting("fst", "Fast", - RadioSettingValueList(options, options[_settings.fst] - )) + rs = RadioSetting("fst", "Fast", RadioSettingValueList( + options, current_index=_settings.fst)) panelcontr.append(rs) options = ["enabled", "disabled"] rs = RadioSetting("lock", "Lock", RadioSettingValueList(options, - options[_settings.lock])) + current_index=_settings.lock)) panelcontr.append(rs) rs = RadioSetting("scope_peakhold", "Scope max hold", RadioSettingValueBoolean(_settings.scope_peakhold)) panelcontr.append(rs) options = ["21", "31", "127"] - rs = RadioSetting("scope_width", "Scope width (channels)", - RadioSettingValueList(options, - options[_settings.scope_width]) - ) + rs = RadioSetting( + "scope_width", "Scope width (channels)", + RadioSettingValueList( + options, current_index=_settings.scope_width)) panelcontr.append(rs) rs = RadioSetting("proc", "Speech processor", RadioSettingValueBoolean(_settings.proc)) diff --git a/chirp/drivers/ft90.py b/chirp/drivers/ft90.py index 37724a0a..a6d54c9a 100644 --- a/chirp/drivers/ft90.py +++ b/chirp/drivers/ft90.py @@ -546,13 +546,15 @@ def get_settings(self): basic.append(rs) options = ["Off", "S-3", "S-5", "S-Full"] rs = RadioSetting( - "rfsqlvl", "RF Squelch Level", - RadioSettingValueList(options, options[_settings.rfsqlvl])) + "rfsqlvl", "RF Squelch Level", + RadioSettingValueList( + options, current_index=_settings.rfsqlvl)) basic.append(rs) options = ["Off", "Band A", "Band B", "Both"] rs = RadioSetting( - "pttlock", "PTT Lock", - RadioSettingValueList(options, options[_settings.pttlock])) + "pttlock", "PTT Lock", + RadioSettingValueList( + options, current_index=_settings.pttlock)) basic.append(rs) rs = RadioSetting( @@ -568,78 +570,85 @@ def get_settings(self): options = ["OFF"] + [str(x) for x in (range(1, 12+1))] rs = RadioSetting( "apo", "APO time (hrs)", - RadioSettingValueList(options, options[_settings.apo])) + RadioSettingValueList(options, current_index=_settings.apo)) basic.append(rs) options = ["Off"] + [str(x) for x in (range(1, 60+1))] rs = RadioSetting( "tot", "Time Out Timer (mins)", - RadioSettingValueList(options, options[_settings.tot])) + RadioSettingValueList(options, current_index=_settings.tot)) basic.append(rs) options = ["off", "Auto/TX", "Auto", "TX"] rs = RadioSetting( - "fancontrol", "Fan Control", - RadioSettingValueList(options, options[_settings.fancontrol])) + "fancontrol", "Fan Control", + RadioSettingValueList( + options, current_index=_settings.fancontrol)) basic.append(rs) keyopts = ["Scan Up", "Scan Down", "Repeater", "Reverse", "Tone Burst", "Tx Power", "Home Ch", "VFO/MR", "Tone", "Priority"] rs = RadioSetting( "key_lt", "Left Key", - RadioSettingValueList(keyopts, keyopts[_settings.key_lt])) + RadioSettingValueList(keyopts, current_index=_settings.key_lt)) keymaps.append(rs) rs = RadioSetting( "key_rt", "Right Key", - RadioSettingValueList(keyopts, keyopts[_settings.key_rt])) + RadioSettingValueList(keyopts, current_index=_settings.key_rt)) keymaps.append(rs) rs = RadioSetting( "key_p1", "P1 Key", - RadioSettingValueList(keyopts, keyopts[_settings.key_p1])) + RadioSettingValueList(keyopts, current_index=_settings.key_p1)) keymaps.append(rs) rs = RadioSetting( "key_p2", "P2 Key", - RadioSettingValueList(keyopts, keyopts[_settings.key_p2])) + RadioSettingValueList(keyopts, current_index=_settings.key_p2)) keymaps.append(rs) rs = RadioSetting( - "key_acc", "ACC Key", - RadioSettingValueList(keyopts, keyopts[_settings.key_acc])) + "key_acc", "ACC Key", + RadioSettingValueList( + keyopts, current_index=_settings.key_acc)) keymaps.append(rs) options = [str(x) for x in range(0, 12+1)] rs = RadioSetting( - "lcdcontrast", "LCD Contrast", - RadioSettingValueList(options, options[_settings.lcdcontrast])) + "lcdcontrast", "LCD Contrast", + RadioSettingValueList( + options, current_index=_settings.lcdcontrast)) basic.append(rs) options = ["off", "d4", "d3", "d2", "d1"] rs = RadioSetting( "dimmer", "Dimmer", - RadioSettingValueList(options, options[_settings.dimmer])) + RadioSettingValueList(options, current_index=_settings.dimmer)) basic.append(rs) options = ["TRX Normal", "RX Reverse", "TX Reverse", "TRX Reverse"] rs = RadioSetting( - "dcsmode", "DCS Mode", - RadioSettingValueList(options, options[_settings.dcsmode])) + "dcsmode", "DCS Mode", + RadioSettingValueList( + options, current_index=_settings.dcsmode)) basic.append(rs) options = ["50 ms", "100 ms"] rs = RadioSetting( - "dtmfspeed", "DTMF Speed", - RadioSettingValueList(options, options[_settings.dtmfspeed])) + "dtmfspeed", "DTMF Speed", + RadioSettingValueList( + options, current_index=_settings.dtmfspeed)) autodial.append(rs) options = ["50 ms", "250 ms", "450 ms", "750 ms", "1 sec"] rs = RadioSetting( - "dtmftxdelay", "DTMF TX Delay", - RadioSettingValueList(options, options[_settings.dtmftxdelay])) + "dtmftxdelay", "DTMF TX Delay", + RadioSettingValueList( + options, current_index=_settings.dtmftxdelay)) autodial.append(rs) options = [str(x) for x in range(1, 8 + 1)] rs = RadioSetting( - "dtmf_active", "DTMF Active", - RadioSettingValueList(options, options[_settings.dtmf_active])) + "dtmf_active", "DTMF Active", + RadioSettingValueList( + options, current_index=_settings.dtmf_active)) autodial.append(rs) # setup 8 dtmf autodial entries diff --git a/chirp/drivers/ftlx011.py b/chirp/drivers/ftlx011.py index 028a0157..26c67183 100644 --- a/chirp/drivers/ftlx011.py +++ b/chirp/drivers/ftlx011.py @@ -516,7 +516,7 @@ def get_memory(self, number): bcl = RadioSetting("bclo", "Busy channel lockout", RadioSettingValueList(LIST_BCL, - LIST_BCL[bcls])) + current_index=bcls)) mem.extra.append(bcl) # return mem @@ -627,23 +627,23 @@ def get_settings(self): # ## Basic Settings scanr = RadioSetting("scan_resume", "Scan resume by", RadioSettingValueList( - LIST_SCAN_RESUME, LIST_SCAN_RESUME[_settings.scan_resume])) + LIST_SCAN_RESUME, current_index=_settings.scan_resume)) basic.append(scanr) scant = RadioSetting("scan_time", "Scan time per channel", RadioSettingValueList( - LIST_SCAN_TIME, LIST_SCAN_TIME[_settings.scan_time])) + LIST_SCAN_TIME, current_index=_settings.scan_time)) basic.append(scant) LIST_PCH = ["%s" % x for x in range(1, _settings.chcount + 1)] pch1 = RadioSetting("pch1", "Priority channel 1", RadioSettingValueList( - LIST_PCH, LIST_PCH[_settings.pch1])) + LIST_PCH, current_index=_settings.pch1)) basic.append(pch1) pch2 = RadioSetting("pch2", "Priority channel 2", RadioSettingValueList( - LIST_PCH, LIST_PCH[_settings.pch2])) + LIST_PCH, current_index=_settings.pch2)) basic.append(pch2) scanp = RadioSetting("priority_during_scan", "Disable priority during scan", @@ -652,7 +652,7 @@ def get_settings(self): scanps = RadioSetting("priority_speed", "Priority scan speed", RadioSettingValueList( - LIST_SCAN_P_SPEED, LIST_SCAN_P_SPEED[_settings.priority_speed])) + LIST_SCAN_P_SPEED, current_index=_settings.priority_speed)) basic.append(scanps) oh = RadioSetting("off_hook", "Off Hook", # inverted @@ -665,17 +665,17 @@ def get_settings(self): tot = RadioSetting("tot", "Time out timer", RadioSettingValueList( - LIST_TOT, LIST_TOT[_settings.tot])) + LIST_TOT, current_index=_settings.tot)) basic.append(tot) totr = RadioSetting("tot_resume", "Time out timer resume guard", RadioSettingValueList( - LIST_TOT_RESUME, LIST_TOT_RESUME[_settings.tot_resume])) + LIST_TOT_RESUME, current_index=_settings.tot_resume)) basic.append(totr) ak = RadioSetting("a_key", "A Key function", RadioSettingValueList( - LIST_A_KEY, LIST_A_KEY[_settings.a_key])) + LIST_A_KEY, current_index=_settings.a_key)) basic.append(ak) monitor = RadioSetting("monitor", "Monitor", # inverted @@ -684,7 +684,7 @@ def get_settings(self): homec = RadioSetting("home_channel", "Home Channel is", RadioSettingValueList( - LIST_HOME_CHANNEL, LIST_HOME_CHANNEL[_settings.home_channel])) + LIST_HOME_CHANNEL, current_index=_settings.home_channel)) basic.append(homec) txd = RadioSetting("tx_carrier_delay", "Talk Back", diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py index 9e10102e..e19252ca 100644 --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -760,7 +760,7 @@ def get_settings(self): RadioSetting(key, title, RadioSettingValueList( choices, - choices[val]))) + current_index=val))) if self.VENDOR == "Retevis": # Side Keys @@ -783,7 +783,7 @@ def apply_sk_listvalue(setting, obj): idx = SK_VALUES.index(0xFF) rs = RadioSetting('skey.skey1sp', 'Side Key 1 - Short Press', RadioSettingValueList(SK_CHOICES, - SK_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_sk_listvalue, _skey.skey1sp) adv.append(rs) @@ -794,7 +794,7 @@ def apply_sk_listvalue(setting, obj): idx = SK_VALUES.index(0xFF) rs = RadioSetting('skey.skey1lp', 'Side Key 1 - Long Press', RadioSettingValueList(SK_CHOICES, - SK_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_sk_listvalue, _skey.skey1lp) adv.append(rs) @@ -805,7 +805,7 @@ def apply_sk_listvalue(setting, obj): idx = SK_VALUES.index(0xFF) rs = RadioSetting('skey.skey2sp', 'Side Key 2 - Short Press', RadioSettingValueList(SK_CHOICES, - SK_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_sk_listvalue, _skey.skey2sp) adv.append(rs) @@ -816,7 +816,7 @@ def apply_sk_listvalue(setting, obj): idx = SK_VALUES.index(0xFF) rs = RadioSetting('skey.skey2lp', 'Side Key 2 - Long Press', RadioSettingValueList(SK_CHOICES, - SK_CHOICES[idx])) + current_index=idx)) rs.set_apply_callback(apply_sk_listvalue, _skey.skey2lp) adv.append(rs) diff --git a/chirp/drivers/gmrsuv1.py b/chirp/drivers/gmrsuv1.py index 382d3d75..b5f99429 100644 --- a/chirp/drivers/gmrsuv1.py +++ b/chirp/drivers/gmrsuv1.py @@ -670,7 +670,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -679,7 +679,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -688,7 +688,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -697,7 +697,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -714,7 +714,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -723,12 +723,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -737,12 +738,13 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) if _mem.settings.pttlt > 0x32: @@ -753,14 +755,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.sync", "Sync A & B", @@ -769,23 +773,23 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) rs = RadioSetting("settings.dbptt", "Double PTT", @@ -798,7 +802,7 @@ def get_settings(self): val = _mem.settings.tdrab rs = RadioSetting("settings.tdrab", "Dual Watch TX Priority", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[val])) + LIST_OFFAB, current_index=val)) basic.append(rs) rs = RadioSetting("settings.ste", "Squelch Tail Eliminate (HT to HT)", @@ -812,7 +816,7 @@ def get_settings(self): rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - LIST_RPSTE, LIST_RPSTE[val])) + LIST_RPSTE, current_index=val)) basic.append(rs) if _mem.settings.rptrl > 0x0A: @@ -821,27 +825,28 @@ def get_settings(self): val = _mem.settings.rptrl rs = RadioSetting("settings.rptrl", "STE Repeater Delay", RadioSettingValueList( - LIST_STEDELAY, LIST_STEDELAY[val])) + LIST_STEDELAY, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", RadioSettingValueBoolean(_mem.settings.roger)) basic.append(rs) - rs = RadioSetting("settings.rtone", "Tone Burst Frequency", - RadioSettingValueList(LIST_RTONE, LIST_RTONE[ - _mem.settings.rtone])) + rs = RadioSetting( + "settings.rtone", "Tone Burst Frequency", + RadioSettingValueList( + LIST_RTONE, current_index=_mem.settings.rtone)) basic.append(rs) rs = RadioSetting("settings.rogerrx", "Roger Beep (RX)", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[ - _mem.settings.rogerrx])) + LIST_OFFAB, current_index=_mem.settings.rogerrx)) basic.append(rs) # Advanced settings @@ -905,13 +910,13 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.workmode", "VFO/MR Mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.workmode])) + current_index=_mem.settings.workmode)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -963,11 +968,11 @@ def apply_freq(setting, obj): rs = RadioSetting("vfo.a.step", "VFO A Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.a.step])) + LIST_STEP, current_index=_mem.vfo.a.step)) work.append(rs) rs = RadioSetting("vfo.b.step", "VFO B Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.b.step])) + LIST_STEP, current_index=_mem.vfo.b.step)) work.append(rs) # broadcast FM settings @@ -1008,7 +1013,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -1017,7 +1022,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -1030,7 +1035,7 @@ def apply_code(setting, obj, length): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) def apply_alarmcode(setting, obj, length): diff --git a/chirp/drivers/gmrsv2.py b/chirp/drivers/gmrsv2.py index e03d19ff..dca2dc98 100644 --- a/chirp/drivers/gmrsv2.py +++ b/chirp/drivers/gmrsv2.py @@ -648,7 +648,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -657,7 +657,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -666,7 +666,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -675,7 +675,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -692,7 +692,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -701,12 +701,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -715,7 +716,7 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) if _mem.settings.pttlt > 0x32: @@ -726,14 +727,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.sync", "Sync A & B", @@ -742,23 +745,23 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) rs = RadioSetting("settings.dbptt", "Double PTT", @@ -771,7 +774,7 @@ def get_settings(self): val = _mem.settings.tdrab rs = RadioSetting("settings.tdrab", "Dual Watch TX Priority", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[val])) + LIST_OFFAB, current_index=val)) basic.append(rs) rs = RadioSetting("settings.ste", "Squelch Tail Eliminate (HT to HT)", @@ -785,7 +788,7 @@ def get_settings(self): rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - LIST_RPSTE, LIST_RPSTE[val])) + LIST_RPSTE, current_index=val)) basic.append(rs) if _mem.settings.rptrl > 0x0A: @@ -794,27 +797,28 @@ def get_settings(self): val = _mem.settings.rptrl rs = RadioSetting("settings.rptrl", "STE Repeater Delay", RadioSettingValueList( - LIST_STEDELAY, LIST_STEDELAY[val])) + LIST_STEDELAY, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", RadioSettingValueBoolean(_mem.settings.roger)) basic.append(rs) - rs = RadioSetting("settings.rtone", "Tone Burst Frequency", - RadioSettingValueList(LIST_RTONE, LIST_RTONE[ - _mem.settings.rtone])) + rs = RadioSetting( + "settings.rtone", "Tone Burst Frequency", + RadioSettingValueList( + LIST_RTONE, current_index=_mem.settings.rtone)) basic.append(rs) rs = RadioSetting("settings.rogerrx", "Roger Beep (RX)", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[ - _mem.settings.rogerrx])) + LIST_OFFAB, current_index=_mem.settings.rogerrx)) basic.append(rs) # Advanced settings @@ -878,13 +882,13 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.workmode", "VFO/MR Mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.workmode])) + current_index=_mem.settings.workmode)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -936,11 +940,11 @@ def apply_freq(setting, obj): rs = RadioSetting("vfo.a.step", "VFO A Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.a.step])) + LIST_STEP, current_index=_mem.vfo.a.step)) work.append(rs) rs = RadioSetting("vfo.b.step", "VFO B Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.b.step])) + LIST_STEP, current_index=_mem.vfo.b.step)) work.append(rs) # broadcast FM settings @@ -981,7 +985,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -990,7 +994,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -1003,7 +1007,7 @@ def apply_code(setting, obj, length): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) def apply_alarmcode(setting, obj, length): diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py index 55cbabec..6dac954b 100644 --- a/chirp/drivers/h777.py +++ b/chirp/drivers/h777.py @@ -499,7 +499,7 @@ def get_settings(self): rs = RadioSetting("voicelanguage", "Voice language", RadioSettingValueList( VOICE_LIST, - VOICE_LIST[_settings.voicelanguage])) + current_index=_settings.voicelanguage)) basic.append(rs) rs = RadioSetting("scan", "Scan", @@ -575,11 +575,11 @@ def get_settings(self): self._memobj.settings2.sidekeyfunction])) basic.append(rs) - rs = RadioSetting("settings2.timeouttimer", "Timeout timer", - RadioSettingValueList( - TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[ - self._memobj.settings2.timeouttimer])) + rs = RadioSetting( + "settings2.timeouttimer", "Timeout timer", + RadioSettingValueList( + TIMEOUTTIMER_LIST, + current_index=self._memobj.settings2.timeouttimer)) basic.append(rs) return top diff --git a/chirp/drivers/hg_uv98.py b/chirp/drivers/hg_uv98.py index 508183d4..c5ce38ed 100644 --- a/chirp/drivers/hg_uv98.py +++ b/chirp/drivers/hg_uv98.py @@ -553,41 +553,41 @@ def get_settings(self): basic.append( RadioSetting("roger", "Roger Beep", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[_settings.roger]))) + current_index=_settings.roger))) basic.append( RadioSetting("beep", "System Beep", RadioSettingValueBoolean(_settings.beep))) basic.append( RadioSetting("tot", "Timeout Timer (sec)", RadioSettingValueList(TOT_LIST, - TOT_LIST[_settings.tot]))) + current_index=_settings.tot))) basic.append( RadioSetting("toa", "Timeout Timer Alarm", RadioSettingValueList(TOA_LIST, - TOA_LIST[_settings.toa]))) + current_index=_settings.toa))) basic.append( RadioSetting("lockmode", "Lock Mode", RadioSettingValueList( LOCKMODE_LIST, - LOCKMODE_LIST[_settings.lockmode]))) + current_index=_settings.lockmode))) basic.append( RadioSetting("autolock", "Auto Lock", RadioSettingValueList( AUTOLOCK_LIST, - AUTOLOCK_LIST[_settings.autolock]))) + current_index=_settings.autolock))) basic.append( RadioSetting("auto_lock_dly", "Auto Lock Delay", RadioSettingValueList( AUTOLOCK_DLY_LIST, - AUTOLOCK_DLY_LIST[_settings.auto_lock_dly]))) + current_index=_settings.auto_lock_dly))) display.append( RadioSetting("abr", "Screen Save", RadioSettingValueList(ABR_LIST, - ABR_LIST[_settings.abr]))) + current_index=_settings.abr))) display.append( RadioSetting("abr_lv", "Back Light Brightness", RadioSettingValueList(ABR_LV_LIST, - ABR_LV_LIST[_settings.abr_lv]))) + current_index=_settings.abr_lv))) display.append( RadioSetting("night_mode", "Night Mode (Light on Dark)", RadioSettingValueBoolean(_settings.night_mode))) @@ -595,11 +595,11 @@ def get_settings(self): RadioSetting("menu_dly", "Menu Delay", RadioSettingValueList( MENU_DLY_LIST, - MENU_DLY_LIST[_settings.menu_dly]))) + current_index=_settings.menu_dly))) display.append( RadioSetting("english", "Language", RadioSettingValueList(LANG_LIST, - LANG_LIST[_settings.english]))) + current_index=_settings.english))) scan.append( RadioSetting("pri_scn", "Priority Scan", RadioSettingValueBoolean(_settings.pri_scn))) @@ -609,35 +609,35 @@ def get_settings(self): scan.append( RadioSetting("sc_rev", "Scan Resume", RadioSettingValueList(SC_REV_LIST, - SC_REV_LIST[_settings.sc_rev]))) + current_index=_settings.sc_rev))) scan.append( RadioSetting("sc_qt", "Code Save", RadioSettingValueList(SC_QT_LIST, - SC_QT_LIST[_settings.sc_qt]))) + current_index=_settings.sc_qt))) buttons.append( RadioSetting("pf1_short", "PF1 (Side, Upper) Button Short Press", RadioSettingValueList(PF1_LIST, - PF1_LIST[_settings.pf1_short]))) + current_index=_settings.pf1_short))) buttons.append( RadioSetting("pf1_long", "PF1 (Side, Upper) Button Long Press", RadioSettingValueList(PF1_LIST, - PF1_LIST[_settings.pf1_long]))) + current_index=_settings.pf1_long))) buttons.append( RadioSetting("pf2_short", "PF2 (Side, Lower) Button Short Press", RadioSettingValueList(PF2_LIST, - PF2_LIST[_settings.pf2_short]))) + current_index=_settings.pf2_short))) buttons.append( RadioSetting("pf2_long", "PF2 (Side, Lower) Button Long Press", RadioSettingValueList(PF2_LIST, - PF2_LIST[_settings.pf2_long]))) + current_index=_settings.pf2_long))) buttons.append( RadioSetting("top_short", "Top Button Short Press", RadioSettingValueList(TOP_LIST, - TOP_LIST[_settings.top_short]))) + current_index=_settings.top_short))) buttons.append( RadioSetting("top_long", "Top Button Long Press", RadioSettingValueList(TOP_LIST, - TOP_LIST[_settings.top_long]))) + current_index=_settings.top_long))) vfo.append( RadioSetting("tdr", "VFO B Enabled", RadioSettingValueBoolean(_settings.tdr))) @@ -645,20 +645,20 @@ def get_settings(self): RadioSetting("ch_a_step", "VFO Frequency Step (A)", RadioSettingValueList( STEP_LIST, - STEP_LIST[_settings.ch_a_step]))) + current_index=_settings.ch_a_step))) vfo.append( RadioSetting("ch_b_step", "VFO Frequency Step (B)", RadioSettingValueList( STEP_LIST, - STEP_LIST[_settings.ch_b_step]))) + current_index=_settings.ch_b_step))) vfo.append( RadioSetting("ch_a_sql", "Squelch (A)", RadioSettingValueList(SQL_LIST, - SQL_LIST[_settings.ch_a_sql]))) + current_index=_settings.ch_a_sql))) vfo.append( RadioSetting("ch_b_sql", "Squelch (B)", RadioSettingValueList(SQL_LIST, - SQL_LIST[_settings.ch_b_sql]))) + current_index=_settings.ch_b_sql))) vfo.append( RadioSetting("ch_a_mem_ch", "Memory Channel (A)", RadioSettingValueChannel(self, @@ -671,28 +671,28 @@ def get_settings(self): RadioSetting("ch_a_ch_mdf", "Memory Display Format (A)", RadioSettingValueList( MDF_LIST, - MDF_LIST[_settings.ch_a_ch_mdf]))) + current_index=_settings.ch_a_ch_mdf))) vfo.append( RadioSetting("ch_b_ch_mdf", "Memory Display Format (B)", RadioSettingValueList( MDF_LIST, - MDF_LIST[_settings.ch_b_ch_mdf]))) + current_index=_settings.ch_b_ch_mdf))) vfo.append( RadioSetting("ch_a_v_m", "VFO/MEM (A)", RadioSettingValueList( - VM_LIST, VM_LIST[_settings.ch_a_v_m]))) + VM_LIST, current_index=_settings.ch_a_v_m))) vfo.append( RadioSetting("ch_b_v_m", "VFO/MEM (B)", RadioSettingValueList( - VM_LIST, VM_LIST[_settings.ch_b_v_m]))) + VM_LIST, current_index=_settings.ch_b_v_m))) advanced.append( RadioSetting("vox_grd", "VOX Sensitivity", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.vox_grd]))) + VOX_LIST, current_index=_settings.vox_grd))) advanced.append( RadioSetting("vox_dly", "VOX Delay", RadioSettingValueList( - VOX_DLY_LIST, VOX_DLY_LIST[_settings.vox_dly]))) + VOX_DLY_LIST, current_index=_settings.vox_dly))) advanced.append( RadioSetting("voice", "Voice Assist", RadioSettingValueBoolean(_settings.voice))) @@ -703,7 +703,7 @@ def get_settings(self): RadioSetting("aprs_rx_band", "RX Band", RadioSettingValueList( APRS_RX_LIST, - APRS_RX_LIST[_settings.aprs_rx_band]))) + current_index=_settings.aprs_rx_band))) aprs.append( RadioSetting("ch_a_mute", "Band A Mute", RadioSettingValueBoolean(_settings.ch_a_mute))) @@ -714,7 +714,7 @@ def get_settings(self): RadioSetting("tx_priority", "TX Priority", RadioSettingValueList( TX_PRIORITY_LIST, - TX_PRIORITY_LIST[_settings.tx_priority]))) + current_index=_settings.tx_priority))) aprs.append( RadioSetting("aprs_rx_popup", "APRS Popup", RadioSettingValueBoolean(_settings.aprs_rx_popup))) @@ -728,7 +728,7 @@ def get_settings(self): RadioSetting("beacon_exit_dly", "Beacon Message Delay", RadioSettingValueList( BEACON_EXIT_DLY_LIST, - BEACON_EXIT_DLY_LIST[_settings.beacon_exit_dly]))) + current_index=_settings.beacon_exit_dly))) return top diff --git a/chirp/drivers/hobbypcb.py b/chirp/drivers/hobbypcb.py index 8166b326..ae2a40d9 100644 --- a/chirp/drivers/hobbypcb.py +++ b/chirp/drivers/hobbypcb.py @@ -194,7 +194,7 @@ def _get(cmd): ai = RadioSetting('AI%i', 'Arduino Input Pin', RadioSettingValueList( input_pin, - input_pin[int(_get('AI'))])) + current_index=int(_get('AI')))) io.append(ai) output_pin = ['LOW', 'SQ OPEN', 'DTMF DETECT', 'TX ON', 'CTCSS DET', @@ -202,20 +202,20 @@ def _get(cmd): ao = RadioSetting('AO%i', 'Arduino Output Pin', RadioSettingValueList( output_pin, - output_pin[int(_get('AO'))])) + current_index=int(_get('AO')))) io.append(ao) bauds = [str(x) for x in BAUDS] b1 = RadioSetting('B1%i', 'Arduino Baudrate', RadioSettingValueList( bauds, - bauds[int(_get('B1'))])) + current_index=int(_get('B1')))) io.append(b1) b2 = RadioSetting('B2%i', 'Main Baudrate', RadioSettingValueList( bauds, - bauds[int(_get('B2'))])) + current_index=int(_get('B2')))) io.append(b2) dtmf = RadioSettingGroup('dtmf', 'DTMF Settings') @@ -267,7 +267,7 @@ def _get(cmd): ld = RadioSetting('LD%i', 'LED Mode', RadioSettingValueList( ledmode, - ledmode[int(_get('LD'))])) + current_index=int(_get('LD')))) general.append(ld) sq = RadioSetting('SQ%i', 'Squelch Level', diff --git a/chirp/drivers/ic2300.py b/chirp/drivers/ic2300.py index 8b0a0abe..bd3a93e1 100644 --- a/chirp/drivers/ic2300.py +++ b/chirp/drivers/ic2300.py @@ -198,7 +198,8 @@ def get_memory(self, number): # Memory display style opt = ["Frequency", "Label"] dsp = RadioSetting("display_style", "Display style", - RadioSettingValueList(opt, opt[_mem.display_style])) + RadioSettingValueList( + opt, current_index=_mem.display_style)) dsp.set_doc("Memory display style") mem.extra.append(dsp) @@ -248,50 +249,49 @@ def get_settings(self): # Transmit timeout opt = ['Disabled', '1 minute'] + \ [s + ' minutes' for s in map(str, range(2, 31))] - rs = RadioSetting("tx_timeout", "Transmit timeout (min)", - RadioSettingValueList(opt, opt[ - _settings.tx_timeout - ])) + rs = RadioSetting( + "tx_timeout", "Transmit timeout (min)", + RadioSettingValueList(opt, current_index=_settings.tx_timeout)) basic.append(rs) # Auto Repeater (USA model only) opt = ["Disabled", "Duplex Only", "Duplex and tone"] - rs = RadioSetting("auto_repeater", "Auto repeater", - RadioSettingValueList(opt, opt[ - _settings.auto_repeater - ])) + rs = RadioSetting( + "auto_repeater", "Auto repeater", + RadioSettingValueList( + opt, current_index=_settings.auto_repeater)) basic.append(rs) # Auto Power Off opt = ["Disabled", "30 minutes", "60 minutes", "120 minutes"] - rs = RadioSetting("auto_power_off", "Auto power off", - RadioSettingValueList(opt, opt[ - _settings.auto_power_off - ])) + rs = RadioSetting( + "auto_power_off", "Auto power off", + RadioSettingValueList( + opt, current_index=_settings.auto_power_off)) basic.append(rs) # Squelch Delay opt = ["Short", "Long"] - rs = RadioSetting("squelch_delay", "Squelch delay", - RadioSettingValueList(opt, opt[ - _settings.squelch_delay - ])) + rs = RadioSetting( + "squelch_delay", "Squelch delay", + RadioSettingValueList( + opt, current_index=_settings.squelch_delay)) basic.append(rs) # Squelch Type opt = ["Noise squelch", "S-meter squelch", "Squelch attenuator"] - rs = RadioSetting("squelch_type", "Squelch type", - RadioSettingValueList(opt, opt[ - _settings.squelch_type - ])) + rs = RadioSetting( + "squelch_type", "Squelch type", + RadioSettingValueList( + opt, current_index=_settings.squelch_type)) basic.append(rs) # Repeater Lockout opt = ["Disabled", "Repeater lockout", "Busy lockout"] - rs = RadioSetting("repeater_lockout", "Repeater lockout", - RadioSettingValueList(opt, opt[ - _settings.repeater_lockout - ])) + rs = RadioSetting( + "repeater_lockout", "Repeater lockout", + RadioSettingValueList( + opt, current_index=_settings.repeater_lockout)) basic.append(rs) # DTMF Speed @@ -300,16 +300,15 @@ def get_settings(self): "300ms interval, 1.6 cps", "500ms interval, 1.0 cps"] rs = RadioSetting("dtmf_speed", "DTMF speed", - RadioSettingValueList(opt, opt[ - _settings.dtmf_speed - ])) + RadioSettingValueList( + opt, current_index=_settings.dtmf_speed)) basic.append(rs) # Scan pause timer opt = [s + ' seconds' for s in map(str, range(2, 22, 2))] + ['Hold'] rs = RadioSetting("scan_pause_timer", "Scan pause timer", RadioSettingValueList( - opt, opt[_settings.scan_pause_timer])) + opt, current_index=_settings.scan_pause_timer)) basic.append(rs) # Scan Resume Timer @@ -317,7 +316,7 @@ def get_settings(self): [s + ' seconds' for s in map(str, range(1, 6))] + ['Hold'] rs = RadioSetting("scan_resume_timer", "Scan resume timer", RadioSettingValueList( - opt, opt[_settings.scan_resume_timer])) + opt, current_index=_settings.scan_resume_timer)) basic.append(rs) # Weather Alert (USA model only) @@ -332,9 +331,10 @@ def get_settings(self): # Memory Display Type opt = ["Frequency", "Channel", "Name"] - rs = RadioSetting("display_type", "Memory display", - RadioSettingValueList(opt, - opt[_settings.display_type])) + rs = RadioSetting( + "display_type", "Memory display", + RadioSettingValueList( + opt, current_index=_settings.display_type)) front_panel.append(rs) # Display backlight brightness; @@ -342,14 +342,15 @@ def get_settings(self): rs = RadioSetting("display_brightness", "Backlight brightness", RadioSettingValueList( opt, - opt[_settings.display_brightness])) + current_index=_settings.display_brightness)) front_panel.append(rs) # Display backlight color opt = ["Amber", "Yellow", "Green"] - rs = RadioSetting("display_color", "Backlight color", - RadioSettingValueList(opt, - opt[_settings.display_color])) + rs = RadioSetting( + "display_color", "Backlight color", + RadioSettingValueList( + opt, current_index=_settings.display_color)) front_panel.append(rs) # Display contrast @@ -357,21 +358,21 @@ def get_settings(self): rs = RadioSetting("display_contrast", "Display contrast", RadioSettingValueList( opt, - opt[_settings.display_contrast])) + current_index=_settings.display_contrast)) front_panel.append(rs) # Auto dimmer opt = ["Disabled", "Backlight off", "1 (dimmest)", "2", "3"] rs = RadioSetting("auto_dimmer", "Auto dimmer", - RadioSettingValueList(opt, - opt[_settings.auto_dimmer])) + RadioSettingValueList( + opt, current_index=_settings.auto_dimmer)) front_panel.append(rs) # Microphone gain opt = ["Low", "High"] rs = RadioSetting("mic_gain", "Microphone gain", - RadioSettingValueList(opt, - opt[_settings.mic_gain])) + RadioSettingValueList( + opt, current_index=_settings.mic_gain)) front_panel.append(rs) # Key press beep diff --git a/chirp/drivers/ic2730.py b/chirp/drivers/ic2730.py index ad104d7f..6bb643b8 100644 --- a/chirp/drivers/ic2730.py +++ b/chirp/drivers/ic2730.py @@ -755,12 +755,12 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): # --- Basic options = ["Off", "S-Meter Squelch", "ATT"] - rx = RadioSettingValueList(options, options[_sets.sqlatt]) + rx = RadioSettingValueList(options, current_index=_sets.sqlatt) rset = RadioSetting("settings.sqlatt", "Squelch/ATT", rx) basic.append(rset) options = ["Short", "Long"] - rx = RadioSettingValueList(options, options[_sets.sqldly]) + rx = RadioSettingValueList(options, current_index=_sets.sqldly) rset = RadioSetting("settings.sqldly", "Squelch Delay", rx) basic.append(rset) @@ -773,7 +773,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): basic.append(rset) options = ["Off", "1m", "3m", "5m", "10m", "15m", "30m"] - rx = RadioSettingValueList(options, options[_sets.tot]) + rx = RadioSettingValueList(options, current_index=_sets.tot) rset = RadioSetting("settings.tot", "Tx Timeout", rx) basic.append(rset) @@ -796,7 +796,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): basic.append(rset) options = ["1", "2", "3", "4"] - rx = RadioSettingValueList(options, options[_sets.micgain]) + rx = RadioSettingValueList(options, current_index=_sets.micgain) rset = RadioSetting("settings.micgain", "Microphone Gain", rx) basic.append(rset) @@ -826,12 +826,12 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): other.append(rset) options = ["Single", "All", "Ham"] - rx = RadioSettingValueList(options, options[_sets.actband]) + rx = RadioSettingValueList(options, current_index=_sets.actband) rset = RadioSetting("settings.actband", "Active Band", rx) other.append(rset) options = ["Slow", "Mid", "Fast", "Auto"] - rx = RadioSettingValueList(options, options[_sets.fanspeed]) + rx = RadioSettingValueList(options, current_index=_sets.fanspeed) rset = RadioSetting("settings.fanspeed", "Fan Speed", rx) other.append(rset) @@ -840,7 +840,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): other.append(rset) options = ["Off", "On(Dup)", "On(Dup+Tone)"] - rx = RadioSettingValueList(options, options[_sets.autorptr]) + rx = RadioSettingValueList(options, current_index=_sets.autorptr) rset = RadioSetting("settings.autorptr", "Auto Repeater", rx) other.append(rset) @@ -850,11 +850,11 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): other.append(rset) options = ["Low", "Mid", "High"] - rx = RadioSettingValueList(options, options[_sets.vhfpower]) + rx = RadioSettingValueList(options, current_index=_sets.vhfpower) rset = RadioSetting("settings.vhfpower", "VHF Power Default", rx) other.append(rset) - rx = RadioSettingValueList(options, options[_sets.uhfpower]) + rx = RadioSettingValueList(options, current_index=_sets.uhfpower) rset = RadioSetting("settings.uhfpower", "UHF Power Default", rx) other.append(rset) @@ -878,7 +878,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): other.append(rset) options = ["1200", "2400", "4800", "9600", "19200", "Auto"] - rx = RadioSettingValueList(options, options[_sets.civbaud]) + rx = RadioSettingValueList(options, current_index=_sets.civbaud) rset = RadioSetting("settings.civbaud", "CI-V Baud Rate (bps)", rx) other.append(rset) @@ -888,26 +888,26 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): # A/B Band Settings options = ["Off", "On", "Bell"] - rx = RadioSettingValueList(options, options[_sets.aprichn]) + rx = RadioSettingValueList(options, current_index=_sets.aprichn) rset = RadioSetting("settings.aprichn", "A Band: VFO Priority Watch Mode", rx) abset.append(rset) options = ["2", "4", "6", "8", "10", "12", "14", "16", "18", "20", "Hold"] - rx = RadioSettingValueList(options, options[_sets.ascanpause]) + rx = RadioSettingValueList(options, current_index=_sets.ascanpause) rset = RadioSetting("settings.ascanpause", "-- A Band: Scan Pause Time (Secs)", rx) abset.append(rset) options = ["0", "1", "2", "3", "4", "5", "Hold"] - rx = RadioSettingValueList(options, options[_sets.ascanresume]) + rx = RadioSettingValueList(options, current_index=_sets.ascanresume) rset = RadioSetting("settings.ascanresume", "-- A Band: Scan Resume Time (Secs)", rx) abset.append(rset) options = ["5", "10", "15"] - rx = RadioSettingValueList(options, options[_sets.atmpskiptym]) + rx = RadioSettingValueList(options, current_index=_sets.atmpskiptym) rset = RadioSetting("settings.atmpskiptym", "-- A Band: Temp Skip Time (Secs)", rx) abset.append(rset) @@ -930,31 +930,31 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): # Use list for Wx chans since chan 1 = index 0 options = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] - rx = RadioSettingValueList(options, options[_wxch.awxchan]) + rx = RadioSettingValueList(options, current_index=_wxch.awxchan) rset = RadioSetting("abwx.awxchan", "-- A Band: Weather Channel", rx) abset.append(rset) options = ["Off", "On", "Bell"] - rx = RadioSettingValueList(options, options[_sets.bprichn]) + rx = RadioSettingValueList(options, current_index=_sets.bprichn) rset = RadioSetting("settings.bprichn", "B Band: VFO Priority Watch Mode", rx) abset.append(rset) options = ["2", "4", "6", "8", "10", "12", "14", "16", "18", "20", "Hold"] - rx = RadioSettingValueList(options, options[_sets.bscanpause]) + rx = RadioSettingValueList(options, current_index=_sets.bscanpause) rset = RadioSetting("settings.bscanpause", "-- B Band: Scan Pause Time (Secs)", rx) abset.append(rset) options = ["0", "1", "2", "3", "4", "5", "Hold"] - rx = RadioSettingValueList(options, options[_sets.bscanresume]) + rx = RadioSettingValueList(options, current_index=_sets.bscanresume) rset = RadioSetting("settings.bscanresume", "-- B Band: Scan Resume Time (Secs)", rx) abset.append(rset) options = ["5", "10", "15"] - rx = RadioSettingValueList(options, options[_sets.btmpskiptym]) + rx = RadioSettingValueList(options, current_index=_sets.btmpskiptym) rset = RadioSetting("settings.btmpskiptym", "-- B Band: Temp Skip Time (Secs)", rx) abset.append(rset) @@ -976,7 +976,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): abset.append(rset) options = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] - rx = RadioSettingValueList(options, options[_wxch.bwxchan]) + rx = RadioSettingValueList(options, current_index=_wxch.bwxchan) rset = RadioSetting("abwx.bwxchan", "-- B Band: Weather Channel", rx) abset.append(rset) @@ -987,45 +987,45 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): "Scan", "Temp Skip", "Mode", "Low", "Dup", "Priority", "Tone", "MW", "Mute", "DTMF Direct", "T-Call"] ptr = shortopts.index(MICKEYOPTS[_sets.mickyrxf1]) - rx = RadioSettingValueList(shortopts, shortopts[ptr]) + rx = RadioSettingValueList(shortopts, current_index=ptr) rset = RadioSetting("settings.mickyrxf1", "During Rx/Standby [F-1]", rx) rset.set_apply_callback(mic_keys, _sets, "mickyrxf1") mickey.append(rset) ptr = shortopts.index(MICKEYOPTS[_sets.mickyrxf2]) - rx = RadioSettingValueList(shortopts, shortopts[ptr]) + rx = RadioSettingValueList(shortopts, current_index=ptr) rset = RadioSetting("settings.mickyrxf2", "During Rx/Standby [F-2]", rx) rset.set_apply_callback(mic_keys, _sets, "mickyrxf2") mickey.append(rset) options = ["Off", "Low", "T-Call"] # NOT a subset of MICKEYOPTS - rx = RadioSettingValueList(options, options[_sets.mickytxf1]) + rx = RadioSettingValueList(options, current_index=_sets.mickytxf1) rset = RadioSetting("settings.mickytxf1", "During Tx [F-1]", rx) mickey.append(rset) - rx = RadioSettingValueList(options, options[_sets.mickytxf2]) + rx = RadioSettingValueList(options, current_index=_sets.mickytxf2) rset = RadioSetting("settings.mickytxf2", "During Tx [F-2]", rx) mickey.append(rset) # These next two get the full options list - rx = RadioSettingValueList(MICKEYOPTS, MICKEYOPTS[_sets.mickyrxup]) + rx = RadioSettingValueList(MICKEYOPTS, current_index=_sets.mickyrxup) rset = RadioSetting("settings.mickyrxup", "During Rx/Standby [Up]", rx) mickey.append(rset) - rx = RadioSettingValueList(MICKEYOPTS, MICKEYOPTS[_sets.mickyrxdn]) + rx = RadioSettingValueList(MICKEYOPTS, current_index=_sets.mickyrxdn) rset = RadioSetting("settings.mickyrxdn", "During Rx/Standby [Down]", rx) mickey.append(rset) options = ["Off", "Low", "T-Call"] - rx = RadioSettingValueList(options, options[_sets.mickytxup]) + rx = RadioSettingValueList(options, current_index=_sets.mickytxup) rset = RadioSetting("settings.mickytxup", "During Tx [Up]", rx) mickey.append(rset) - rx = RadioSettingValueList(options, options[_sets.mickytxdn]) + rx = RadioSettingValueList(options, current_index=_sets.mickytxdn) rset = RadioSetting("settings.mickytxdn", "During Tx [Down]", rx) mickey.append(rset) @@ -1039,13 +1039,13 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): bluet.append(rset) options = ["Headset Only", "Headset & Speaker"] - rx = RadioSettingValueList(options, options[_sets.bthdset]) + rx = RadioSettingValueList(options, current_index=_sets.bthdset) rset = RadioSetting("settings.bthdset", "Headset Audio", rx) bluet.append(rset) options = ["Normal", "Microphone", "PTT (Audio:Main)", "PTT(Audio:Controller)"] - rx = RadioSettingValueList(options, options[_sets.bthfctn]) + rx = RadioSettingValueList(options, current_index=_sets.bthfctn) rset = RadioSetting("settings.bthfctn", "Headset Function", rx) bluet.append(rset) @@ -1054,17 +1054,17 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): bluet.append(rset) options = ["Off", "1.0", "2", "3", "4", "5", "6", "7", "8", "9", "10"] - rx = RadioSettingValueList(options, options[_sets.bthvoxlvl]) + rx = RadioSettingValueList(options, current_index=_sets.bthvoxlvl) rset = RadioSetting("settings.bthvoxlvl", "Vox Level", rx) bluet.append(rset) options = ["0.5", "1.0", "1.5", "2.0", "2.5", "3.0"] - rx = RadioSettingValueList(options, options[_sets.bthvoxdly]) + rx = RadioSettingValueList(options, current_index=_sets.bthvoxdly) rset = RadioSetting("settings.bthvoxdly", "Vox Delay (Secs)", rx) bluet.append(rset) options = ["Off", "1", "2", "3", "4", "5", "10", "15"] - rx = RadioSettingValueList(options, options[_sets.bthvoxtot]) + rx = RadioSettingValueList(options, current_index=_sets.bthvoxtot) rset = RadioSetting("settings.bthvoxtot", "Vox Time-Out (Mins)", rx) bluet.append(rset) @@ -1088,40 +1088,40 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): "ICOM Headset Custom Key Beep", rx) bluet.append(rset) - rx = RadioSettingValueList(MICKEYOPTS, MICKEYOPTS[_sets.bthplaykey]) + rx = RadioSettingValueList(MICKEYOPTS, current_index=_sets.bthplaykey) rset = RadioSetting("settings.bthplaykey", "ICOM Headset Custom Key [Play]", rx) bluet.append(rset) - rx = RadioSettingValueList(MICKEYOPTS, MICKEYOPTS[_sets.bthfwdkey]) + rx = RadioSettingValueList(MICKEYOPTS, current_index=_sets.bthfwdkey) rset = RadioSetting("settings.bthfwdkey", "ICOM Headset Custom Key [Fwd]", rx) bluet.append(rset) - rx = RadioSettingValueList(MICKEYOPTS, MICKEYOPTS[_sets.bthrwdkey]) + rx = RadioSettingValueList(MICKEYOPTS, current_index=_sets.bthrwdkey) rset = RadioSetting("settings.bthrwdkey", "ICOM Headset Custom Key [Rwd]", rx) bluet.append(rset) # ---- Display options = ["1: Dark", "2", "3", "4: Bright"] - rx = RadioSettingValueList(options, options[_sets.backlight]) + rx = RadioSettingValueList(options, current_index=_sets.backlight) rset = RadioSetting("settings.backlight", "Backlight Level", rx) disp.append(rset) options = ["Off", "Auto-Off", "Auto-1", "Auto-2", "Auto-3"] - rx = RadioSettingValueList(options, options[_sets.autodim]) + rx = RadioSettingValueList(options, current_index=_sets.autodim) rset = RadioSetting("settings.autodim", "Auto Dimmer", rx) disp.append(rset) options = ["5", "10"] - rx = RadioSettingValueList(options, options[_sets.autodimtot]) + rx = RadioSettingValueList(options, current_index=_sets.autodimtot) rset = RadioSetting("settings.autodimtot", "Auto-Dimmer Timeout (Secs)", rx) disp.append(rset) options = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] - rx = RadioSettingValueList(options, options[_sets.contrast]) + rx = RadioSettingValueList(options, current_index=_sets.contrast) rset = RadioSetting("settings.contrast", "LCD Contrast", rx) disp.append(rset) @@ -1134,7 +1134,7 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): disp.append(rset) options = ["CH ID", "Frequency"] - rx = RadioSettingValueList(options, options[_sets.airbandch]) + rx = RadioSettingValueList(options, current_index=_sets.airbandch) rset = RadioSetting("settings.airbandch", "Air Band Display", rx) disp.append(rset) @@ -1160,13 +1160,13 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): sound.append(rset) options = ["Off", "Mute", "Beep", "Mute & Beep"] - rx = RadioSettingValueList(options, options[_sets.subandmute]) + rx = RadioSettingValueList(options, current_index=_sets.subandmute) rset = RadioSetting("settings.subandmute", "Sub Band Mute", rx) sound.append(rset) # --- DTMF Codes options = ["100", "200", "300", "500"] - rx = RadioSettingValueList(options, options[_sets.dtmfspd]) + rx = RadioSettingValueList(options, current_index=_sets.dtmfspd) rset = RadioSetting("settings.dtmfspd", "DTMF Speed (mSecs)", rx) dtmf.append(rset) @@ -1263,13 +1263,13 @@ def myset_bitmask(setting, obj, ndx, atrb, knt): if ndxm > 2: ndxm = 0 # end if fhigh > 0 - rx = RadioSettingValueList(tsopt, tsopt[ndxt]) + rx = RadioSettingValueList(tsopt, current_index=ndxt) rset = RadioSetting("pgmscanedge/%d.tstp" % kx, "-- Scan %d Freq Step" % kx, rx) rset.set_apply_callback(myset_tsopt, _pses, kx, "tstp", bxnd) edges.append(rset) - rx = RadioSettingValueList(mdopt, mdopt[ndxm]) + rx = RadioSettingValueList(mdopt, current_index=ndxm) rset = RadioSetting("pgmscanedge/%d.mode" % kx, "-- Scan %d Mode" % kx, rx) rset.set_apply_callback(myset_mdopt, _pses, kx, "mode", bxnd) diff --git a/chirp/drivers/icomciv.py b/chirp/drivers/icomciv.py index a5397935..dd10f6af 100644 --- a/chirp/drivers/icomciv.py +++ b/chirp/drivers/icomciv.py @@ -774,7 +774,7 @@ def get_memory(self, number): fil = RadioSetting( "filter", "Filter", RadioSettingValueList(options, - options[memobj.filter - 1])) + current_index=memobj.filter - 1)) except AttributeError: pass else: @@ -1417,7 +1417,7 @@ def get_memory(self, number): fil = RadioSetting( "filter", "Filter", RadioSettingValueList(options, - options[memobj.filter - 1])) + current_index=memobj.filter - 1)) fil.set_doc("Filter settings") if not mem.extra: mem.extra = RadioSettingGroup("extra", "Extra") diff --git a/chirp/drivers/icq7.py b/chirp/drivers/icq7.py index 9dd7ce2f..60f9fcd5 100644 --- a/chirp/drivers/icq7.py +++ b/chirp/drivers/icq7.py @@ -224,7 +224,7 @@ def get_settings(self): rs = RadioSetting("autorp", "Auto Repeater Function", RadioSettingValueList( - AUTORP_LIST, AUTORP_LIST[_settings.autorp])) + AUTORP_LIST, current_index=_settings.autorp)) basic.append(rs) rs = RadioSetting("ritfunct", "RIT Runction", @@ -242,29 +242,29 @@ def get_settings(self): rs = RadioSetting("lockgroup", "Lock Group", RadioSettingValueList( LOCKGROUP_LIST, - LOCKGROUP_LIST[_settings.lockgroup])) + current_index=_settings.lockgroup)) basic.append(rs) rs = RadioSetting("squelch", "Squelch", RadioSettingValueList( - SQUELCH_LIST, SQUELCH_LIST[_settings.squelch])) + SQUELCH_LIST, current_index=_settings.squelch)) basic.append(rs) rs = RadioSetting("monitor", "Monitor Switch Function", RadioSettingValueList( MONITOR_LIST, - MONITOR_LIST[_settings.monitor])) + current_index=_settings.monitor)) basic.append(rs) rs = RadioSetting("light", "Display Backlighting", RadioSettingValueList( - LIGHT_LIST, LIGHT_LIST[_settings.light])) + LIGHT_LIST, current_index=_settings.light)) basic.append(rs) rs = RadioSetting("priority", "Priority Watch Operation", RadioSettingValueList( PRIORITY_LIST, - PRIORITY_LIST[_settings.priority])) + current_index=_settings.priority)) basic.append(rs) rs = RadioSetting("p_scan", "Frequency Skip Function", @@ -274,22 +274,22 @@ def get_settings(self): rs = RadioSetting("bnk_scan", "Memory Bank Scan Selection", RadioSettingValueList( BANKSCAN_LIST, - BANKSCAN_LIST[_settings.bnk_scan])) + current_index=_settings.bnk_scan)) basic.append(rs) rs = RadioSetting("edge", "Band Edge Scan Selection", RadioSettingValueList( - EDGE_LIST, EDGE_LIST[_settings.edge])) + EDGE_LIST, current_index=_settings.edge)) basic.append(rs) rs = RadioSetting("pause", "Scan Pause Time", RadioSettingValueList( - PAUSE_LIST, PAUSE_LIST[_settings.pause])) + PAUSE_LIST, current_index=_settings.pause)) basic.append(rs) rs = RadioSetting("resume", "Scan Resume Time", RadioSettingValueList( - RESUME_LIST, RESUME_LIST[_settings.resume])) + RESUME_LIST, current_index=_settings.resume)) basic.append(rs) rs = RadioSetting("p_save", "Power Saver", @@ -298,7 +298,7 @@ def get_settings(self): rs = RadioSetting("ap_off", "Auto Power-off Function", RadioSettingValueList( - APOFF_LIST, APOFF_LIST[_settings.ap_off])) + APOFF_LIST, current_index=_settings.ap_off)) basic.append(rs) rs = RadioSetting("speed", "Dial Speed Acceleration", @@ -307,7 +307,7 @@ def get_settings(self): rs = RadioSetting("d_sel", "Dial Select Step", RadioSettingValueList( - D_SEL_LIST, D_SEL_LIST[_settings.d_sel])) + D_SEL_LIST, current_index=_settings.d_sel)) basic.append(rs) return group diff --git a/chirp/drivers/icv80.py b/chirp/drivers/icv80.py index 7a753e78..aa3e69cf 100644 --- a/chirp/drivers/icv80.py +++ b/chirp/drivers/icv80.py @@ -201,70 +201,74 @@ def get_settings(self): setmode.append( RadioSetting( "tot", "Time out Timer", - RadioSettingValueList(opts, opts[_settings.tot]))) + RadioSettingValueList(opts, current_index=_settings.tot))) # Lockout opts = ["Off", "Rpt", "Busy"] setmode.append( RadioSetting( "lockout", "Lockout", - RadioSettingValueList(opts, opts[_settings.lockout]))) + RadioSettingValueList(opts, current_index=_settings.lockout))) # Auto Power Off opts = ["Off", "30 min", "1 hr", "2 hrs"] setmode.append( RadioSetting( "auto_pwr_off", "Auto Power Off", - RadioSettingValueList(opts, opts[_settings.auto_pwr_off]))) + RadioSettingValueList( + opts, current_index=_settings.auto_pwr_off))) # Power Save opts = ["Off", "1:2", "1:8", "1:16", "Auto"] setmode.append( RadioSetting( "pwr_save", "Power Save", - RadioSettingValueList(opts, opts[_settings.pwr_save]))) + RadioSettingValueList(opts, current_index=_settings.pwr_save))) # Battery Save opts = ["Off", "Ni-MH", "Li-Ion"] setmode.append( RadioSetting( "battery_save", "Battery Save", - RadioSettingValueList(opts, opts[_settings.battery_save]))) + RadioSettingValueList( + opts, current_index=_settings.battery_save))) # Auto Low Power opts = ["Off", "On"] setmode.append( RadioSetting( "auto_low_pwr", "Auto Low Power", - RadioSettingValueList(opts, opts[_settings.auto_low_pwr]))) + RadioSettingValueList( + opts, current_index=_settings.auto_low_pwr))) # Squelch Delay opts = ["Short", "Long"] setmode.append( RadioSetting( "squelch_delay", "Squelch Delay", - RadioSettingValueList(opts, opts[_settings.squelch_delay]))) + RadioSettingValueList( + opts, current_index=_settings.squelch_delay))) # MIC Simple Mode opts = ["Simple", "Normal 1", "Normal 2"] setmode.append( RadioSetting( "mic_mode", "Mic Simple Mode", - RadioSettingValueList(opts, opts[_settings.mic_mode]))) + RadioSettingValueList(opts, current_index=_settings.mic_mode))) # MIC Gain opts = ["1", "2", "3", "4"] setmode.append( RadioSetting( "mic_gain", "Mic Gain", - RadioSettingValueList(opts, opts[_settings.mic_gain]))) + RadioSettingValueList(opts, current_index=_settings.mic_gain))) # VOX Gain opts = ["Off"] + ["%d" % t for t in range(1, 11)] setmode.append( RadioSetting( "vox_gain", "VOX Gain", - RadioSettingValueList(opts, opts[_settings.vox_gain]))) + RadioSettingValueList(opts, current_index=_settings.vox_gain))) # VOX Delay opts = ["0.5 sec", "1.0 sec", "1.5 sec", "2.0 sec", "2.5 sec", @@ -272,7 +276,8 @@ def get_settings(self): setmode.append( RadioSetting( "vox_delay", "VOX Delay", - RadioSettingValueList(opts, opts[_settings.vox_delay]))) + RadioSettingValueList( + opts, current_index=_settings.vox_delay))) # VOX Time out Timer opts = ["Off", "1 min", "2 min", "3 min", "4 min", "5 min", "10 min", @@ -280,70 +285,75 @@ def get_settings(self): setmode.append( RadioSetting( "vox_tot", "VOX Time-Out Timer", - RadioSettingValueList(opts, opts[_settings.vox_tot]))) + RadioSettingValueList(opts, current_index=_settings.vox_tot))) # Select Speed opts = ["Manual", "Auto"] setmode.append( RadioSetting( "sel_speed", "Select Speed", - RadioSettingValueList(opts, opts[_settings.sel_speed]))) + RadioSettingValueList( + opts, current_index=_settings.sel_speed))) # Dial Function opts = ["Audio Volume", "Tuning Dial"] setmode.append( RadioSetting( "dial_func", "Dial Function", - RadioSettingValueList(opts, opts[_settings.dial_func]))) + RadioSettingValueList( + opts, current_index=_settings.dial_func))) # Function Mode opts = ["0 sec", "1 sec", "2 sec", "3 sec", "Manual"] setmode.append( RadioSetting( "func_mode", "Function Mode", - RadioSettingValueList(opts, opts[_settings.func_mode]))) + RadioSettingValueList( + opts, current_index=_settings.func_mode))) # Backlight opts = ["Off", "On", "Auto"] display.append( RadioSetting( "backlight", "Backlight", - RadioSettingValueList(opts, opts[_settings.backlight]))) + RadioSettingValueList( + opts, current_index=_settings.backlight))) # LCD Contrast opts = ["Low", "Auto"] display.append( RadioSetting( "lcd", "LCD Contrast", - RadioSettingValueList(opts, opts[_settings.lcd]))) + RadioSettingValueList(opts, current_index=_settings.lcd))) # Memory Display opts = ["Frequency", "Channel", "Name"] display.append( RadioSetting( "mem_display1", "Memory Display", - RadioSettingValueList(opts, opts[_settings.mem_display1]))) + RadioSettingValueList( + opts, current_index=_settings.mem_display1))) # Beep opts = ["Off", "1", "2", "3"] sounds.append( RadioSetting( "beep", "Beep", - RadioSettingValueList(opts, opts[_settings.beep]))) + RadioSettingValueList(opts, current_index=_settings.beep))) # Edge opts = ["All", "P1", "P2", "P3"] scan.append( RadioSetting( "edge", "Edge", - RadioSettingValueList(opts, opts[_settings.edge]))) + RadioSettingValueList(opts, current_index=_settings.edge))) # Resume opts = ["T-5", "T-10", "T-15", "P-2"] scan.append( RadioSetting( "resume", "Resume", - RadioSettingValueList(opts, opts[_settings.resume]))) + RadioSettingValueList(opts, current_index=_settings.resume))) return settings diff --git a/chirp/drivers/icv86.py b/chirp/drivers/icv86.py index 387546ce..74088cce 100644 --- a/chirp/drivers/icv86.py +++ b/chirp/drivers/icv86.py @@ -163,7 +163,7 @@ def get_settings(self): setmode.append( RadioSetting( "lcd", "LCD Backlight", - RadioSettingValueList(opts, opts[_settings.lcd]))) + RadioSettingValueList(opts, current_index=_settings.lcd))) # Mic Gain rs = RadioSetting("mic", "Mic Gain", @@ -179,14 +179,14 @@ def apply_mic(s, obj): setmode.append( RadioSetting( "dial_assignment", "Dial Assignment", - RadioSettingValueList(opts, opts[_settings.dial_assignment]))) + RadioSettingValueList(opts, current_index=_settings.dial_assignment))) # Display Type opts = ["Frequency", "Channel", "Name"] setmode.append( RadioSetting( "disp_type", "Display Type", - RadioSettingValueList(opts, opts[_settings.disp_type]))) + RadioSettingValueList(opts, current_index=_settings.disp_type))) return settings diff --git a/chirp/drivers/icx90.py b/chirp/drivers/icx90.py index d5e65842..2abf5e37 100644 --- a/chirp/drivers/icx90.py +++ b/chirp/drivers/icx90.py @@ -404,68 +404,68 @@ def get_settings(self): RadioSettingValueInteger(0, MEM_NUM - 1, self.memobj.mem_channel))) basic.append(RadioSetting("squelch_level", "Squelch level", RadioSettingValueList(SQUELCH_LEVEL, - SQUELCH_LEVEL[self.memobj.squelch_level]))) + current_index=self.memobj.squelch_level))) basic.append(RadioSetting("scan_resume", "Scan resume", RadioSettingValueList(SCAN_RESUME, - SCAN_RESUME[self.memobj.scan_resume]))) + current_index=self.memobj.scan_resume))) basic.append(RadioSetting("scan_pause", "Scan pause", RadioSettingValueList(SCAN_PAUSE, - SCAN_PAUSE[self.memobj.scan_pause]))) + current_index=self.memobj.scan_pause))) basic.append(RadioSetting("beep_volume", "Beep audio", RadioSettingValueList(BEEP_VOLUME, - BEEP_VOLUME[self.memobj.beep_volume]))) + current_index=self.memobj.beep_volume))) basic.append(RadioSetting("beep", "Operation beep", RadioSettingValueBoolean(self.memobj.beep))) basic.append(RadioSetting("backlight", "LCD backlight", RadioSettingValueList(BACKLIGHT, - BACKLIGHT[self.memobj.backlight]))) + current_index=self.memobj.backlight))) basic.append(RadioSetting("busy_led", "Busy LED", RadioSettingValueBoolean(self.memobj.busy_led))) basic.append(RadioSetting("auto_power_off", "Auto power off", RadioSettingValueList(AUTO_POWER_OFF, - AUTO_POWER_OFF[self.memobj.auto_power_off]))) + current_index=self.memobj.auto_power_off))) basic.append(RadioSetting("power_save", "Power save", RadioSettingValueList(POWER_SAVE, - POWER_SAVE[self.memobj.power_save]))) + current_index=self.memobj.power_save))) basic.append(RadioSetting("monitor", "Monitor", RadioSettingValueList(MONITOR, - MONITOR[self.memobj.monitor]))) + current_index=self.memobj.monitor))) basic.append(RadioSetting("dial_speedup", "Dial speedup", RadioSettingValueBoolean(self.memobj.dial_speedup))) basic.append(RadioSetting("auto_repeater", "Auto repeater", RadioSettingValueList(AUTO_REPEATER, - AUTO_REPEATER[self.memobj.auto_repeater]))) + current_index=self.memobj.auto_repeater))) basic.append(RadioSetting("hm_75a_function", "HM-75A function", RadioSettingValueList(HM_75A_FUNCTION, - HM_75A_FUNCTION[self.memobj.hm_75a_function]))) + current_index=self.memobj.hm_75a_function))) basic.append(RadioSetting("wx_alert", "WX alert", RadioSettingValueBoolean(self.memobj.wx_alert))) basic.append(RadioSetting("wx_channel", "Current WX channel", RadioSettingValueList(WX_CHANNEL, - WX_CHANNEL[self.memobj.wx_channel]))) + current_index=self.memobj.wx_channel))) basic.append(RadioSetting("comment", "Comment", RadioSettingValueString(0, COMMENT_LEN, str(self.memobj.comment), autopad=True))) basic.append(RadioSetting("tune_step", "Current tune step", RadioSettingValueList(TUNE_STEP_STR, - TUNE_STEP_STR[self.memobj.tune_step]))) + current_index=self.memobj.tune_step))) basic.append(RadioSetting("band_selected", "Selected band", RadioSettingValueInteger(0, BANDS - 1, self.memobj.band_selected))) basic.append(RadioSetting("memory_display", "Memory display", RadioSettingValueList(MEMORY_DISPLAY, - MEMORY_DISPLAY[self.memobj.memory_display]))) + current_index=self.memobj.memory_display))) basic.append(RadioSetting("memory_name", "Memory name", RadioSettingValueBoolean(self.memobj.memory_name))) basic.append(RadioSetting("dial_select", "Dial select", RadioSettingValueList(DIAL_SELECT, - DIAL_SELECT[self.memobj.dial_select]))) + current_index=self.memobj.dial_select))) basic.append(RadioSetting("power", "RF power", RadioSettingValueList(POWER, - POWER[self.memobj.power]))) + current_index=self.memobj.power))) basic.append(RadioSetting("vfo", "Current VFO", RadioSettingValueList(VFO, - VFO[self.memobj.vfo]))) + current_index=self.memobj.vfo))) basic.append(RadioSetting("attenuator", "RF attenuator", RadioSettingValueBoolean(self.memobj.attenuator))) basic.append(RadioSetting("skip_scan", "Skip scan", @@ -477,20 +477,20 @@ def get_settings(self): # OPERATION_MODE[self.memobj.mode]))) basic.append(RadioSetting("vfo_scan", "VFO scan", RadioSettingValueList(VFO_SCAN, - VFO_SCAN[self.memobj.vfo_scan]))) + current_index=self.memobj.vfo_scan))) basic.append(RadioSetting("memory_scan", "Memory scan", RadioSettingValueList(MEMORY_SCAN, - MEMORY_SCAN[self.memobj.memory_scan]))) + current_index=self.memobj.memory_scan))) basic.append(RadioSetting("tv_channel", "Current TV channel", RadioSettingValueInteger(0, TV_CHANNELS - 1, self.memobj.tv_channel))) # DTMF auto dial dtmf_autodial.append(RadioSetting("autodial", "Autodial", RadioSettingValueList(AUTODIAL, - AUTODIAL[self.memobj.autodial]))) + current_index=self.memobj.autodial))) dtmf_autodial.append(RadioSetting("dtmf_speed", "Speed", RadioSettingValueList(DTMF_SPEED, - DTMF_SPEED[self.memobj.dtmf_speed]))) + current_index=self.memobj.dtmf_speed))) for x in range(DTMF_AUTODIAL_NUM): rs = RadioSetting("dtmf_codes[%d].dtmf_digits" % x, "DTMF autodial: %d" % x, RadioSettingValueString(0, DTMF_DIGITS_NUM, @@ -508,23 +508,23 @@ def get_settings(self): RadioSettingValueBoolean(self.memobj.scan_stop_light))) expand_1.append(RadioSetting("light_postion", "Light position", RadioSettingValueList(LIGHT_POSITION, - LIGHT_POSITION[self.memobj.light_position]))) + current_index=self.memobj.light_position))) expand_1.append(RadioSetting("light_color", "Light color", RadioSettingValueList(LIGHT_COLOR, - LIGHT_COLOR[self.memobj.light_color]))) + current_index=self.memobj.light_color))) expand_1.append(RadioSetting("band_edge_beep", "Band edge beep", RadioSettingValueBoolean(self.memobj.band_edge_beep))) expand_1.append(RadioSetting("auto_power_on", "Auto power on", RadioSettingValueList(AUTO_POWER_ON, - AUTO_POWER_ON[self.memobj.auto_power_on]))) + current_index=self.memobj.auto_power_on))) expand_1.append(RadioSetting("key_lock", "Key lock", RadioSettingValueList(KEY_LOCK, - KEY_LOCK[self.memobj.key_lock]))) + current_index=self.memobj.key_lock))) expand_1.append(RadioSetting("ptt_lock", "PTT lock", RadioSettingValueBoolean(self.memobj.ptt_lock))) expand_1.append(RadioSetting("lcd_contrast", "LCD contrast", RadioSettingValueList(LCD_CONTRAST, - LCD_CONTRAST[self.memobj.lcd_contrast]))) + current_index=self.memobj.lcd_contrast))) expand_1.append(RadioSetting("opening_message", "Opening message", RadioSettingValueBoolean(self.memobj.opening_message))) expand_1.append(RadioSetting("opening_message_text", "Opening message", @@ -539,10 +539,10 @@ def get_settings(self): RadioSettingValueBoolean(self.memobj.busy_lockout))) expand_2.append(RadioSetting("timeout_timer", "Timeout timer", RadioSettingValueList(TIMEOUT_TIMER, - TIMEOUT_TIMER[self.memobj.timeout_timer]))) + current_index=self.memobj.timeout_timer))) expand_2.append(RadioSetting("active_band", "Active band", RadioSettingValueList(ACTIVE_BAND, - ACTIVE_BAND[self.memobj.active_band]))) + current_index=self.memobj.active_band))) expand_2.append(RadioSetting("fm_narrow", "FM narrow", RadioSettingValueBoolean(self.memobj.fm_narrow))) expand_2.append(RadioSetting("split", "Split", @@ -551,7 +551,7 @@ def get_settings(self): RadioSettingValueBoolean(self.memobj.morse_code_enable))) expand_2.append(RadioSetting("morse_code_speed", "Morse code speed", RadioSettingValueList(MORSE_CODE_SPEED, - MORSE_CODE_SPEED[self.memobj.morse_code_speed]))) + current_index=self.memobj.morse_code_speed))) return group except: diff --git a/chirp/drivers/iradio_uv_5118.py b/chirp/drivers/iradio_uv_5118.py index a2bdae7b..48acc0bd 100644 --- a/chirp/drivers/iradio_uv_5118.py +++ b/chirp/drivers/iradio_uv_5118.py @@ -546,7 +546,7 @@ def get_settings(self): top = RadioSettings(basic, sidekey, dwatch, txallow) voice = RadioSetting("voice", "Language", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[_settings.voice])) + LIST_VOICE, current_index=_settings.voice)) basic.append(voice) beep = RadioSetting("beep", "Key Beep", @@ -555,34 +555,34 @@ def get_settings(self): roger = RadioSetting("roger", "Roger Tone", RadioSettingValueList( - LIST_ROGER, LIST_ROGER[_settings.roger])) + LIST_ROGER, current_index=_settings.roger)) basic.append(roger) save = RadioSetting("save", "Battery Save", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[_settings.save])) + LIST_SAVE, current_index=_settings.save)) basic.append(save) dispmode = RadioSetting("dispmode", "Display Mode", RadioSettingValueList( LIST_DISPM, - LIST_DISPM[_settings.dispmode])) + current_index=_settings.dispmode)) basic.append(dispmode) brightness = RadioSetting("brightness", "Screen Light", RadioSettingValueList( LIST_BRIGHT, - LIST_BRIGHT[_settings.brightness])) + current_index=_settings.brightness)) basic.append(brightness) screen = RadioSetting("screen", "Screen", RadioSettingValueBoolean(_settings.screen)) basic.append(screen) - display_timer = RadioSetting("display_timer", "Display Timer", - RadioSettingValueList( - LIST_TIMER, - LIST_TIMER[_settings.display_timer])) + display_timer = RadioSetting( + "display_timer", "Display Timer", + RadioSettingValueList( + LIST_TIMER, current_index=_settings.display_timer)) basic.append(display_timer) led = RadioSetting("led", "LED", @@ -592,7 +592,7 @@ def get_settings(self): led_timer = RadioSetting("led_timer", "LED Timer", RadioSettingValueList( LIST_TIMER, - LIST_TIMER[_settings.led_timer])) + current_index=_settings.led_timer)) basic.append(led_timer) squelch = RadioSetting("squelch", "Squelch Level", @@ -621,7 +621,7 @@ def get_settings(self): scramble = RadioSetting("scramble", "Scramble", RadioSettingValueList( LIST_SCRAMBLE, - LIST_SCRAMBLE[_settings.scramble])) + current_index=_settings.scramble)) basic.append(scramble) rp = RadioSetting("rp", "Offset", @@ -631,13 +631,13 @@ def get_settings(self): txpri = RadioSetting("txpri", "TX Priority", RadioSettingValueList( LIST_TXPRI, - LIST_TXPRI[_settings.txpri])) + current_index=_settings.txpri)) basic.append(txpri) tot = RadioSetting("tot", "Time-out Timer", RadioSettingValueList( LIST_TIMER, - LIST_TIMER[_settings.tot])) + current_index=_settings.tot)) basic.append(tot) tail_tone = RadioSetting("tail_tone", "Tail Tone", @@ -648,7 +648,7 @@ def get_settings(self): alarm = RadioSetting("alarm", "Alarm", RadioSettingValueList( LIST_ALARM, - LIST_ALARM[_settings.alarm])) + current_index=_settings.alarm)) basic.append(alarm) freq_lock = RadioSetting("freq_lock", "Frequency Lock", @@ -662,7 +662,7 @@ def get_settings(self): auto_lock = RadioSetting("auto_lock", "Auto Lock Timer", RadioSettingValueList( LIST_TIMER, - LIST_TIMER[_settings.auto_lock])) + current_index=_settings.auto_lock)) basic.append(auto_lock) radio = RadioSetting("radio", "Broadcast FM Radio", @@ -693,25 +693,25 @@ def myset_freq(setting, obj, atrb, mult): pfkey1short = RadioSetting("pfkey1short", "Side Key 1 - Short Press", RadioSettingValueList( LIST_SKEY, - LIST_SKEY[_settings.pfkey1short])) + current_index=_settings.pfkey1short)) sidekey.append(pfkey1short) pfkey1long = RadioSetting("pfkey1long", "Side Key 1 - Long Press", RadioSettingValueList( LIST_SKEY, - LIST_SKEY[_settings.pfkey1long])) + current_index=_settings.pfkey1long)) sidekey.append(pfkey1long) pfkey2short = RadioSetting("pfkey2short", "Side Key 2 - Short Press", RadioSettingValueList( LIST_SKEY, - LIST_SKEY[_settings.pfkey2short])) + current_index=_settings.pfkey2short)) sidekey.append(pfkey2short) pfkey2long = RadioSetting("pfkey2long", "Side Key 2 - Long Press", RadioSettingValueList( LIST_SKEY, - LIST_SKEY[_settings.pfkey2long])) + current_index=_settings.pfkey2long)) sidekey.append(pfkey2long) dstandby = RadioSetting("dstandby", "Dual Standby", @@ -740,7 +740,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range174_180) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range174_180", "174-180 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range174_180) txallow.append(rset) @@ -749,7 +749,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range180_190) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range180_190", "180-190 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range180_190) txallow.append(rset) @@ -758,7 +758,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range190_200) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range190_200", "190-200 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range190_200) txallow.append(rset) @@ -767,7 +767,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range200_210) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range200_210", "200-210 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range200_210) txallow.append(rset) @@ -776,7 +776,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range210_220) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range210_220", "210-220 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range210_220) txallow.append(rset) @@ -785,7 +785,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range220_230) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range220_230", "220-230 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range220_230) txallow.append(rset) @@ -794,7 +794,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range230_240) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range230_240", "230-240 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range230_240) txallow.append(rset) @@ -803,7 +803,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range240_250) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range240_250", "240-250 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range240_250) txallow.append(rset) @@ -812,7 +812,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range250_260) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range250_260", "250-260 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range250_260) txallow.append(rset) @@ -821,7 +821,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range260_270) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range260_270", "260-270 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range260_270) txallow.append(rset) @@ -830,7 +830,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range270_280) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range270_280", "270-280 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range270_280) txallow.append(rset) @@ -839,7 +839,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range280_290) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range280_290", "280-290 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range280_290) txallow.append(rset) @@ -848,7 +848,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range290_300) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range290_300", "290-300 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range290_300) txallow.append(rset) @@ -857,7 +857,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range300_310) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range300_310", "300-310 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range300_310) txallow.append(rset) @@ -866,7 +866,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range310_320) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range310_320", "310-320 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range310_320) txallow.append(rset) @@ -875,7 +875,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range320_330) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range320_330", "320-330 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range320_330) txallow.append(rset) @@ -884,7 +884,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range330_340) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range330_340", "330-340 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range330_340) txallow.append(rset) @@ -893,7 +893,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range340_350) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range340_350", "340-350 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range340_350) txallow.append(rset) @@ -902,7 +902,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range350_360) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range350_360", "350-360 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range350_360) txallow.append(rset) @@ -911,7 +911,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range360_370) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range360_370", "360-370 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range360_370) txallow.append(rset) @@ -920,7 +920,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range370_380) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range370_380", "370-380 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range370_380) txallow.append(rset) @@ -929,7 +929,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range380_390) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range380_390", "380-390 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range380_390) txallow.append(rset) @@ -938,7 +938,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range390_400) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range390_400", "390-400 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range390_400) txallow.append(rset) @@ -947,7 +947,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range520_530) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range520_530", "520-530 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range520_530) txallow.append(rset) @@ -956,7 +956,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range530_540) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range530_540", "530-540 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range530_540) txallow.append(rset) @@ -965,7 +965,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range540_550) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range540_550", "540-550 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range540_550) txallow.append(rset) @@ -974,7 +974,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range550_560) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range550_560", "550-560 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range550_560) txallow.append(rset) @@ -983,7 +983,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range560_570) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range560_570", "560-570 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range560_570) txallow.append(rset) @@ -992,7 +992,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range570_580) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range570_580", "570-580 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range570_580) txallow.append(rset) @@ -1001,7 +1001,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range580_590) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range580_590", "580-590 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range580_590) txallow.append(rset) @@ -1010,7 +1010,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range590_600) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range590_600", "590-600 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range590_600) txallow.append(rset) @@ -1019,7 +1019,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range600_610) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range600_610", "600-610 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range600_610) txallow.append(rset) @@ -1028,7 +1028,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range610_620) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range610_620", "610-620 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range610_620) txallow.append(rset) @@ -1037,7 +1037,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range620_630) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range620_630", "620-630 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range620_630) txallow.append(rset) @@ -1046,7 +1046,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range630_640) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range630_640", "630-640 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range630_640) txallow.append(rset) @@ -1055,7 +1055,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range640_650) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range640_650", "640-650 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range640_650) txallow.append(rset) @@ -1064,7 +1064,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_txallow.range650_660) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("txallow.range650_660", "650-660 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _txallow.range650_660) txallow.append(rset) diff --git a/chirp/drivers/iradio_uv_5118plus.py b/chirp/drivers/iradio_uv_5118plus.py index d589a1ba..497e1afa 100644 --- a/chirp/drivers/iradio_uv_5118plus.py +++ b/chirp/drivers/iradio_uv_5118plus.py @@ -540,11 +540,11 @@ def get_memory(self, number): mem.extra = RadioSettingGroup("Extra", "extra") - rs = RadioSettingValueList(LIST_BCL, LIST_BCL[_mem.bcl]) + rs = RadioSettingValueList(LIST_BCL, current_index=_mem.bcl) rset = RadioSetting("bcl", "Busy Channel Lockout", rs) mem.extra.append(rset) - rs = RadioSettingValueList(LIST_MUTETYPE, LIST_MUTETYPE[_mem.mutetype]) + rs = RadioSettingValueList(LIST_MUTETYPE, current_index=_mem.mutetype) rset = RadioSetting("mutetype", "Mute Type", rs) mem.extra.append(rset) @@ -619,7 +619,7 @@ def get_settings(self): basic.append(rset) rs = RadioSettingValueList(LIST_WORKMODE, - LIST_WORKMODE[_settings.workmode]) + current_index=_settings.workmode) rset = RadioSetting("workmode", "Work Mode", rs) basic.append(rset) @@ -635,13 +635,13 @@ def get_settings(self): # Menu 07 - Roger Beep rs = RadioSettingValueList(LIST_ROGER, - LIST_ROGER[_settings.rogerbeep]) + current_index=_settings.rogerbeep) rset = RadioSetting("rogerbeep", "Roger Beep", rs) basic.append(rset) # Menu 09 - TX Priority rs = RadioSettingValueList(LIST_TXPRI, - LIST_TXPRI[_settings.txpriority]) + current_index=_settings.txpriority) rset = RadioSetting("txpriority", "TX Priority", rs) basic.append(rset) @@ -652,7 +652,7 @@ def get_settings(self): # Menu 11 - Freq Step val = min(_settings.frequencystep, 0x0D) - rs = RadioSettingValueList(LIST_FREQSTEP, LIST_FREQSTEP[val]) + rs = RadioSettingValueList(LIST_FREQSTEP, current_index=val) rset = RadioSetting("frequencystep", "Frequency Step", rs) basic.append(rset) @@ -664,19 +664,19 @@ def get_settings(self): # Menu 13 - LED Timer val = min(_settings.displaytimer, 0x2A) - rs = RadioSettingValueList(LIST_TIMER, LIST_TIMER[val]) + rs = RadioSettingValueList(LIST_TIMER, current_index=val) rset = RadioSetting("displaytimer", "Display Timer", rs) basic.append(rset) # Menu 14 - Lcok Timer val = min(_settings.locktimer, 0x2A) - rs = RadioSettingValueList(LIST_TIMER, LIST_TIMER[val]) + rs = RadioSettingValueList(LIST_TIMER, current_index=val) rset = RadioSetting("locktimer", "Lock Timer", rs) basic.append(rset) # Menu 15 - TOT val = min(_settings.timeouttimer, 0x2A) - rs = RadioSettingValueList(LIST_TIMER, LIST_TIMER[val]) + rs = RadioSettingValueList(LIST_TIMER, current_index=val) rset = RadioSetting("timeouttimer", "Timeout Timer", rs) basic.append(rset) @@ -729,7 +729,7 @@ def myset_freq(setting, obj, atrb, mult): # Menu 21 - Scan DIR rs = RadioSettingValueList(LIST_DIRECTION, - LIST_DIRECTION[_settings.scandirection]) + current_index=_settings.scandirection) rset = RadioSetting("scandirection", "Scan Direction", rs) basic.append(rset) @@ -740,31 +740,31 @@ def myset_freq(setting, obj, atrb, mult): # Menu 23 - Repeater Mode val = min(_settings.talkaround, 0x02) - rs = RadioSettingValueList(LIST_REPEATER, LIST_REPEATER[val]) + rs = RadioSettingValueList(LIST_REPEATER, current_index=val) rset = RadioSetting("talkaround", "Talkaround", rs) basic.append(rset) # Menu 37 - K1 Short val = min(_settings.key1short, 0x09) - rs = RadioSettingValueList(LIST_SKEY, LIST_SKEY[val]) + rs = RadioSettingValueList(LIST_SKEY, current_index=val) rset = RadioSetting("key1short", "Key 1 Short", rs) basic.append(rset) # Menu 36 - K1 Long val = min(_settings.key1long, 0x09) - rs = RadioSettingValueList(LIST_SKEY, LIST_SKEY[val]) + rs = RadioSettingValueList(LIST_SKEY, current_index=val) rset = RadioSetting("key1long", "Key 1 Long", rs) basic.append(rset) # Menu 39 - K2 Short val = min(_settings.key2short, 0x09) - rs = RadioSettingValueList(LIST_SKEY, LIST_SKEY[val]) + rs = RadioSettingValueList(LIST_SKEY, current_index=val) rset = RadioSetting("key2short", "Key 2 Short", rs) basic.append(rset) # Menu 38 - K2 Long val = min(_settings.key2long, 0x09) - rs = RadioSettingValueList(LIST_SKEY, LIST_SKEY[val]) + rs = RadioSettingValueList(LIST_SKEY, current_index=val) rset = RadioSetting("key2long", "Key 2 Long", rs) basic.append(rset) @@ -777,7 +777,7 @@ def myset_freq(setting, obj, atrb, mult): basic.append(rset) rs = RadioSettingValueList(LIST_AB, - LIST_AB[_settings.standbyarea]) + current_index=_settings.standbyarea) rset = RadioSetting("standbyarea", "Standby Area", rs) basic.append(rset) @@ -813,25 +813,25 @@ def myset_freq(setting, obj, atrb, mult): # Menu 40 - DTMF Delay val = min(_dtmf.senddelay, 0x14) - rs = RadioSettingValueList(LIST_DELAY, LIST_DELAY[val]) + rs = RadioSettingValueList(LIST_DELAY, current_index=val) rset = RadioSetting("dtmf.senddelay", "Send Delay", rs) dtmf.append(rset) # Menu 41 - DTMF Interval val = min(_dtmf.sendinterval, 0x11) - rs = RadioSettingValueList(LIST_INTERVAL, LIST_INTERVAL[val]) + rs = RadioSettingValueList(LIST_INTERVAL, current_index=val) rset = RadioSetting("dtmf.sendinterval", "Send Interval", rs) dtmf.append(rset) # Menu 42 - DTMF Mode rs = RadioSettingValueList(LIST_SENDM, - LIST_SENDM[_dtmf.sendmode]) + current_index=_dtmf.sendmode) rset = RadioSetting("dtmf.sendmode", "Send Mode", rs) dtmf.append(rset) # Menu 43 - DTMF Select rs = RadioSettingValueList(LIST_SENDS, - LIST_SENDS[_dtmf.sendselect]) + current_index=_dtmf.sendselect) rset = RadioSetting("dtmf.sendselect", "Send Select", rs) dtmf.append(rset) @@ -979,7 +979,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_settings.range174_240) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("range174_240", "174-240 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _settings.range174_240) @@ -989,7 +989,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_settings.range240_320) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("range240_320", "240-320 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _settings.range240_320) @@ -999,7 +999,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_settings.range320_400) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("range320_400", "320-400 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _settings.range320_400) @@ -1009,7 +1009,7 @@ def apply_txallow_listvalue(setting, obj): idx = TXALLOW_VALUES.index(_settings.range480_560) else: idx = TXALLOW_VALUES.index(0xFF) - rs = RadioSettingValueList(TXALLOW_CHOICES, TXALLOW_CHOICES[idx]) + rs = RadioSettingValueList(TXALLOW_CHOICES, current_index=idx) rset = RadioSetting("range480_560", "480-560 MHz", rs) rset.set_apply_callback(apply_txallow_listvalue, _settings.range480_560) diff --git a/chirp/drivers/kenwood_live.py b/chirp/drivers/kenwood_live.py index fc23963a..f780b1c8 100644 --- a/chirp/drivers/kenwood_live.py +++ b/chirp/drivers/kenwood_live.py @@ -747,7 +747,7 @@ def get_settings(self): options = self._SETTINGS_OPTIONS[setting] rs = RadioSetting(setting, name, RadioSettingValueList(options, - options[value])) + current_index=value)) group.append(rs) for setting, group, name, minv, maxv in ints: diff --git a/chirp/drivers/kg935g.py b/chirp/drivers/kg935g.py index cff093ec..a2c8deba 100644 --- a/chirp/drivers/kg935g.py +++ b/chirp/drivers/kg935g.py @@ -1527,8 +1527,8 @@ def _get_settings(self): # Call Settings rs = RadioSetting("cur_call_grp", "Current Call Group", RadioSettingValueList(CALLGROUP_LIST, - CALLGROUP_LIST[_settings. - cur_call_grp])) + current_index=_settings. + cur_call_grp)) call_grp.append(rs) def apply_callid(setting, obj): @@ -1569,10 +1569,10 @@ def apply_callid(setting, obj): _settings.DspBrtAct)) cfg_grp.append(rs) if self.MODEL != "KG-UV8H": - rs = RadioSetting("DspBrtSby", "Display Brightness STANDBY", - RadioSettingValueList( - DSPBRTSBY_LIST, DSPBRTSBY_LIST[ - _settings.DspBrtSby])) + rs = RadioSetting( + "DspBrtSby", "Display Brightness STANDBY", + RadioSettingValueList( + DSPBRTSBY_LIST, current_index=_settings.DspBrtSby)) cfg_grp.append(rs) rs = RadioSetting("wxalert", "Weather Alert", RadioSettingValueBoolean(_settings.wxalert)) @@ -1581,8 +1581,8 @@ def apply_callid(setting, obj): if self.MODEL == "KG-935G Plus": rs = RadioSetting("wxalert_type", "Weather Alert Notification", RadioSettingValueList(WX_TYPE, - WX_TYPE[_settings. - wxalert_type])) + current_index=_settings. + wxalert_type)) cfg_grp.append(rs) rs = RadioSetting("power_save", "Battery Saver", @@ -1590,17 +1590,17 @@ def apply_callid(setting, obj): cfg_grp.append(rs) rs = RadioSetting("theme", "Theme", RadioSettingValueList( - themelist, themelist[_settings.theme])) + themelist, current_index=_settings.theme)) cfg_grp.append(rs) rs = RadioSetting("backlight", "Backlight Active Time", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings. - backlight])) + current_index=_settings. + backlight)) cfg_grp.append(rs) rs = RadioSetting("scan_rev", "Scan Mode", RadioSettingValueList(SCANMODE_LIST, - SCANMODE_LIST[_settings. - scan_rev])) + current_index=_settings. + scan_rev)) cfg_grp.append(rs) rs = RadioSetting("prich_sw", "Priority Channel Scan", RadioSettingValueBoolean(_settings.prich_sw)) @@ -1614,24 +1614,24 @@ def apply_callid(setting, obj): cfg_grp.append(rs) rs = RadioSetting("ToneScnSave", "Tone Scan Save", RadioSettingValueList(TONESCANSAVELIST, - TONESCANSAVELIST[_settings. - ToneScnSave])) + current_index=_settings. + ToneScnSave)) cfg_grp.append(rs) rs = RadioSetting("roger_beep", "Roger Beep", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[_settings. - roger_beep])) + current_index=_settings. + roger_beep)) cfg_grp.append(rs) rs = RadioSetting("timeout", "Timeout Timer (TOT)", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) cfg_grp.append(rs) rs = RadioSetting("toalarm", "Timeout Alarm (TOA)", RadioSettingValueInteger(0, 10, _settings.toalarm)) cfg_grp.append(rs) rs = RadioSetting("vox", "VOX", RadioSettingValueList(LIST_10, - LIST_10[_settings.vox])) + current_index=_settings.vox)) cfg_grp.append(rs) rs = RadioSetting("voice", "Voice Guide", RadioSettingValueBoolean(_settings.voice)) @@ -1647,45 +1647,47 @@ def apply_callid(setting, obj): cfg_grp.append(rs) rs = RadioSetting("smuteset", "Secondary Area Mute (SMUTESET)", RadioSettingValueList(SMUTESET_LIST, - SMUTESET_LIST[_settings. - smuteset])) + current_index=_settings. + smuteset)) cfg_grp.append(rs) rs = RadioSetting("ani_sw", ani_msg, RadioSettingValueBoolean(_settings.ani_sw)) cfg_grp.append(rs) rs = RadioSetting("dtmf_st", "DTMF Sidetone (SIDETONE)", RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[_settings. - dtmf_st])) + current_index=_settings. + dtmf_st)) cfg_grp.append(rs) rs = RadioSetting("alert", "Alert Tone", RadioSettingValueList(ALERTS_LIST, - ALERTS_LIST[_settings.alert])) + current_index=_settings.alert)) cfg_grp.append(rs) rs = RadioSetting("ptt_delay", pttdly_msg, RadioSettingValueMap(PTTDELAY_TIMES, _settings.ptt_delay)) cfg_grp.append(rs) - rs = RadioSetting("ptt_id", idtx_msg, - RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_settings.ptt_id])) + rs = RadioSetting( + "ptt_id", idtx_msg, + RadioSettingValueList( + PTTID_LIST, current_index=_settings.ptt_id)) cfg_grp.append(rs) - rs = RadioSetting("ring_time", "Ring Time", - RadioSettingValueList(LIST_10, - LIST_10[_settings.ring_time])) + rs = RadioSetting( + "ring_time", "Ring Time", + RadioSettingValueList( + LIST_10, current_index=_settings.ring_time)) cfg_grp.append(rs) if self.MODEL == "KG-UV8H": rs = RadioSetting("language", "Language", RadioSettingValueList( LANGUAGE_LIST, - LANGUAGE_LIST[_settings.language])) + current_index=_settings.language)) cfg_grp.append(rs) rs = RadioSetting("rptmode", "Radio Work Mode", RadioSettingValueList( RPTMODE_LIST, - RPTMODE_LIST[_settings.rptmode])) + current_index=_settings.rptmode)) cfg_grp.append(rs) rs = RadioSetting("rpttype", "Repeater Type", RadioSettingValueMap(RPTTYPE_MAP, @@ -1697,9 +1699,10 @@ def apply_callid(setting, obj): rs = RadioSetting("rptptt", "Repeater PTT", RadioSettingValueBoolean(_settings.rptptt)) cfg_grp.append(rs) - rs = RadioSetting("rpt_hold", "RPT Hold Time", - RadioSettingValueList( - HOLD_TIMES, HOLD_TIMES[_settings.rpt_hold])) + rs = RadioSetting( + "rpt_hold", "RPT Hold Time", + RadioSettingValueList( + HOLD_TIMES, current_index=_settings.rpt_hold)) cfg_grp.append(rs) rs = RadioSetting("rpt_tone", "Repeater Tone", @@ -1716,7 +1719,7 @@ def apply_callid(setting, obj): cfg_grp.append(rs) rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( - PONMSG_LIST, PONMSG_LIST[_settings.ponmsg])) + PONMSG_LIST, current_index=_settings.ponmsg)) cfg_grp.append(rs) rs = RadioSetting("dtmf_tx_time", "DTMF Transmit Time", RadioSettingValueMap(DTMF_TIMES, @@ -1731,7 +1734,7 @@ def apply_callid(setting, obj): rs = RadioSetting("batt_ind", "Battery Indicator", RadioSettingValueList( BATT_DISP_LIST, - BATT_DISP_LIST[_settings.batt_ind])) + current_index=_settings.batt_ind)) cfg_grp.append(rs) rs = RadioSetting("sim_rec", "Simultaneous Receive", @@ -1781,35 +1784,35 @@ def apply_ani_id(setting, obj): rs = RadioSetting("pf1_shrt", "PF1 SHORT Key function", RadioSettingValueList( pfkeyshort, - pfkeyshort[_settings.pf1_shrt])) + current_index=_settings.pf1_shrt)) key_grp.append(rs) rs = RadioSetting("pf1_long", "PF1 LONG Key function", RadioSettingValueList( pfkeylong, - pfkeylong[_settings.pf1_long])) + current_index=_settings.pf1_long)) key_grp.append(rs) if self.MODEL != "KG-UV8H": rs = RadioSetting("pf2_shrt", "PF2 SHORT Key function", RadioSettingValueList( pfkeyshort, - pfkeyshort[_settings.pf2_shrt])) + current_index=_settings.pf2_shrt)) key_grp.append(rs) rs = RadioSetting("pf2_long", "PF2 LONG Key function", RadioSettingValueList( pfkeylong, - pfkeylong[_settings.pf2_long])) + current_index=_settings.pf2_long)) key_grp.append(rs) # SCAN GROUP settings rs = RadioSetting("ScnGrpA_Act", "Scan Group A Active", RadioSettingValueList(SCANGRP_LIST, - SCANGRP_LIST[_settings. - ScnGrpA_Act])) + current_index=_settings. + ScnGrpA_Act)) scan_grp.append(rs) rs = RadioSetting("ScnGrpB_Act", "Scan Group B Active", RadioSettingValueList(SCANGRP_LIST, - SCANGRP_LIST[_settings. - ScnGrpB_Act])) + current_index=_settings. + ScnGrpB_Act)) scan_grp.append(rs) for i in range(1, 11): @@ -1829,8 +1832,8 @@ def apply_ani_id(setting, obj): # rs = RadioSetting("work_mode_a", vfo_area + "A Workmode", RadioSettingValueList(workmodelist, - workmodelist[_settings. - work_mode_a])) + current_index=_settings. + work_mode_a)) vfoa_grp.append(rs) rs = RadioSetting("work_ch_a", vfo_area + "A Work Channel", RadioSettingValueInteger(1, 999, @@ -1867,20 +1870,20 @@ def apply_ani_id(setting, obj): _vfoa.power = 2 rs = RadioSetting("vfoa.power", vfo_area + "A Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfoa.power])) + POWER_LIST, current_index=_vfoa.power)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.iswide", vfo_area + "A Wide/Narrow", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfoa.iswide])) + BANDWIDTH_LIST, current_index=_vfoa.iswide)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.mute_mode", vfo_area + "A Mute (SP Mute)", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfoa.mute_mode])) + SPMUTE_LIST, current_index=_vfoa.mute_mode)) vfoa_grp.append(rs) if self.MODEL == "KG-UV8H": rs = RadioSetting("vfoa.ofst_dir", vfo_area + "A Shift Dir", RadioSettingValueList( - OFFSET_LIST, OFFSET_LIST[_vfoa.ofst_dir])) + OFFSET_LIST, current_index=_vfoa.ofst_dir)) vfoa_grp.append(rs) else: rs = RadioSetting("VFO_repeater_a", vfo_area + "A Repeater", @@ -1890,28 +1893,28 @@ def apply_ani_id(setting, obj): rs = RadioSetting("vfoa.scrambler", vfo_area + "A Descramble", RadioSettingValueList( - SCRAMBLE_LIST, SCRAMBLE_LIST[_vfoa.scrambler])) + SCRAMBLE_LIST, current_index=_vfoa.scrambler)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.cmpndr", vfo_area + "A Compander", RadioSettingValueList( - ONOFF_LIST, ONOFF_LIST[_vfoa.cmpndr])) + ONOFF_LIST, current_index=_vfoa.cmpndr)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.step", vfo_area + "A Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfoa.step])) + STEP_LIST, current_index=_vfoa.step)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.squelch", vfo_area + "A Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfoa.squelch])) + LIST_10, current_index=_vfoa.squelch)) vfoa_grp.append(rs) # VFO B Settings rs = RadioSetting("work_mode_b", vfo_area + "B Workmode", RadioSettingValueList(workmodelist, - workmodelist[_settings. - work_mode_b])) + current_index=_settings. + work_mode_b)) vfob_grp.append(rs) rs = RadioSetting("work_ch_b", vfo_area + "B Work Channel", RadioSettingValueInteger(1, 999, @@ -1949,20 +1952,20 @@ def apply_ani_id(setting, obj): _vfob.power = 2 rs = RadioSetting("vfob.power", vfo_area + "B Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfob.power])) + POWER_LIST, current_index=_vfob.power)) vfob_grp.append(rs) rs = RadioSetting("vfob.iswide", vfo_area + "B Wide/Narrow", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfob.iswide])) + BANDWIDTH_LIST, current_index=_vfob.iswide)) vfob_grp.append(rs) rs = RadioSetting("vfob.mute_mode", vfo_area + "B Mute (SP Mute)", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfob.mute_mode])) + SPMUTE_LIST, current_index=_vfob.mute_mode)) vfob_grp.append(rs) if self.MODEL == "KG-UV8H": rs = RadioSetting("vfob.ofst_dir", vfo_area + "B Shift Dir", RadioSettingValueList( - OFFSET_LIST, OFFSET_LIST[_vfob.ofst_dir])) + OFFSET_LIST, current_index=_vfob.ofst_dir)) vfob_grp.append(rs) else: rs = RadioSetting("VFO_repeater_b", vfo_area + "B Repeater", @@ -1972,21 +1975,21 @@ def apply_ani_id(setting, obj): rs = RadioSetting("vfob.scrambler", vfo_area + "B Descramble", RadioSettingValueList( - SCRAMBLE_LIST, SCRAMBLE_LIST[_vfob.scrambler])) + SCRAMBLE_LIST, current_index=_vfob.scrambler)) vfob_grp.append(rs) rs = RadioSetting("vfob.cmpndr", vfo_area + "B Compander", RadioSettingValueList( - ONOFF_LIST, ONOFF_LIST[_vfob.cmpndr])) + ONOFF_LIST, current_index=_vfob.cmpndr)) vfob_grp.append(rs) rs = RadioSetting("vfob.step", vfo_area + "B Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfob.step])) + STEP_LIST, current_index=_vfob.step)) vfob_grp.append(rs) rs = RadioSetting("vfob.squelch", vfo_area + "B Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfob.squelch])) + LIST_10, current_index=_vfob.squelch)) vfob_grp.append(rs) # FM RADIO PRESETS diff --git a/chirp/drivers/kguv8d.py b/chirp/drivers/kguv8d.py index e3b25992..2bead57e 100644 --- a/chirp/drivers/kguv8d.py +++ b/chirp/drivers/kguv8d.py @@ -687,15 +687,15 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( - PONMSG_LIST, PONMSG_LIST[_settings.ponmsg])) + PONMSG_LIST, current_index=_settings.ponmsg)) cfg_grp.append(rs) rs = RadioSetting("voice", "Voice Guide", RadioSettingValueBoolean(_settings.voice)) cfg_grp.append(rs) rs = RadioSetting("language", "Language", RadioSettingValueList(LANGUAGE_LIST, - LANGUAGE_LIST[_settings. - language])) + current_index=_settings. + language)) cfg_grp.append(rs) rs = RadioSetting("timeout", "Timeout Timer", RadioSettingValueInteger(15, 900, @@ -724,33 +724,35 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("backlight", "Backlight", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings. - backlight])) + current_index=_settings. + backlight)) cfg_grp.append(rs) rs = RadioSetting("dtmf_st", "DTMF Sidetone", RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[_settings. - dtmf_st])) + current_index=_settings. + dtmf_st)) cfg_grp.append(rs) rs = RadioSetting("ani-id_sw", "ANI-ID Switch", RadioSettingValueBoolean(_settings.ani_sw)) cfg_grp.append(rs) - rs = RadioSetting("ptt-id_delay", "PTT-ID Delay", - RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_settings.ptt_id])) + rs = RadioSetting( + "ptt-id_delay", "PTT-ID Delay", + RadioSettingValueList( + PTTID_LIST, current_index=_settings.ptt_id)) cfg_grp.append(rs) - rs = RadioSetting("ring_time", "Ring Time", - RadioSettingValueList(LIST_10, - LIST_10[_settings.ring_time])) + rs = RadioSetting( + "ring_time", "Ring Time", + RadioSettingValueList( + LIST_10, current_index=_settings.ring_time)) cfg_grp.append(rs) rs = RadioSetting("scan_rev", "Scan Mode", RadioSettingValueList(SCANMODE_LIST, - SCANMODE_LIST[_settings. - scan_rev])) + current_index=_settings. + scan_rev)) cfg_grp.append(rs) rs = RadioSetting("vox", "VOX", RadioSettingValueList(LIST_10, - LIST_10[_settings.vox])) + current_index=_settings.vox)) cfg_grp.append(rs) rs = RadioSetting("prich_sw", "Priority Channel Switch", RadioSettingValueBoolean(_settings.prich_sw)) @@ -760,13 +762,13 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("rpt_mode", "Radio Mode", RadioSettingValueList(RPTMODE_LIST, - RPTMODE_LIST[_settings. - rpt_mode])) + current_index=_settings. + rpt_mode)) cfg_grp.append(rs) rs = RadioSetting("rpt_set", "Repeater Setting", RadioSettingValueList(RPTSET_LIST, - RPTSET_LIST[_settings. - rpt_set])) + current_index=_settings. + rpt_set)) cfg_grp.append(rs) rs = RadioSetting("rpt_spk", "Repeater Mode Speaker", RadioSettingValueBoolean(_settings.rpt_spk)) @@ -776,37 +778,38 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("dtmf_tx_time", "DTMF Tx Duration", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_tx_time])) + current_index=_settings. + dtmf_tx_time)) cfg_grp.append(rs) rs = RadioSetting("dtmf_interval", "DTMF Interval", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_interval])) + current_index=_settings. + dtmf_interval)) cfg_grp.append(rs) rs = RadioSetting("alert", "Alert Tone", RadioSettingValueList(ALERTS_LIST, - ALERTS_LIST[_settings.alert])) + current_index=_settings.alert)) cfg_grp.append(rs) rs = RadioSetting("rpt_tone", "Repeater Tone", RadioSettingValueBoolean(_settings.rpt_tone)) cfg_grp.append(rs) rs = RadioSetting("rpt_hold", "Repeater Hold Time", RadioSettingValueList(HOLD_TIMES, - HOLD_TIMES[_settings. - rpt_hold])) + current_index=_settings. + rpt_hold)) cfg_grp.append(rs) rs = RadioSetting("scan_det", "Scan DET", RadioSettingValueBoolean(_settings.scan_det)) cfg_grp.append(rs) - rs = RadioSetting("sc_qt", "SC-QT", - RadioSettingValueList(SCQT_LIST, - SCQT_LIST[_settings.smuteset])) + rs = RadioSetting( + "sc_qt", "SC-QT", + RadioSettingValueList( + SCQT_LIST, current_index=_settings.smuteset)) cfg_grp.append(rs) rs = RadioSetting("smuteset", "SubFreq Mute", RadioSettingValueList(SMUTESET_LIST, - SMUTESET_LIST[_settings. - smuteset])) + current_index=_settings. + smuteset)) cfg_grp.append(rs) _pwd = "".join(map(chr, _settings.mode_sw_pwd)) val = RadioSettingValueString(0, 6, _pwd) @@ -823,8 +826,8 @@ def _get_settings(self): # rs = RadioSetting("vfoa_mode", "VFO A Workmode", RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[_settings. - workmode_a])) + current_index=_settings. + workmode_a)) vfoa_grp.append(rs) rs = RadioSetting("vfoa_chan", "VFO A Channel", RadioSettingValueInteger(1, 999, _settings.work_cha)) @@ -841,24 +844,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfoa_power", "VFO A Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfoa.power])) + POWER_LIST, current_index=_vfoa.power)) vfoa_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfoa_iswide", "VFO A NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfoa.iswide])) + BANDWIDTH_LIST, current_index=_vfoa.iswide)) vfoa_grp.append(rs) rs = RadioSetting("vfoa_mute_mode", "VFO A Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfoa.mute_mode])) + SPMUTE_LIST, current_index=_vfoa.mute_mode)) vfoa_grp.append(rs) rs = RadioSetting("vfoa_step", "VFO A Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfoa.step])) + STEP_LIST, current_index=_vfoa.step)) vfoa_grp.append(rs) rs = RadioSetting("vfoa_squelch", "VFO A Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfoa.squelch])) + LIST_10, current_index=_vfoa.squelch)) vfoa_grp.append(rs) rs = RadioSetting("bcl_a", "Busy Channel Lock-out A", RadioSettingValueBoolean(_settings.bcl_a)) @@ -869,7 +872,7 @@ def _get_settings(self): rs = RadioSetting("vfob_mode", "VFO B Workmode", RadioSettingValueList( WORKMODE_LIST, - WORKMODE_LIST[_settings.workmode_b])) + current_index=_settings.workmode_b)) vfob_grp.append(rs) rs = RadioSetting("vfob_chan", "VFO B Channel", RadioSettingValueInteger(1, 999, _settings.work_chb)) @@ -886,24 +889,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfob_power", "VFO B Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfob.power])) + POWER_LIST, current_index=_vfob.power)) vfob_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfob_iswide", "VFO B NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfob.iswide])) + BANDWIDTH_LIST, current_index=_vfob.iswide)) vfob_grp.append(rs) rs = RadioSetting("vfob_mute_mode", "VFO B Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfob.mute_mode])) + SPMUTE_LIST, current_index=_vfob.mute_mode)) vfob_grp.append(rs) rs = RadioSetting("vfob_step", "VFO B Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfob.step])) + STEP_LIST, current_index=_vfob.step)) vfob_grp.append(rs) rs = RadioSetting("vfob_squelch", "VFO B Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfob.squelch])) + LIST_10, current_index=_vfob.squelch)) vfob_grp.append(rs) rs = RadioSetting("bcl_b", "Busy Channel Lock-out B", RadioSettingValueBoolean(_settings.bcl_b)) @@ -929,12 +932,12 @@ def _get_settings(self): rs = RadioSetting("pf1_func", "PF1 Key function", RadioSettingValueList( PF1KEY_LIST, - PF1KEY_LIST[self._memobj.settings.pf1_func])) + current_index=self._memobj.settings.pf1_func)) key_grp.append(rs) rs = RadioSetting("pf3_func", "PF3 Key function", RadioSettingValueList( PF3KEY_LIST, - PF3KEY_LIST[self._memobj.settings.pf3_func])) + current_index=self._memobj.settings.pf3_func)) key_grp.append(rs) # diff --git a/chirp/drivers/kguv8dplus.py b/chirp/drivers/kguv8dplus.py index a9341f8f..e500edd1 100644 --- a/chirp/drivers/kguv8dplus.py +++ b/chirp/drivers/kguv8dplus.py @@ -724,27 +724,27 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( - PONMSG_LIST, PONMSG_LIST[_settings.ponmsg])) + PONMSG_LIST, current_index=_settings.ponmsg)) cfg_grp.append(rs) rs = RadioSetting("voice", "Voice Guide", RadioSettingValueBoolean(_settings.voice)) cfg_grp.append(rs) rs = RadioSetting("language", "Language", RadioSettingValueList(LANGUAGE_LIST, - LANGUAGE_LIST[_settings. - language])) + current_index=_settings. + language)) cfg_grp.append(rs) rs = RadioSetting("timeout", "Timeout Timer", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) cfg_grp.append(rs) rs = RadioSetting("toalarm", "Timeout Alarm", RadioSettingValueInteger(0, 10, _settings.toalarm)) cfg_grp.append(rs) - rs = RadioSetting("roger_beep", "Roger Beep", - RadioSettingValueList(ROGER_LIST, - ROGER_LIST[ - _settings.roger_beep])) + rs = RadioSetting( + "roger_beep", "Roger Beep", + RadioSettingValueList( + ROGER_LIST, current_index=_settings.roger_beep)) cfg_grp.append(rs) rs = RadioSetting("power_save", "Power save", RadioSettingValueBoolean(_settings.power_save)) @@ -763,33 +763,35 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("backlight", "Backlight", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings. - backlight])) + current_index=_settings. + backlight)) cfg_grp.append(rs) rs = RadioSetting("dtmf_st", "DTMF Sidetone", RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[_settings. - dtmf_st])) + current_index=_settings. + dtmf_st)) cfg_grp.append(rs) rs = RadioSetting("ani_sw", "ANI-ID Switch", RadioSettingValueBoolean(_settings.ani_sw)) cfg_grp.append(rs) - rs = RadioSetting("ptt_id", "PTT-ID Delay", - RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_settings.ptt_id])) + rs = RadioSetting( + "ptt_id", "PTT-ID Delay", + RadioSettingValueList( + PTTID_LIST, current_index=_settings.ptt_id)) cfg_grp.append(rs) - rs = RadioSetting("ring_time", "Ring Time", - RadioSettingValueList(LIST_10, - LIST_10[_settings.ring_time])) + rs = RadioSetting( + "ring_time", "Ring Time", + RadioSettingValueList( + LIST_10, current_index=_settings.ring_time)) cfg_grp.append(rs) rs = RadioSetting("scan_rev", "Scan Mode", RadioSettingValueList(SCANMODE_LIST, - SCANMODE_LIST[_settings. - scan_rev])) + current_index=_settings. + scan_rev)) cfg_grp.append(rs) rs = RadioSetting("vox", "VOX", RadioSettingValueList(LIST_10, - LIST_10[_settings.vox])) + current_index=_settings.vox)) cfg_grp.append(rs) rs = RadioSetting("prich_sw", "Priority Channel Switch", RadioSettingValueBoolean(_settings.prich_sw)) @@ -799,13 +801,13 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("rpt_mode", "Radio Mode", RadioSettingValueList(RPTMODE_LIST, - RPTMODE_LIST[_settings. - rpt_mode])) + current_index=_settings. + rpt_mode)) cfg_grp.append(rs) rs = RadioSetting("rpt_set", "Repeater Setting", RadioSettingValueList(RPTSET_LIST, - RPTSET_LIST[_settings. - rpt_set])) + current_index=_settings. + rpt_set)) cfg_grp.append(rs) rs = RadioSetting("rpt_spk", "Repeater Mode Speaker", RadioSettingValueBoolean(_settings.rpt_spk)) @@ -815,45 +817,45 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("dtmf_tx_time", "DTMF Tx Duration", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_tx_time])) + current_index=_settings. + dtmf_tx_time)) cfg_grp.append(rs) rs = RadioSetting("dtmf_interval", "DTMF Interval", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_interval])) + current_index=_settings. + dtmf_interval)) cfg_grp.append(rs) rs = RadioSetting("alert", "Alert Tone", RadioSettingValueList(ALERTS_LIST, - ALERTS_LIST[_settings.alert])) + current_index=_settings.alert)) cfg_grp.append(rs) rs = RadioSetting("rpt_tone", "Repeater Tone", RadioSettingValueBoolean(_settings.rpt_tone)) cfg_grp.append(rs) rs = RadioSetting("rpt_hold", "Repeater Hold Time", RadioSettingValueList(HOLD_TIMES, - HOLD_TIMES[_settings. - rpt_hold])) + current_index=_settings. + rpt_hold)) cfg_grp.append(rs) rs = RadioSetting("scan_det", "Scan DET", RadioSettingValueBoolean(_settings.scan_det)) cfg_grp.append(rs) rs = RadioSetting("sc_qt", "SC-QT", RadioSettingValueList(SCQT_LIST, - SCQT_LIST[_settings.sc_qt])) + current_index=_settings.sc_qt)) cfg_grp.append(rs) rs = RadioSetting("smuteset", "SubFreq Mute", RadioSettingValueList(SMUTESET_LIST, - SMUTESET_LIST[_settings. - smuteset])) + current_index=_settings. + smuteset)) cfg_grp.append(rs) # VFO A Settings # - rs = RadioSetting("workmode_a", "VFO A Workmode", - RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[ - _settings.workmode_a])) + rs = RadioSetting( + "workmode_a", "VFO A Workmode", + RadioSettingValueList( + WORKMODE_LIST, current_index=_settings.workmode_a)) vfoa_grp.append(rs) rs = RadioSetting("work_cha", "VFO A Channel", RadioSettingValueInteger(1, 999, _settings.work_cha)) @@ -870,24 +872,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfoa.power", "VFO A Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfoa.power])) + POWER_LIST, current_index=_vfoa.power)) vfoa_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfoa.iswide", "VFO A NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfoa.iswide])) + BANDWIDTH_LIST, current_index=_vfoa.iswide)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.mute_mode", "VFO A Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfoa.mute_mode])) + SPMUTE_LIST, current_index=_vfoa.mute_mode)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.step", "VFO A Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfoa.step])) + STEP_LIST, current_index=_vfoa.step)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.squelch", "VFO A Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfoa.squelch])) + LIST_10, current_index=_vfoa.squelch)) vfoa_grp.append(rs) rs = RadioSetting("bcl_a", "Busy Channel Lock-out A", RadioSettingValueBoolean(_settings.bcl_a)) @@ -895,10 +897,10 @@ def _get_settings(self): # VFO B Settings # - rs = RadioSetting("workmode_b", "VFO B Workmode", - RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[ - _settings.workmode_b])) + rs = RadioSetting( + "workmode_b", "VFO B Workmode", + RadioSettingValueList( + WORKMODE_LIST, current_index=_settings.workmode_b)) vfob_grp.append(rs) rs = RadioSetting("work_chb", "VFO B Channel", RadioSettingValueInteger(1, 999, _settings.work_chb)) @@ -915,24 +917,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfob.power", "VFO B Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfob.power])) + POWER_LIST, current_index=_vfob.power)) vfob_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfob.iswide", "VFO B NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfob.iswide])) + BANDWIDTH_LIST, current_index=_vfob.iswide)) vfob_grp.append(rs) rs = RadioSetting("vfob.mute_mode", "VFO B Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfob.mute_mode])) + SPMUTE_LIST, current_index=_vfob.mute_mode)) vfob_grp.append(rs) rs = RadioSetting("vfob.step", "VFO B Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfob.step])) + STEP_LIST, current_index=_vfob.step)) vfob_grp.append(rs) rs = RadioSetting("vfob.squelch", "VFO B Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfob.squelch])) + LIST_10, current_index=_vfob.squelch)) vfob_grp.append(rs) rs = RadioSetting("bcl_b", "Busy Channel Lock-out B", RadioSettingValueBoolean(_settings.bcl_b)) @@ -967,12 +969,12 @@ def apply_ani_id(setting, obj): rs = RadioSetting("pf1_func", "PF1 Key function", RadioSettingValueList( PF1KEY_LIST, - PF1KEY_LIST[_settings.pf1_func])) + current_index=_settings.pf1_func)) key_grp.append(rs) rs = RadioSetting("pf3_func", "PF3 Key function", RadioSettingValueList( PF3KEY_LIST, - PF3KEY_LIST[_settings.pf3_func])) + current_index=_settings.pf3_func)) key_grp.append(rs) # diff --git a/chirp/drivers/kguv8e.py b/chirp/drivers/kguv8e.py index 1e4adade..1e712166 100644 --- a/chirp/drivers/kguv8e.py +++ b/chirp/drivers/kguv8e.py @@ -732,26 +732,26 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( - PONMSG_LIST, PONMSG_LIST[_settings.ponmsg])) + PONMSG_LIST, current_index=_settings.ponmsg)) cfg_grp.append(rs) rs = RadioSetting("voice", "Voice Guide", RadioSettingValueBoolean(_settings.voice)) cfg_grp.append(rs) rs = RadioSetting("language", "Language", RadioSettingValueList(LANGUAGE_LIST, - LANGUAGE_LIST[_settings. - language])) + current_index=_settings. + language)) cfg_grp.append(rs) rs = RadioSetting("timeout", "Timeout Timer", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) cfg_grp.append(rs) rs = RadioSetting("toalarm", "Timeout Alarm", RadioSettingValueInteger(0, 10, _settings.toalarm)) cfg_grp.append(rs) rs = RadioSetting("roger_beep", "Roger Beep", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[_settings.roger_beep])) + current_index=_settings.roger_beep)) cfg_grp.append(rs) rs = RadioSetting("power_save", "Power save", RadioSettingValueBoolean(_settings.power_save)) @@ -770,33 +770,33 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("backlight", "Backlight", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings. - backlight])) + current_index=_settings. + backlight)) cfg_grp.append(rs) rs = RadioSetting("dtmf_st", "DTMF Sidetone", RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[_settings. - dtmf_st])) + current_index=_settings. + dtmf_st)) cfg_grp.append(rs) rs = RadioSetting("ani_sw", "ANI-ID Switch", RadioSettingValueBoolean(_settings.ani_sw)) cfg_grp.append(rs) rs = RadioSetting("ptt_id", "PTT-ID Delay", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_settings.ptt_id])) + current_index=_settings.ptt_id)) cfg_grp.append(rs) rs = RadioSetting("ring_time", "Ring Time", RadioSettingValueList(LIST_10, - LIST_10[_settings.ring_time])) + current_index=_settings.ring_time)) cfg_grp.append(rs) rs = RadioSetting("scan_rev", "Scan Mode", RadioSettingValueList(SCANMODE_LIST, - SCANMODE_LIST[_settings. - scan_rev])) + current_index=_settings. + scan_rev)) cfg_grp.append(rs) rs = RadioSetting("vox", "VOX", RadioSettingValueList(LIST_10, - LIST_10[_settings.vox])) + current_index=_settings.vox)) cfg_grp.append(rs) rs = RadioSetting("prich_sw", "Priority Channel Switch", RadioSettingValueBoolean(_settings.prich_sw)) @@ -806,13 +806,13 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("rpt_mode", "Radio Mode", RadioSettingValueList(RPTMODE_LIST, - RPTMODE_LIST[_settings. - rpt_mode])) + current_index=_settings. + rpt_mode)) cfg_grp.append(rs) rs = RadioSetting("rpt_set", "Repeater Setting", RadioSettingValueList(RPTSET_LIST, - RPTSET_LIST[_settings. - rpt_set])) + current_index=_settings. + rpt_set)) cfg_grp.append(rs) rs = RadioSetting("rpt_spk", "Repeater Mode Speaker", RadioSettingValueBoolean(_settings.rpt_spk)) @@ -822,44 +822,44 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("dtmf_tx_time", "DTMF Tx Duration", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_tx_time])) + current_index=_settings. + dtmf_tx_time)) cfg_grp.append(rs) rs = RadioSetting("dtmf_interval", "DTMF Interval", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[_settings. - dtmf_interval])) + current_index=_settings. + dtmf_interval)) cfg_grp.append(rs) rs = RadioSetting("alert", "Alert Tone", RadioSettingValueList(ALERTS_LIST, - ALERTS_LIST[_settings.alert])) + current_index=_settings.alert)) cfg_grp.append(rs) rs = RadioSetting("rpt_tone", "Repeater Tone", RadioSettingValueBoolean(_settings.rpt_tone)) cfg_grp.append(rs) rs = RadioSetting("rpt_hold", "Repeater Hold Time", RadioSettingValueList(HOLD_TIMES, - HOLD_TIMES[_settings. - rpt_hold])) + current_index=_settings. + rpt_hold)) cfg_grp.append(rs) rs = RadioSetting("scan_det", "Scan DET", RadioSettingValueBoolean(_settings.scan_det)) cfg_grp.append(rs) rs = RadioSetting("sc_qt", "SC-QT", RadioSettingValueList(SCQT_LIST, - SCQT_LIST[_settings.sc_qt])) + current_index=_settings.sc_qt)) cfg_grp.append(rs) rs = RadioSetting("smuteset", "SubFreq Mute", RadioSettingValueList(SMUTESET_LIST, - SMUTESET_LIST[_settings. - smuteset])) + current_index=_settings. + smuteset)) cfg_grp.append(rs) # # VFO A Settings # rs = RadioSetting("workmode_a", "VFO A Workmode", - RadioSettingValueList(WORKMODE_LIST, WORKMODE_LIST[_settings.workmode_a])) + RadioSettingValueList(WORKMODE_LIST, current_index=_settings.workmode_a)) vfoa_grp.append(rs) rs = RadioSetting("work_cha", "VFO A Channel", RadioSettingValueInteger(1, 999, _settings.work_cha)) @@ -876,24 +876,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfoa.power", "VFO A Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfoa.power])) + POWER_LIST, current_index=_vfoa.power)) vfoa_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfoa.iswide", "VFO A NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfoa.iswide])) + BANDWIDTH_LIST, current_index=_vfoa.iswide)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.mute_mode", "VFO A Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfoa.mute_mode])) + SPMUTE_LIST, current_index=_vfoa.mute_mode)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.step", "VFO A Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfoa.step])) + STEP_LIST, current_index=_vfoa.step)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.squelch", "VFO A Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfoa.squelch])) + LIST_10, current_index=_vfoa.squelch)) vfoa_grp.append(rs) rs = RadioSetting("bcl_a", "Busy Channel Lock-out A", RadioSettingValueBoolean(_settings.bcl_a)) @@ -903,7 +903,7 @@ def _get_settings(self): # VFO B Settings # rs = RadioSetting("workmode_b", "VFO B Workmode", - RadioSettingValueList(WORKMODE_LIST, WORKMODE_LIST[_settings.workmode_b])) + RadioSettingValueList(WORKMODE_LIST, current_index=_settings.workmode_b)) vfob_grp.append(rs) rs = RadioSetting("work_chb", "VFO B Channel", RadioSettingValueInteger(1, 999, _settings.work_chb)) @@ -920,24 +920,24 @@ def _get_settings(self): # u16 txtone; rs = RadioSetting("vfob.power", "VFO B Power", RadioSettingValueList( - POWER_LIST, POWER_LIST[_vfob.power])) + POWER_LIST, current_index=_vfob.power)) vfob_grp.append(rs) # shift_dir:2 rs = RadioSetting("vfob.iswide", "VFO B NBFM", RadioSettingValueList( - BANDWIDTH_LIST, BANDWIDTH_LIST[_vfob.iswide])) + BANDWIDTH_LIST, current_index=_vfob.iswide)) vfob_grp.append(rs) rs = RadioSetting("vfob.mute_mode", "VFO B Mute", RadioSettingValueList( - SPMUTE_LIST, SPMUTE_LIST[_vfob.mute_mode])) + SPMUTE_LIST, current_index=_vfob.mute_mode)) vfob_grp.append(rs) rs = RadioSetting("vfob.step", "VFO B Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfob.step])) + STEP_LIST, current_index=_vfob.step)) vfob_grp.append(rs) rs = RadioSetting("vfob.squelch", "VFO B Squelch", RadioSettingValueList( - LIST_10, LIST_10[_vfob.squelch])) + LIST_10, current_index=_vfob.squelch)) vfob_grp.append(rs) rs = RadioSetting("bcl_b", "Busy Channel Lock-out B", RadioSettingValueBoolean(_settings.bcl_b)) @@ -973,12 +973,12 @@ def apply_ani_id(setting, obj): rs = RadioSetting("pf1_func", "PF1 Key function", RadioSettingValueList( PF1KEY_LIST, - PF1KEY_LIST[_settings.pf1_func])) + current_index=_settings.pf1_func)) key_grp.append(rs) rs = RadioSetting("pf3_func", "PF3 Key function", RadioSettingValueList( PF3KEY_LIST, - PF3KEY_LIST[_settings.pf3_func])) + current_index=_settings.pf3_func)) key_grp.append(rs) # diff --git a/chirp/drivers/kguv920pa.py b/chirp/drivers/kguv920pa.py index 0e88f15f..04a14799 100644 --- a/chirp/drivers/kguv920pa.py +++ b/chirp/drivers/kguv920pa.py @@ -763,7 +763,7 @@ def get_memory(self, number): _scram = 0 rs = RadioSetting("scrambler", "Scrambler", RadioSettingValueList(SCRAMBLER_LIST, - SCRAMBLER_LIST[_scram])) + current_index=_scram)) mem.extra.append(rs) rs = RadioSetting("compander", "Compander", @@ -856,17 +856,17 @@ def _get_settings(self): cfg_grp.append(rs) rs = RadioSetting("roger", "Roger Beep", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[_settings.roger])) + current_index=_settings.roger)) cfg_grp.append(rs) rs = RadioSetting("roger_time", "Roger Tx Duration (ms)", RadioSettingValueList( ROGER_TIMES, - ROGER_TIMES[_settings.roger_time])) + current_index=_settings.roger_time)) cfg_grp.append(rs) rs = RadioSetting("roger_int", "Roger Interval (ms)", RadioSettingValueList( ROGER_INTERVALS, - ROGER_INTERVALS[_settings.roger_int])) + current_index=_settings.roger_int)) cfg_grp.append(rs) val = RadioSettingValueString(1, 6, _roger_decode(_settings.roger_begin), @@ -900,7 +900,7 @@ def _get_settings(self): rs = RadioSetting("dtmf_st", "DTMF Sidetone", RadioSettingValueList( DTMF_ST_LIST, - DTMF_ST_LIST[_settings.dtmf_st])) + current_index=_settings.dtmf_st)) cfg_grp.append(rs) rs = RadioSetting("pri_ch_sw", "Priority Channel Switch", RadioSettingValueBoolean(_settings.pri_ch_sw)) @@ -912,7 +912,7 @@ def _get_settings(self): rs = RadioSetting("apo_time", "Auto Power-Off (Min)", RadioSettingValueList( APO_TIME_LIST, - APO_TIME_LIST[_settings.apo_time])) + current_index=_settings.apo_time)) cfg_grp.append(rs) rs = RadioSetting("alert", "Alert Pulse (Hz)", RadioSettingValueMap(ALERT_MAP, _settings.alert)) @@ -920,24 +920,24 @@ def _get_settings(self): rs = RadioSetting("fan_mode", "Fan Mode", RadioSettingValueList( FAN_MODE_LIST, - FAN_MODE_LIST[_settings.fan_mode])) + current_index=_settings.fan_mode)) cfg_grp.append(rs) rs = RadioSetting("low_v", "Low Voltage Shutoff", RadioSettingValueBoolean(_settings.low_v)) cfg_grp.append(rs) rs = RadioSetting("ans", "Noise Reduction", RadioSettingValueList(ANS_LIST, - ANS_LIST[_settings.ans])) + current_index=_settings.ans)) cfg_grp.append(rs) rs = RadioSetting("dtmf_time", "DTMF Tx Duration (ms)", RadioSettingValueList( DTMF_TIMES, - DTMF_TIMES[_settings.dtmf_time])) + current_index=_settings.dtmf_time)) cfg_grp.append(rs) rs = RadioSetting("dtmf_interval", "DTMF Interval (ms)", RadioSettingValueList( DTMF_INTERVALS, - DTMF_INTERVALS[_settings.dtmf_interval])) + current_index=_settings.dtmf_interval)) cfg_grp.append(rs) # @@ -960,7 +960,7 @@ def _get_settings(self): ui_grp.append(rs) rs = RadioSetting("voice", "Voice Guide", RadioSettingValueList(VOICE_LIST, - VOICE_LIST[_settings.voice])) + current_index=_settings.voice)) ui_grp.append(rs) rs = RadioSetting("beep", "Beep", RadioSettingValueBoolean(_settings.beep)) @@ -968,7 +968,7 @@ def _get_settings(self): rs = RadioSetting("active_display", "Active Display", RadioSettingValueList( AB_LIST, - AB_LIST[_settings.active_display])) + current_index=_settings.active_display)) ui_grp.append(rs) rs = RadioSetting("single_display", "Single Display", RadioSettingValueBoolean(_settings.single_display)) @@ -976,17 +976,17 @@ def _get_settings(self): rs = RadioSetting("tx_led", "TX Backlight", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.tx_led])) + current_index=_settings.tx_led)) ui_grp.append(rs) rs = RadioSetting("wt_led", "Standby Backlight", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.wt_led])) + current_index=_settings.wt_led)) ui_grp.append(rs) rs = RadioSetting("rx_led", "Rx Backlight", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.rx_led])) + current_index=_settings.rx_led)) ui_grp.append(rs) # @@ -1021,7 +1021,7 @@ def _get_settings(self): vfoa_grp.append(rs) rs = RadioSetting("vfoa.duplex", "Duplex", RadioSettingValueList(DUPLEX_LIST, - DUPLEX_LIST[_vfoa.duplex])) + current_index=_vfoa.duplex)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.isnarrow", "Mode", RadioSettingValueMap(BANDWIDTH_MAP, _vfoa.isnarrow)) @@ -1031,7 +1031,7 @@ def _get_settings(self): _vfoa_scram = 0 rs = RadioSetting("vfoa.scrambler", "Scrambler", RadioSettingValueList(SCRAMBLER_LIST, - SCRAMBLER_LIST[_vfoa_scram])) + current_index=_vfoa_scram)) vfoa_grp.append(rs) rs = RadioSetting("vfoa.compander", "Compander", RadioSettingValueBoolean(_vfoa.compander)) @@ -1042,7 +1042,7 @@ def _get_settings(self): vfoa_grp.append(rs) rs = RadioSetting("step_a", "Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_settings.step_a])) + STEP_LIST, current_index=_settings.step_a)) vfoa_grp.append(rs) rs = RadioSetting("squelch_a", "Squelch", RadioSettingValueInteger( @@ -1084,7 +1084,7 @@ def _get_settings(self): vfob_grp.append(rs) rs = RadioSetting("vfob.duplex", "Duplex", RadioSettingValueList(DUPLEX_LIST, - DUPLEX_LIST[_vfob.duplex])) + current_index=_vfob.duplex)) vfob_grp.append(rs) rs = RadioSetting("vfob.isnarrow", "Mode", RadioSettingValueMap(BANDWIDTH_MAP, _vfob.isnarrow)) @@ -1094,7 +1094,7 @@ def _get_settings(self): _vfob_scram = 0 rs = RadioSetting("vfob.scrambler", "Scrambler", RadioSettingValueList(SCRAMBLER_LIST, - SCRAMBLER_LIST[_vfob_scram])) + current_index=_vfob_scram)) vfob_grp.append(rs) rs = RadioSetting("vfob.compander", "Compander", RadioSettingValueBoolean(_vfob.compander)) @@ -1104,7 +1104,7 @@ def _get_settings(self): vfob_grp.append(rs) rs = RadioSetting("step_b", "Step (kHz)", RadioSettingValueList( - STEP_LIST, STEP_LIST[_settings.step_b])) + STEP_LIST, current_index=_settings.step_b)) vfob_grp.append(rs) rs = RadioSetting("squelch_b", "Squelch", RadioSettingValueInteger( @@ -1120,10 +1120,8 @@ def _get_settings(self): rs = RadioSetting("sc_rev", "Scan Resume Mode", RadioSettingValueMap(SC_REV_MAP, _settings.sc_rev)) scn_grp.append(rs) - rs = RadioSetting("scan_group", "Scan Group", - RadioSettingValueList(SCAN_GROUP_LIST, - SCAN_GROUP_LIST[ - _settings.scan_group])) + rs = RadioSetting("scan_group", "Scan Group", RadioSettingValueList( + SCAN_GROUP_LIST, current_index=_settings.scan_group)) scn_grp.append(rs) rs = RadioSetting("grp1_lower", "Group 1 Lower", RadioSettingValueInteger(1, 999, @@ -1170,10 +1168,8 @@ def _get_settings(self): rs = RadioSetting("rpt_ptt", "PTT", RadioSettingValueBoolean(_settings.rpt_ptt)) rpt_grp.append(rs) - rs = RadioSetting("rpt_mode", "Mode", - RadioSettingValueList(RPT_MODE_LIST, - RPT_MODE_LIST[ - _settings.rpt_mode])) + rs = RadioSetting("rpt_mode", "Mode", RadioSettingValueList( + RPT_MODE_LIST, current_index=_settings.rpt_mode)) rpt_grp.append(rs) rs = RadioSetting("rpt_tone", "Tone", RadioSettingValueBoolean(_settings.rpt_tone)) diff --git a/chirp/drivers/kguv980p.py b/chirp/drivers/kguv980p.py index 94cee968..905759aa 100644 --- a/chirp/drivers/kguv980p.py +++ b/chirp/drivers/kguv980p.py @@ -1364,8 +1364,8 @@ def _get_settings(self): rs = RadioSetting("roger", "Roger Beep", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[_settings. - roger])) + current_index=_settings. + roger)) cfg1_grp.append(rs) rs = RadioSetting("beep", "Keypad Beep", @@ -1396,7 +1396,7 @@ def _get_settings(self): if self.MODEL != "KG-1000G Plus": rs = RadioSetting("toa", "Timeout Alarm (TOA)", RadioSettingValueList( - TOA_LIST, TOA_LIST[_settings.toa])) + TOA_LIST, current_index=_settings.toa)) else: rs = RadioSetting("toa", "Overtime Alarm (TOA)", RadioSettingValueMap( @@ -1412,7 +1412,7 @@ def _get_settings(self): rs = RadioSetting("ring", "Ring Time (Sec)", RadioSettingValueList( RING_LIST, - RING_LIST[_settings.ring])) + current_index=_settings.ring)) else: rs = RadioSetting("ring", "Ring Time (Sec)", RadioSettingValueMap( @@ -1422,7 +1422,7 @@ def _get_settings(self): rs = RadioSetting("dtmfsf", dtmflabel, RadioSettingValueList( dtmflist, - dtmflist[_settings.dtmfsf])) + current_index=_settings.dtmfsf)) cfg1_grp.append(rs) rs = RadioSetting("ptt_id", pttidlabel, @@ -1432,26 +1432,26 @@ def _get_settings(self): rs = RadioSetting("wt_led", "Standby / WT LED", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.wt_led])) + current_index=_settings.wt_led)) cfg1_grp.append(rs) rs = RadioSetting("tx_led", "TX LED", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.tx_led])) + current_index=_settings.tx_led)) cfg1_grp.append(rs) rs = RadioSetting("rx_led", "Rx LED", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.rx_led])) + current_index=_settings.rx_led)) cfg1_grp.append(rs) if self.MODEL == "KG-1000G Plus": rs = RadioSetting("prich_sw", "Priority Scan", RadioSettingValueList( PRI_CH_SCAN_LIST, - PRI_CH_SCAN_LIST[_settings.prich_sw])) + current_index=_settings.prich_sw)) cfg1_grp.append(rs) else: rs = RadioSetting("prich_sw", "Priority Channel Scan", @@ -1475,13 +1475,13 @@ def _get_settings(self): rs = RadioSetting("fan", fanlabel, RadioSettingValueList( FAN_MODE_LIST, - FAN_MODE_LIST[_settings.fan])) + current_index=_settings.fan)) cfg1_grp.append(rs) rs = RadioSetting("apo_time", "Auto Power-Off (Min)", RadioSettingValueList( APO_TIME_LIST, - APO_TIME_LIST[_settings.apo_time])) + current_index=_settings.apo_time)) cfg1_grp.append(rs) rs = RadioSetting("alert", alerttonelabel, @@ -1496,7 +1496,7 @@ def _get_settings(self): rs = RadioSetting("rpt_set_model", "Model (RPT-SET)", RadioSettingValueList( RPT_MODE_LIST, - RPT_MODE_LIST[_settings.rpt_set_model])) + current_index=_settings.rpt_set_model)) else: rs = RadioSetting("rpt_set_model", "Repeater Mode", RadioSettingValueMap( @@ -1515,12 +1515,12 @@ def _get_settings(self): rs = RadioSetting("dtmf_time", "DTMF Tx Duration (ms)", RadioSettingValueList( DTMF_TIMES, - DTMF_TIMES[_settings.dtmf_time])) + current_index=_settings.dtmf_time)) cfg2_grp.append(rs) rs = RadioSetting("dtmf_int", "DTMF Interval (ms)", RadioSettingValueList( DTMF_INTERVALS, - DTMF_INTERVALS[_settings.dtmf_int])) + current_index=_settings.dtmf_int)) cfg2_grp.append(rs) rs = RadioSetting("sc_qt", tonescanlabel, @@ -1557,7 +1557,7 @@ def _get_settings(self): rs = RadioSetting("hold_time_rpt", holdtimrptlabel, RadioSettingValueList( HOLD_TIMES, - HOLD_TIMES[_settings.hold_time_rpt])) + current_index=_settings.hold_time_rpt)) cfg2_grp.append(rs) rs = RadioSetting("auto_am", "Auto AM", @@ -1571,7 +1571,7 @@ def _get_settings(self): rs = RadioSetting("pf1_set", "PF1 setting", RadioSettingValueList( pf1set, - pf1set[_settings.pf1_set])) + current_index=_settings.pf1_set)) cfg2_grp.append(rs) rs = RadioSetting("settings.thr_vol_lvl", thrvollvllabel, @@ -1606,30 +1606,30 @@ def apply_psw_id(setting, obj): rs = RadioSetting("ABR", "Backlight On Time (ABR)", RadioSettingValueList( ABR_LIST, - ABR_LIST[_settings.ABR])) + current_index=_settings.ABR)) cfg2_grp.append(rs) rs = RadioSetting("KeyA", "Key A", RadioSettingValueList( key_l, - key_l[_settings.KeyA])) + current_index=_settings.KeyA)) cfg2_grp.append(rs) rs = RadioSetting("KeyB", "Key B", RadioSettingValueList( key_l, - key_l[_settings.KeyB])) + current_index=_settings.KeyB)) cfg2_grp.append(rs) rs = RadioSetting("KeyC", "Key C", RadioSettingValueList( key_l, - key_l[_settings.KeyC])) + current_index=_settings.KeyC)) cfg2_grp.append(rs) if self.MODEL == "KG-1000G Plus": rs = RadioSetting("KeyD", "Key D", RadioSettingValueList( KEY_LIST_1000GPLUS, - KEY_LIST_1000GPLUS[_settings.KeyD])) + current_index=_settings.KeyD)) cfg2_grp.append(rs) rs = RadioSetting("key_lock", "Key Lock Active", @@ -1639,12 +1639,12 @@ def apply_psw_id(setting, obj): rs = RadioSetting("act_area", "Active Area (BAND)", RadioSettingValueList( ACTIVE_AREA_LIST, - ACTIVE_AREA_LIST[_settings.act_area])) + current_index=_settings.act_area)) cfg2_grp.append(rs) rs = RadioSetting("tdr_off", "TDR", RadioSettingValueList( TDR_LIST, - TDR_LIST[_settings.tdr_off])) + current_index=_settings.tdr_off)) cfg2_grp.append(rs) # Freq Limits settings @@ -1832,7 +1832,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("vfostep_a", "Step", RadioSettingValueList( STEP_LIST, - STEP_LIST[_settings.vfostep_a])) + current_index=_settings.vfostep_a)) vfoa_grp.append(rs) # ##################### @@ -1885,7 +1885,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir1", "150M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir1])) + current_index=_settings.shft_dir1)) vfo150_grp.append(rs) rs = RadioSetting("compander1", "150M Compander", @@ -1896,7 +1896,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler1", scram1label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler1])) + current_index=_settings.scrambler1)) vfo150_grp.append(rs) rs = RadioSetting("am_mode1", "150M AM Mode", RadioSettingValueBoolean( @@ -1953,7 +1953,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir2", "450M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir2])) + current_index=_settings.shft_dir2)) vfo450_grp.append(rs) rs = RadioSetting("compander2", "450M Compander", @@ -1964,7 +1964,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler2", scram2label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler2])) + current_index=_settings.scrambler2)) vfo450_grp.append(rs) rs = RadioSetting("am_mode2", "450M AM Mode", @@ -2022,7 +2022,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir3", "20M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir3])) + current_index=_settings.shft_dir3)) vfo20_grp.append(rs) rs = RadioSetting("compander3", "20M Compander", @@ -2033,7 +2033,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler3", scram3label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler3])) + current_index=_settings.scrambler3)) vfo20_grp.append(rs) rs = RadioSetting("am_mode3", "20M AM Mode", @@ -2091,7 +2091,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir4", "50M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir4])) + current_index=_settings.shft_dir4)) vfo50_grp.append(rs) rs = RadioSetting("compander4", "50M Compander", @@ -2102,7 +2102,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler4", scram4label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler4])) + current_index=_settings.scrambler4)) vfo50_grp.append(rs) rs = RadioSetting("am_mode4", "50M AM Mode", @@ -2158,7 +2158,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir5", "350M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir5])) + current_index=_settings.shft_dir5)) vfo350_grp.append(rs) rs = RadioSetting("compander5", "350M Compander", @@ -2169,7 +2169,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler5", scram5label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler5])) + current_index=_settings.scrambler5)) vfo350_grp.append(rs) rs = RadioSetting("am_mode5", "350M AM Mode", @@ -2225,7 +2225,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir6", "850M Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir6])) + current_index=_settings.shft_dir6)) vfo850_grp.append(rs) rs = RadioSetting("compander6", "850M Compander", @@ -2236,7 +2236,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler6", scram6label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler6])) + current_index=_settings.scrambler6)) vfo850_grp.append(rs) rs = RadioSetting("am_mode6", "850M AM Mode", @@ -2301,7 +2301,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("shft_dir7", "Shift Direction", RadioSettingValueList( DUPLEX_LIST, - DUPLEX_LIST[_settings.shft_dir7])) + current_index=_settings.shft_dir7)) vfob_grp.append(rs) rs = RadioSetting("compander7", "Compander", RadioSettingValueBoolean( @@ -2311,7 +2311,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("scrambler7", scram7label, RadioSettingValueList( SCRAMBLER_LIST, - SCRAMBLER_LIST[_settings.scrambler7])) + current_index=_settings.scrambler7)) vfob_grp.append(rs) rs = RadioSetting("vfosquelch_b", "Squelch", @@ -2321,7 +2321,7 @@ def apply_psw_id(setting, obj): rs = RadioSetting("vfostep_b", "Step", RadioSettingValueList( STEP_LIST, - STEP_LIST[_settings.vfostep_b])) + current_index=_settings.vfostep_b)) vfob_grp.append(rs) # Scan Group Settings @@ -2334,12 +2334,12 @@ def _decode(lst): rs = RadioSetting("scan_a_act", "Scan A Active Group", RadioSettingValueList( SCAN_GROUP_LIST, - SCAN_GROUP_LIST[_settings.scan_a_act])) + current_index=_settings.scan_a_act)) scan_grp.append(rs) rs = RadioSetting("scan_b_act", "Scan B Active Group", RadioSettingValueList( SCAN_GROUP_LIST, - SCAN_GROUP_LIST[_settings.scan_b_act])) + current_index=_settings.scan_b_act)) scan_grp.append(rs) for i in range(1, 11): @@ -2386,7 +2386,7 @@ def _decode(lst): rs = RadioSetting("rc_power", "RC Power", RadioSettingValueList( RC_POWER_LIST, - RC_POWER_LIST[_settings.rc_power])) + current_index=_settings.rc_power)) remote_grp.append(rs) def decode_remote_vals(self, setting): diff --git a/chirp/drivers/kguv9dplus.py b/chirp/drivers/kguv9dplus.py index 4b75ae92..4b29bbc8 100644 --- a/chirp/drivers/kguv9dplus.py +++ b/chirp/drivers/kguv9dplus.py @@ -1652,27 +1652,27 @@ def _core_tab(self): RadioSetting("s_mute", "SubFreq Mute (Menu 60)", RadioSettingValueList(S_MUTE_LIST, - S_MUTE_LIST[s.s_mute]))) + current_index=s.s_mute))) cf.append( RadioSetting("tot", "Transmit timeout Timer (Menu 10)", RadioSettingValueList(TIMEOUT_LIST, - TIMEOUT_LIST[s.tot]))) + current_index=s.tot))) cf.append( RadioSetting("toa", "Transmit Timeout Alarm (Menu 11)", RadioSettingValueList(TOA_LIST, - TOA_LIST[s.toa]))) + current_index=s.toa))) cf.append( RadioSetting("ptt_id", "PTT Caller ID mode (Menu 23)", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[s.ptt_id]))) + current_index=s.ptt_id))) cf.append( RadioSetting("id_dly", "Caller ID Delay time (Menu 25)", RadioSettingValueList(ID_DLY_LIST, - ID_DLY_LIST[s.id_dly]))) + current_index=s.id_dly))) cf.append(RadioSetting("voice_sw", "Voice Guide (Menu 12)", RadioSettingValueBoolean(s.voice_sw))) @@ -1683,18 +1683,18 @@ def _core_tab(self): RadioSetting("s_tone", "Side Tone (Menu 36)", RadioSettingValueList(S_TONES, - S_TONES[s.s_tone]))) + current_index=s.s_tone))) cf.append( RadioSetting("ring_time", "Ring Time (Menu 26)", RadioSettingValueList( LIST_OFF_10, - LIST_OFF_10[s.ring_time]))) + current_index=s.ring_time))) cf.append( RadioSetting("roger", "Roger Beep (Menu 9)", RadioSettingValueList(ROGER_LIST, - ROGER_LIST[s.roger]))) + current_index=s.roger))) cf.append(RadioSetting("blcdsw", "Backlight (Menu 41)", RadioSettingValueBoolean(s.blcdsw))) @@ -1702,7 +1702,7 @@ def _core_tab(self): RadioSetting("abr", "Auto Backlight Time (Menu 1)", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[s.abr]))) + current_index=s.abr))) cf.append( RadioSetting("abr_lvl", "Backlight Brightness (Menu 27)", @@ -1716,7 +1716,7 @@ def _core_tab(self): RadioSetting("lock_m", "Keypad Lock Mode (Menu 35)", RadioSettingValueList(LOCK_MODES, - LOCK_MODES[s.lock_m]))) + current_index=s.lock_m))) cf.append(RadioSetting("auto_lk", "Keypad Autolock (Menu 34)", RadioSettingValueBoolean(s.auto_lk))) @@ -1731,27 +1731,27 @@ def _core_tab(self): RadioSetting("dtmf_st", "DTMF Sidetone (Menu 22)", RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[s.dtmf_st]))) + current_index=s.dtmf_st))) cf.append(RadioSetting("sc_qt", "Scan QT Save Mode (Menu 38)", RadioSettingValueList( SCQT_LIST, - SCQT_LIST[s.sc_qt]))) + current_index=s.sc_qt))) cf.append( RadioSetting("apo_tmr", "Automatic Power-off (Menu 39)", RadioSettingValueList(APO_TIMES, - APO_TIMES[s.apo_tmr]))) + current_index=s.apo_tmr))) cf.append( # VOX "guard" is really VOX trigger audio level RadioSetting("vox_grd", "VOX level (Menu 7)", RadioSettingValueList(VOX_GRDS, - VOX_GRDS[s.vox_grd]))) + current_index=s.vox_grd))) cf.append( RadioSetting("vox_dly", "VOX Delay (Menu 37)", RadioSettingValueList(VOX_DLYS, - VOX_DLYS[s.vox_dly]))) + current_index=s.vox_dly))) cf.append(RadioSetting("bledsw", "Receive LED (Menu 42)", RadioSettingValueBoolean(s.bledsw))) @@ -1761,8 +1761,7 @@ def _core_tab(self): "Screen Mode (Menu 62)", RadioSettingValueList( SCREEN_MODE_LIST, - SCREEN_MODE_LIST[ - sm.screen_mode]))) + current_index=sm.screen_mode))) if (self.MODEL == "KG-UV9PX" or self.MODEL == "KG-UV9GX"): langlst = LANGUAGE_LIST2 else: @@ -1771,7 +1770,7 @@ def _core_tab(self): RadioSetting("lang", "Menu Language (Menu 14)", RadioSettingValueList(langlst, - langlst[s.lang]))) + current_index=s.lang))) if (self.MODEL == "KG-UV9PX" or self.MODEL == "KG-UV9GX"): ponmsglst = PONMSG_LIST2 @@ -1780,7 +1779,7 @@ def _core_tab(self): cf.append(RadioSetting("ponmsg", "Poweron message (Menu 40)", RadioSettingValueList( - ponmsglst, ponmsglst[s.ponmsg]))) + ponmsglst, current_index=s.ponmsg))) return cf def _repeater_tab(self): @@ -1794,7 +1793,7 @@ def _repeater_tab(self): "Radio Mode (Menu 43)", RadioSettingValueList( RPTMODE_LIST, - RPTMODE_LIST[s.type_set]))) + current_index=s.type_set))) cf.append(RadioSetting("rpt_ptt", "Repeater PTT (Menu 45)", RadioSettingValueBoolean(s.rpt_ptt))) @@ -1805,7 +1804,7 @@ def _repeater_tab(self): RadioSetting("rpt_kpt", "Repeater Hold Time (Menu 46)", RadioSettingValueList(RPT_KPTS, - RPT_KPTS[s.rpt_kpt]))) + current_index=s.rpt_kpt))) cf.append(RadioSetting("rpt_rct", "Repeater Receipt Tone (Menu 47)", RadioSettingValueBoolean(s.rpt_rct))) @@ -1868,7 +1867,7 @@ def apply_sleep(setting, obj): RadioSetting("dtmf_tx", "DTMF Tx Duration", RadioSettingValueList(DTMF_TIMES, - DTMF_TIMES[s.dtmf_tx]))) + current_index=s.dtmf_tx))) cid = self._memobj.my_callid my_callid = RadioSettingValueString(3, 6, self.callid2str(cid.code), False) @@ -1887,7 +1886,7 @@ def apply_sleep(setting, obj): RadioSetting("settings.save_m", "Save Mode (Menu 2)", RadioSettingValueList(SAVE_MODES, - SAVE_MODES[s.save_m]))) + current_index=s.save_m))) for i in range(0, 4): sm = self._memobj.save[i] wake = RadioSettingValueInteger(0, 18000, sm.wake * 10, 1) @@ -1917,13 +1916,13 @@ def apply_sleep(setting, obj): val = RadioSettingValueList( TDR_LIST, - TDR_LIST[s.tdr]) + current_index=s.tdr) val.set_mutable(True) cf.append(RadioSetting("tdr", "TDR", val)) val = RadioSettingValueList( ACTIVE_AREA_LIST, - ACTIVE_AREA_LIST[s.act_area]) + current_index=s.act_area) val.set_mutable(True) cf.append(RadioSetting("act_area", "Active Receiver(BAND)", val)) @@ -2098,14 +2097,14 @@ def apply_dec(setting, obj): bf.append(RadioSetting(prefix + ".qt", "Mute Mode (Menu 21)", RadioSettingValueList(SPMUTE_LIST, - SPMUTE_LIST[c.qt]))) + current_index=c.qt))) bf.append(RadioSetting(prefix + ".scan", "Scan this (Menu 48)", RadioSettingValueBoolean(c.scan))) bf.append(RadioSetting(prefix + ".pwr", "Power (Menu 5)", RadioSettingValueList( - POWER_LIST, POWER_LIST[c.pwr]))) + POWER_LIST, current_index=c.pwr))) bf.append(RadioSetting(prefix + ".mod", "AM Modulation (Menu 54)", RadioSettingValueBoolean(c.mod))) @@ -2113,12 +2112,12 @@ def apply_dec(setting, obj): "FM Deviation (Menu 4)", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[c.fm_dev]))) + current_index=c.fm_dev))) bf.append( RadioSetting(prefix + ".shift", "Frequency Shift (Menu 6)", RadioSettingValueList(OFFSET_LIST, - OFFSET_LIST[c.shift]))) + current_index=c.shift))) return bf def _area_tab(self, area): @@ -2154,7 +2153,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Workmode", RadioSettingValueList( WORKMODE_LIST, - WORKMODE_LIST[c.w_mode]))) + current_index=c.w_mode))) af.append(RadioSetting(prefix + ".w_chan", "Channel", RadioSettingValueInteger(1, 999, @@ -2164,7 +2163,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Scan Group (Menu 49)", RadioSettingValueList( SCANGRP_LIST, - SCANGRP_LIST[c.scan_grp]))) + current_index=c.scan_grp))) af.append(RadioSetting(prefix + ".bcl", "Busy Channel Lock-out (Menu 15)", RadioSettingValueBoolean(c.bcl))) @@ -2172,12 +2171,12 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): RadioSetting(prefix + ".sql", "Squelch Level (Menu 8)", RadioSettingValueList(LIST_0_9, - LIST_0_9[c.sql]))) + current_index=c.sql))) af.append( RadioSetting(prefix + ".cset", "Call ID Group (Menu 52)", RadioSettingValueList(LIST_1_20, - LIST_1_20[c.cset]))) + current_index=c.cset))) af.append( RadioSetting(prefix + ".step", "Frequency Step (Menu 3)", @@ -2188,13 +2187,13 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Scan Mode (Menu 20)", RadioSettingValueList( SCANMODE_LIST, - SCANMODE_LIST[c.scan_mode]))) + current_index=c.scan_mode))) af.append( RadioSetting(prefix + ".scan_range", "Scan Range (Menu 50)", RadioSettingValueList( SCANRANGE_LIST, - SCANRANGE_LIST[c.scan_range]))) + current_index=c.scan_range))) st = RadioSettingValueString(0, 15, short2freq(scan_rng.scan_st)) rs = RadioSetting("settings.%s.scan_st" % area, @@ -2238,18 +2237,18 @@ def _key_tab(self): "PF1 Key function (Menu 55)", RadioSettingValueList( pfkey1, - pfkey1[s.pf1]))) + current_index=s.pf1))) kf.append(RadioSetting("settings.pf2", "PF2 Key function (Menu 56)", RadioSettingValueList( pfkey2, - pfkey2[s.pf2]))) + current_index=s.pf2))) kf.append(RadioSetting("settings.pf3", "PF3 Key function (Menu 57)", RadioSettingValueList( pfkey3, - pfkey3[s.pf3]))) + current_index=s.pf3))) return kf def _fl_tab(self): @@ -2607,7 +2606,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Workmode", RadioSettingValueList( WORKMODE_LIST, - WORKMODE_LIST[c.w_mode]))) + current_index=c.w_mode))) af.append(RadioSetting(prefix + ".w_chan", "Channel", RadioSettingValueInteger(1, 999, @@ -2617,7 +2616,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Scan Group (Menu 49)", RadioSettingValueList( SCANGRP_LIST, - SCANGRP_LIST[c.scan_grp]))) + current_index=c.scan_grp))) af.append(RadioSetting(prefix + ".bcl", "Busy Channel Lock-out (Menu 15)", RadioSettingValueBoolean(c.bcl))) @@ -2625,12 +2624,12 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): RadioSetting(prefix + ".sql", "Squelch Level (Menu 8)", RadioSettingValueList(LIST_0_9, - LIST_0_9[c.sql]))) + current_index=c.sql))) af.append( RadioSetting(prefix + ".cset", "Call ID Group (Menu 52)", RadioSettingValueList(LIST_1_20, - LIST_1_20[c.cset]))) + current_index=c.cset))) af.append( RadioSetting(prefix + ".step", "Frequency Step (Menu 3)", @@ -2641,13 +2640,13 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): "Scan Mode (Menu 20)", RadioSettingValueList( SCANMODE_LIST, - SCANMODE_LIST[c.scan_mode]))) + current_index=c.scan_mode))) af.append( RadioSetting(prefix + ".scan_range", "Scan Range (Menu 50)", RadioSettingValueList( SCANRANGE_LIST, - SCANRANGE_LIST[c.scan_range]))) + current_index=c.scan_range))) st = RadioSettingValueString(0, 15, short2freq(scan_rng.scan_st)) rs = RadioSetting("settings.%s.scan_st" % area, @@ -2746,14 +2745,14 @@ def apply_dec(setting, obj): bf.append(RadioSetting(prefix + ".qt", "Mute Mode (Menu 21)", RadioSettingValueList(SPMUTE_LIST, - SPMUTE_LIST[c.qt]))) + current_index=c.qt))) bf.append(RadioSetting(prefix + ".scan", "Scan this (Menu 48)", RadioSettingValueBoolean(c.scan))) bf.append(RadioSetting(prefix + ".pwr", "Power (Menu 5)", RadioSettingValueList( - POWER_LIST, POWER_LIST[c.pwr]))) + POWER_LIST, current_index=c.pwr))) bf.append(RadioSetting(prefix + ".mod", "AM Modulation (Menu 54)", RadioSettingValueBoolean(c.mod))) @@ -2761,12 +2760,12 @@ def apply_dec(setting, obj): "FM Deviation (Menu 4)", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[c.fm_dev]))) + current_index=c.fm_dev))) bf.append( RadioSetting(prefix + ".shift", "Frequency Shift (Menu 6)", RadioSettingValueList(OFFSET_LIST, - OFFSET_LIST[c.shift]))) + current_index=c.shift))) return bf def _fl_tab(self): diff --git a/chirp/drivers/ksun_m6.py b/chirp/drivers/ksun_m6.py index a2e3a342..378b16dc 100644 --- a/chirp/drivers/ksun_m6.py +++ b/chirp/drivers/ksun_m6.py @@ -283,34 +283,34 @@ def get_settings(self): top = RadioSettings(basic) voice = settings.voice - rsv = RadioSettingValueList(VOICE_LIST, VOICE_LIST[voice]) + rsv = RadioSettingValueList(VOICE_LIST, current_index=voice) rs = RadioSetting("voice", "Voice language", rsv) basic.append(rs) led = settings.led - rsv = RadioSettingValueList(LED_LIST, LED_LIST[led]) + rsv = RadioSettingValueList(LED_LIST, current_index=led) rs = RadioSetting("led", "LED brightness", rsv) basic.append(rs) led_timeout = settings.led_timeout rsv = RadioSettingValueList(LED_TIMEOUT_LIST, - LED_TIMEOUT_LIST[led_timeout]) + current_index=led_timeout) rs = RadioSetting("led_timeout", "LED timeout", rsv) basic.append(rs) lock_timeout = settings.lock_timeout rsv = RadioSettingValueList(LOCK_TIMEOUT_LIST, - LOCK_TIMEOUT_LIST[lock_timeout]) + current_index=lock_timeout) rs = RadioSetting("lock_timeout", "Key Lock timeout", rsv) basic.append(rs) tot = settings.tot - rsv = RadioSettingValueList(TOT_LIST, TOT_LIST[tot]) + rsv = RadioSettingValueList(TOT_LIST, current_index=tot) rs = RadioSetting("tot", "Time-Out Timer", rsv) basic.append(rs) bat_save = settings.bat_save - rsv = RadioSettingValueList(BAT_SAVE_LIST, BAT_SAVE_LIST[bat_save]) + rsv = RadioSettingValueList(BAT_SAVE_LIST, current_index=bat_save) rs = RadioSetting("bat_save", "Battery Save", rsv) basic.append(rs) @@ -414,7 +414,7 @@ def get_memory(self, number): mem.extra.append(rs) scrambler = False if mem.empty else _mem.scrambler - rsv = RadioSettingValueList(SCRAMBLER_LIST, SCRAMBLER_LIST[scrambler]) + rsv = RadioSettingValueList(SCRAMBLER_LIST, current_index=scrambler) rs = RadioSetting("scrambler", _("Scrambler"), rsv) mem.extra.append(rs) diff --git a/chirp/drivers/kyd.py b/chirp/drivers/kyd.py index a96bede9..8dd4e8be 100644 --- a/chirp/drivers/kyd.py +++ b/chirp/drivers/kyd.py @@ -340,7 +340,7 @@ def get_memory(self, number): rs = RadioSetting("bcl", "Busy Channel Lockout", RadioSettingValueList( - BCL_LIST, BCL_LIST[_mem.bcl])) + BCL_LIST, current_index=_mem.bcl)) mem.extra.append(rs) return mem @@ -434,23 +434,23 @@ def get_settings(self): rs = RadioSetting("tot", "Time-out timer", RadioSettingValueList( TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot])) + current_index=_settings.tot)) basic.append(rs) rs = RadioSetting("totalert", "TOT Pre-alert", RadioSettingValueList( TOTALERT_LIST, - TOTALERT_LIST[_settings.totalert])) + current_index=_settings.totalert)) basic.append(rs) rs = RadioSetting("vox", "VOX Gain", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.vox])) + VOX_LIST, current_index=_settings.vox)) basic.append(rs) rs = RadioSetting("voice", "Voice Annumciation", RadioSettingValueList( - VOICE_LIST, VOICE_LIST[_settings.voice])) + VOICE_LIST, current_index=_settings.voice)) basic.append(rs) rs = RadioSetting("squelch", "Squelch Level", @@ -460,7 +460,7 @@ def get_settings(self): rs = RadioSetting("voxdelay", "VOX Delay", RadioSettingValueList( VOXDELAY_LIST, - VOXDELAY_LIST[_settings.voxdelay])) + current_index=_settings.voxdelay)) basic.append(rs) rs = RadioSetting("beep", "Beep", diff --git a/chirp/drivers/kyd_IP620.py b/chirp/drivers/kyd_IP620.py index 47d08aab..f98ddc37 100644 --- a/chirp/drivers/kyd_IP620.py +++ b/chirp/drivers/kyd_IP620.py @@ -401,17 +401,17 @@ def _is_empty(): mem.extra = RadioSettingGroup("Extra", "extra") rs = RadioSetting("lout", "Lock out", RadioSettingValueList(OFF_ON_LIST, - OFF_ON_LIST[_mem.lout])) + current_index=_mem.lout)) mem.extra.append(rs) rs = RadioSetting("busy_loc", "Busy lock", RadioSettingValueList(BUSYLOCK_LIST, - BUSYLOCK_LIST[_mem.busy_loc])) + current_index=_mem.busy_loc)) mem.extra.append(rs) rs = RadioSetting("scan_add", "Scan add", RadioSettingValueList(NO_YES_LIST, - NO_YES_LIST[_mem.scan_add])) + current_index=_mem.scan_add)) mem.extra.append(rs) # TODO: Show name channel # count = 0 @@ -500,92 +500,92 @@ def get_settings(self): rs = RadioSetting("rf_sql", "Squelch level (SQL)", RadioSettingValueList(RFSQL_LIST, - RFSQL_LIST[_settings.rf_sql])) + current_index=_settings.rf_sql)) basic.append(rs) rs = RadioSetting("step_freq", "Step frequency kHz (STP)", RadioSettingValueList(STEP_LIST, - STEP_LIST[_settings.step_freq])) + current_index=_settings.step_freq)) basic.append(rs) rs = RadioSetting("fm_radio", "FM radio (DW)", RadioSettingValueList(OFF_ON_LIST, - OFF_ON_LIST[_settings_misc.fm_radio])) + current_index=_settings_misc.fm_radio)) basic.append(rs) rs = RadioSetting("call_tone", "Call tone (CK)", RadioSettingValueList(CALLTONE_LIST, - CALLTONE_LIST[_settings.call_tone])) + current_index=_settings.call_tone)) basic.append(rs) rs = RadioSetting("tot", "Time-out timer (TOT)", RadioSettingValueList(TIMEOUT_LIST, - TIMEOUT_LIST[_settings.tot])) + current_index=_settings.tot)) basic.append(rs) rs = RadioSetting("chan_disp_way", "Channel display way", RadioSettingValueList(CH_FLAG_LIST, - CH_FLAG_LIST[_settings.chan_disp_way])) + current_index=_settings.chan_disp_way)) basic.append(rs) rs = RadioSetting("vox", "VOX Gain (VOX)", RadioSettingValueList(VOX_LIST, - VOX_LIST[_settings.vox])) + current_index=_settings.vox)) basic.append(rs) rs = RadioSetting("vox_dly", "VOX Delay", RadioSettingValueList(VOXDELAY_LIST, - VOXDELAY_LIST[_settings.vox_dly])) + current_index=_settings.vox_dly)) basic.append(rs) rs = RadioSetting("beep", "Beep (BP)", RadioSettingValueList(OFF_ON_LIST, - OFF_ON_LIST[_settings.beep])) + current_index=_settings.beep)) basic.append(rs) rs = RadioSetting("auto_lock", "Auto lock (KY)", RadioSettingValueList(NO_YES_LIST, - NO_YES_LIST[_settings_misc.auto_lock])) + current_index=_settings_misc.auto_lock)) basic.append(rs) rs = RadioSetting("bat_save", "Battery Saver (SAV)", RadioSettingValueList(BAT_SAVE_LIST, - BAT_SAVE_LIST[_settings.bat_save])) + current_index=_settings.bat_save)) basic.append(rs) rs = RadioSetting("chan_pri", "Channel PRI (PRI)", RadioSettingValueList(OFF_ON_LIST, - OFF_ON_LIST[_settings.chan_pri])) + current_index=_settings.chan_pri)) basic.append(rs) rs = RadioSetting("chan_pri_num", "Channel PRI time Sec (PRI)", RadioSettingValueList(PRI_NUM_LIST, - PRI_NUM_LIST[_settings.chan_pri_num])) + current_index=_settings.chan_pri_num)) basic.append(rs) rs = RadioSetting("end_beep", "End beep (ET)", RadioSettingValueList(ENDBEEP_LIST, - ENDBEEP_LIST[_settings.end_beep])) + current_index=_settings.end_beep)) basic.append(rs) rs = RadioSetting("ch_mode", "CH mode", RadioSettingValueList(ON_OFF_LIST, - ON_OFF_LIST[_settings.ch_mode])) + current_index=_settings.ch_mode)) basic.append(rs) rs = RadioSetting("scan_rev", "Scan rev (SCAN)", RadioSettingValueList(SCANM_LIST, - SCANM_LIST[_settings.scan_rev])) + current_index=_settings.scan_rev)) basic.append(rs) rs = RadioSetting("enc", "Frequency lock (ENC)", RadioSettingValueList(OFF_ON_LIST, - OFF_ON_LIST[_settings.enc])) + current_index=_settings.enc)) basic.append(rs) rs = RadioSetting("wait_back_light", "Wait back light (LED)", RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.wait_back_light])) + current_index=_settings.wait_back_light)) basic.append(rs) return top diff --git a/chirp/drivers/leixen.py b/chirp/drivers/leixen.py index c204e3e2..6d0bd258 100644 --- a/chirp/drivers/leixen.py +++ b/chirp/drivers/leixen.py @@ -527,49 +527,49 @@ def get_memory(self, number): opts = ["On", "Off"] rs = RadioSetting("blckoff", "Busy Channel Lockout", RadioSettingValueList( - opts, opts[_mem.blckoff])) + opts, current_index=_mem.blckoff)) mem.extra.append(rs) opts = ["Off", "On"] rs = RadioSetting("tailcut", "Squelch Tail Elimination", RadioSettingValueList( - opts, opts[_mem.tailcut])) + opts, current_index=_mem.tailcut)) mem.extra.append(rs) apro = _mem.apro if _mem.apro < 0x5 else 0 opts = ["Off", "Compander", "Scrambler", "TX Scrambler", "RX Scrambler"] rs = RadioSetting("apro", "Audio Processing", RadioSettingValueList( - opts, opts[apro])) + opts, current_index=apro)) mem.extra.append(rs) opts = ["On", "Off"] rs = RadioSetting("voxoff", "VOX", RadioSettingValueList( - opts, opts[_mem.voxoff])) + opts, current_index=_mem.voxoff)) mem.extra.append(rs) opts = ["On", "Off"] rs = RadioSetting("pttidoff", "PTT ID", RadioSettingValueList( - opts, opts[_mem.pttidoff])) + opts, current_index=_mem.pttidoff)) mem.extra.append(rs) opts = ["On", "Off"] rs = RadioSetting("dtmfoff", "DTMF", RadioSettingValueList( - opts, opts[_mem.dtmfoff])) + opts, current_index=_mem.dtmfoff)) mem.extra.append(rs) opts = ["Name", "Frequency"] aliasop = RadioSetting("aliasop", "Display", RadioSettingValueList( - opts, opts[_mem.aliasop])) + opts, current_index=_mem.aliasop)) mem.extra.append(aliasop) opts = ["On", "Off"] rs = RadioSetting("reverseoff", "Reverse Frequency", RadioSettingValueList( - opts, opts[_mem.reverseoff])) + opts, current_index=_mem.reverseoff)) mem.extra.append(rs) opts = ["On", "Off"] rs = RadioSetting("talkaroundoff", "Talk Around", RadioSettingValueList( - opts, opts[_mem.talkaroundoff])) + opts, current_index=_mem.talkaroundoff)) mem.extra.append(rs) return mem @@ -649,43 +649,43 @@ def _get_settings(self): # rs = RadioSetting("apo", "Auto Power Off", RadioSettingValueList( - APO_LIST, APO_LIST[_settings.apo])) + APO_LIST, current_index=_settings.apo)) cfg_grp.append(rs) rs = RadioSetting("sql", "Squelch Level", RadioSettingValueList( - SQL_LIST, SQL_LIST[_settings.sql])) + SQL_LIST, current_index=_settings.sql)) cfg_grp.append(rs) rs = RadioSetting("scanm", "Scan Mode", RadioSettingValueList( - SCANM_LIST, SCANM_LIST[_settings.scanm])) + SCANM_LIST, current_index=_settings.scanm)) cfg_grp.append(rs) rs = RadioSetting("tot", "Time Out Timer", RadioSettingValueList( - TOT_LIST, TOT_LIST[_settings.tot])) + TOT_LIST, current_index=_settings.tot)) cfg_grp.append(rs) rs = RadioSetting("step", "Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[_settings.step])) + STEP_LIST, current_index=_settings.step)) cfg_grp.append(rs) rs = RadioSetting("monitor", "Monitor", RadioSettingValueList( - MONITOR_LIST, MONITOR_LIST[_settings.monitor])) + MONITOR_LIST, current_index=_settings.monitor)) cfg_grp.append(rs) rs = RadioSetting("vfomr", "VFO/MR", RadioSettingValueList( - VFOMR_LIST, VFOMR_LIST[_settings.vfomr])) + VFOMR_LIST, current_index=_settings.vfomr)) cfg_grp.append(rs) rs = RadioSetting("mrcha", "MR/CHA", RadioSettingValueList( - MRCHA_LIST, MRCHA_LIST[_settings.mrcha])) + MRCHA_LIST, current_index=_settings.mrcha)) cfg_grp.append(rs) rs = RadioSetting("vol", "Volume", RadioSettingValueList( - VOL_LIST, VOL_LIST[_settings.vol])) + VOL_LIST, current_index=_settings.vol)) cfg_grp.append(rs) rs = RadioSetting("opendis", "Open Display", RadioSettingValueList( - OPENDIS_LIST, OPENDIS_LIST[_settings.opendis])) + OPENDIS_LIST, current_index=_settings.opendis)) cfg_grp.append(rs) def _filter(name): @@ -712,16 +712,16 @@ def _filter(name): rs = RadioSetting("lamp", "Backlight", RadioSettingValueList( - LAMP_LIST, LAMP_LIST[_settings.lamp])) + LAMP_LIST, current_index=_settings.lamp)) cfg_grp.append(rs) rs = RadioSetting("keylockm", "Key Lock Mode", RadioSettingValueList( KEYLOCKM_LIST, - KEYLOCKM_LIST[_settings.keylockm])) + current_index=_settings.keylockm)) cfg_grp.append(rs) rs = RadioSetting("absel", "A/B Select", RadioSettingValueList(ABSEL_LIST, - ABSEL_LIST[_settings.absel])) + current_index=_settings.absel)) cfg_grp.append(rs) rs = RadioSetting("obeep", "Open Beep", @@ -776,11 +776,11 @@ def _filter(name): cfg_grp.append(rs) rs = RadioSetting("voxgain", "VOX Gain", RadioSettingValueList( - VOXGAIN_LIST, VOXGAIN_LIST[_settings.voxgain])) + VOXGAIN_LIST, current_index=_settings.voxgain)) cfg_grp.append(rs) rs = RadioSetting("voxdt", "VOX Delay Time", RadioSettingValueList( - VOXDT_LIST, VOXDT_LIST[_settings.voxdt])) + VOXDT_LIST, current_index=_settings.voxdt)) cfg_grp.append(rs) rs = RadioSetting("vir", "VOX Inhibit on Receive", RadioSettingValueBoolean(_settings.vir)) @@ -792,27 +792,27 @@ def _filter(name): val = (_settings.dtmftime) - 5 rs = RadioSetting("dtmftime", "DTMF Digit Time", RadioSettingValueList( - DTMFTIME_LIST, DTMFTIME_LIST[val])) + DTMFTIME_LIST, current_index=val)) adv_grp.append(rs) val = (_settings.dtmfspace) - 5 rs = RadioSetting("dtmfspace", "DTMF Digit Space Time", RadioSettingValueList( - DTMFTIME_LIST, DTMFTIME_LIST[val])) + DTMFTIME_LIST, current_index=val)) adv_grp.append(rs) val = (_settings.dtmfdelay) // 5 rs = RadioSetting("dtmfdelay", "DTMF 1st Digit Delay", RadioSettingValueList( - DTMFDELAY_LIST, DTMFDELAY_LIST[val])) + DTMFDELAY_LIST, current_index=val)) adv_grp.append(rs) val = (_settings.dtmfpretime) // 10 - 1 rs = RadioSetting("dtmfpretime", "DTMF Pretime", RadioSettingValueList( - DTMFPRETIME_LIST, DTMFPRETIME_LIST[val])) + DTMFPRETIME_LIST, current_index=val)) adv_grp.append(rs) val = (_settings.dtmfdelay2) // 5 rs = RadioSetting("dtmfdelay2", "DTMF * and # Digit Delay", RadioSettingValueList( - DTMFDELAY2_LIST, DTMFDELAY2_LIST[val])) + DTMFDELAY2_LIST, current_index=val)) adv_grp.append(rs) rs = RadioSetting("ackdecode", "ACK Decode", RadioSettingValueBoolean(_settings.ackdecode)) @@ -834,41 +834,41 @@ def _filter(name): val = (_settings.lptime) - 5 rs = RadioSetting("lptime", "Long Press Time", RadioSettingValueList( - LPTIME_LIST, LPTIME_LIST[val])) + LPTIME_LIST, current_index=val)) key_grp.append(rs) rs = RadioSetting("keyp1long", "P1 Long Key", RadioSettingValueList( PFKEYLONG_LIST, - PFKEYLONG_LIST[_settings.keyp1long])) + current_index=_settings.keyp1long)) key_grp.append(rs) rs = RadioSetting("keyp1short", "P1 Short Key", RadioSettingValueList( PFKEYSHORT_LIST, - PFKEYSHORT_LIST[_settings.keyp1short])) + current_index=_settings.keyp1short)) key_grp.append(rs) rs = RadioSetting("keyp2long", "P2 Long Key", RadioSettingValueList( PFKEYLONG_LIST, - PFKEYLONG_LIST[_settings.keyp2long])) + current_index=_settings.keyp2long)) key_grp.append(rs) rs = RadioSetting("keyp2short", "P2 Short Key", RadioSettingValueList( PFKEYSHORT_LIST, - PFKEYSHORT_LIST[_settings.keyp2short])) + current_index=_settings.keyp2short)) key_grp.append(rs) rs = RadioSetting("keyp3long", "P3 Long Key", RadioSettingValueList( PFKEYLONG_LIST, - PFKEYLONG_LIST[_settings.keyp3long])) + current_index=_settings.keyp3long)) key_grp.append(rs) rs = RadioSetting("keyp3short", "P3 Short Key", RadioSettingValueList( PFKEYSHORT_LIST, - PFKEYSHORT_LIST[_settings.keyp3short])) + current_index=_settings.keyp3short)) key_grp.append(rs) val = RadioSettingValueList(PFKEYSHORT_LIST, - PFKEYSHORT_LIST[_settings.keymshort]) + current_index=_settings.keymshort) val.set_mutable(_settings.menuen == 0) rs = RadioSetting("keymshort", "M Short Key", val) key_grp.append(rs) diff --git a/chirp/drivers/lt725uv.py b/chirp/drivers/lt725uv.py index 8d6bac21..0b2219a2 100644 --- a/chirp/drivers/lt725uv.py +++ b/chirp/drivers/lt725uv.py @@ -670,7 +670,7 @@ def get_memory(self, number): val = _mem.recvmode recvmode = RadioSetting("recvmode", "Receiving mode", RadioSettingValueList(LIST_RECVMODE, - LIST_RECVMODE[val])) + current_index=val)) mem.extra.append(recvmode) if _mem.botsignal == 0xFF: @@ -679,7 +679,7 @@ def get_memory(self, number): val = _mem.botsignal botsignal = RadioSetting("botsignal", "Launch signaling", RadioSettingValueList(LIST_SIGNAL, - LIST_SIGNAL[val])) + current_index=val)) mem.extra.append(botsignal) if _mem.eotsignal == 0xFF: @@ -687,7 +687,7 @@ def get_memory(self, number): else: val = _mem.eotsignal - rx = RadioSettingValueList(LIST_SIGNAL, LIST_SIGNAL[val]) + rx = RadioSettingValueList(LIST_SIGNAL, current_index=val) eotsignal = RadioSetting("eotsignal", "Transmit end signaling", rx) mem.extra.append(eotsignal) @@ -804,10 +804,10 @@ def get_settings(self): group = RadioSettings(basic, a_band, b_band, lims, codes) # Basic Settings - bnd_mode = RadioSetting("settings.init_bank", "TDR Band Default", - RadioSettingValueList(LIST_TDR_DEF, - LIST_TDR_DEF[ - _sets.init_bank])) + bnd_mode = RadioSetting( + "settings.init_bank", "TDR Band Default", + RadioSettingValueList( + LIST_TDR_DEF, current_index=_sets.init_bank)) basic.append(bnd_mode) # BJ-318 set by vfo, skip @@ -819,14 +819,14 @@ def get_settings(self): # BJ-318 set by vfo, skip if self.MODEL != "BJ-318": vala = _vfoa.bpower # 2bits values 0,1,2= Low, Mid, High - rx = RadioSettingValueList(LIST_BPOWER, LIST_BPOWER[vala]) + rx = RadioSettingValueList(LIST_BPOWER, current_index=vala) powera = RadioSetting("upper.vfoa.bpower", "Power (Upper)", rx) basic.append(powera) # BJ-318 set by vfo, skip if self.MODEL != "BJ-318": valb = _vfob.bpower - rx = RadioSettingValueList(LIST_BPOWER, LIST_BPOWER[valb]) + rx = RadioSettingValueList(LIST_BPOWER, current_index=valb) powerb = RadioSetting("lower.vfob.bpower", "Power (Lower)", rx) basic.append(powerb) @@ -939,27 +939,27 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # not used in BJ-318, skip if self.MODEL != "BJ-318": rs = RadioSettingValueList(LIST_COLOR, - LIST_COLOR[_sets.wtled]) + current_index=_sets.wtled) wtled = RadioSetting("settings.wtled", "Standby LED Color", rs) basic.append(wtled) # not used in BJ-318, skip if self.MODEL != "BJ-318": rs = RadioSettingValueList(LIST_COLOR, - LIST_COLOR[_sets.rxled]) + current_index=_sets.rxled) rxled = RadioSetting("settings.rxled", "RX LED Color", rs) basic.append(rxled) # not used in BJ-318, skip if self.MODEL != "BJ-318": rs = RadioSettingValueList(LIST_COLOR, - LIST_COLOR[_sets.txled]) + current_index=_sets.txled) txled = RadioSetting("settings.txled", "TX LED Color", rs) basic.append(txled) - ledsw = RadioSetting("settings.ledsw", "Back light mode", - RadioSettingValueList(LIST_LEDSW, LIST_LEDSW[ - _sets.ledsw])) + ledsw = RadioSetting( + "settings.ledsw", "Back light mode", + RadioSettingValueList(LIST_LEDSW, current_index=_sets.ledsw)) basic.append(ledsw) beep = RadioSetting("settings.beep", "Beep", @@ -967,8 +967,8 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): basic.append(beep) ring = RadioSetting("settings.ring", "Ring", - RadioSettingValueList(LIST_RING, LIST_RING[ - _sets.ring])) + RadioSettingValueList( + LIST_RING, current_index=_sets.ring)) basic.append(ring) bcl = RadioSetting("settings.bcl", "Busy channel lockout", @@ -1021,7 +1021,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # Freq Mode, convert bit 1 state to index pointer val = _vfoa.frq_chn_mode // 2 - rx = RadioSettingValueList(LIST_VFOMODE, LIST_VFOMODE[val]) + rx = RadioSettingValueList(LIST_VFOMODE, current_index=val) rs = RadioSetting("upper.vfoa.frq_chn_mode", "Default Mode", rx) rs.set_apply_callback(my_spcl, _vfoa, "frq_chn_mode") a_band.append(rs) @@ -1048,7 +1048,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): a_band.append(rs) rx = RadioSettingValueList(LIST_RECVMODE, - LIST_RECVMODE[_vfoa.rx_mode]) + current_index=_vfoa.rx_mode) rs = RadioSetting("upper.vfoa.rx_mode", "Default Recv Mode", rx) a_band.append(rs) @@ -1059,16 +1059,17 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): "txdtcs_pol", "tx_tone") a_band.append(rs) - rs = RadioSetting("upper.vfoa.launch_sig", "Launch Signaling", - RadioSettingValueList(LIST_SIGNAL, - LIST_SIGNAL[_vfoa.launch_sig])) + rs = RadioSetting( + "upper.vfoa.launch_sig", "Launch Signaling", + RadioSettingValueList( + LIST_SIGNAL, current_index=_vfoa.launch_sig)) a_band.append(rs) - rx = RadioSettingValueList(LIST_SIGNAL, LIST_SIGNAL[_vfoa.tx_end_sig]) + rx = RadioSettingValueList(LIST_SIGNAL, current_index=_vfoa.tx_end_sig) rs = RadioSetting("upper.vfoa.tx_end_sig", "Xmit End Signaling", rx) a_band.append(rs) - rx = RadioSettingValueList(LIST_BW, LIST_BW[_vfoa.fm_bw]) + rx = RadioSettingValueList(LIST_BW, current_index=_vfoa.fm_bw) rs = RadioSetting("upper.vfoa.fm_bw", "Wide/Narrow Band", rx) a_band.append(rs) @@ -1080,7 +1081,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): RadioSettingValueBoolean(bool(_vfoa.scrm_blr))) a_band.append(rs) - rx = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[_vfoa.shift]) + rx = RadioSettingValueList(LIST_SHIFT, current_index=_vfoa.shift) rs = RadioSetting("upper.vfoa.shift", "Xmit Shift", rx) a_band.append(rs) @@ -1117,7 +1118,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # BJ-318 Upper Screen Color if self.MODEL == "BJ-318": rs_u = RadioSettingValueList(LIST_COLOR318, - LIST_COLOR318[_lims.up_scr_color]) + current_index=_lims.up_scr_color) up_scr_color = RadioSetting("hello_lims.up_scr_color", "Screen Color", rs_u) a_band.append(up_scr_color) @@ -1125,14 +1126,14 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # BJ-318 Upper band power if self.MODEL == "BJ-318": val_b = _vfoa.bpower # 2bits values 0,1,2= Low, Mid, High - rx = RadioSettingValueList(LIST_BPOWER, LIST_BPOWER[val_b]) + rx = RadioSettingValueList(LIST_BPOWER, current_index=val_b) power_u = RadioSetting("upper.vfoa.bpower", "Power", rx) a_band.append(power_u) # LOWER BAND SETTINGS val = _vfob.frq_chn_mode // 2 - rx = RadioSettingValueList(LIST_VFOMODE, LIST_VFOMODE[val]) + rx = RadioSettingValueList(LIST_VFOMODE, current_index=val) rs = RadioSetting("lower.vfob.frq_chn_mode", "Default Mode", rx) rs.set_apply_callback(my_spcl, _vfob, "frq_chn_mode") b_band.append(rs) @@ -1158,7 +1159,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): "rxdtcs_pol", "rx_tone") b_band.append(rs) - rx = RadioSettingValueList(LIST_RECVMODE, LIST_RECVMODE[_vfob.rx_mode]) + rx = RadioSettingValueList(LIST_RECVMODE, current_index=_vfob.rx_mode) rs = RadioSetting("lower.vfob.rx_mode", "Default Recv Mode", rx) b_band.append(rs) @@ -1169,15 +1170,15 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): "txdtcs_pol", "tx_tone") b_band.append(rs) - rx = RadioSettingValueList(LIST_SIGNAL, LIST_SIGNAL[_vfob.launch_sig]) + rx = RadioSettingValueList(LIST_SIGNAL, current_index=_vfob.launch_sig) rs = RadioSetting("lower.vfob.launch_sig", "Launch Signaling", rx) b_band.append(rs) - rx = RadioSettingValueList(LIST_SIGNAL, LIST_SIGNAL[_vfob.tx_end_sig]) + rx = RadioSettingValueList(LIST_SIGNAL, current_index=_vfob.tx_end_sig) rs = RadioSetting("lower.vfob.tx_end_sig", "Xmit End Signaling", rx) b_band.append(rs) - rx = RadioSettingValueList(LIST_BW, LIST_BW[_vfob.fm_bw]) + rx = RadioSettingValueList(LIST_BW, current_index=_vfob.fm_bw) rs = RadioSetting("lower.vfob.fm_bw", "Wide/Narrow Band", rx) b_band.append(rs) @@ -1189,7 +1190,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): RadioSettingValueBoolean(bool(_vfob.scrm_blr))) b_band.append(rs) - rx = RadioSettingValueList(LIST_SHIFT, LIST_SHIFT[_vfob.shift]) + rx = RadioSettingValueList(LIST_SHIFT, current_index=_vfob.shift) rs = RadioSetting("lower.vfob.shift", "Xmit Shift", rx) b_band.append(rs) @@ -1225,7 +1226,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # BJ-318 Lower Screen Color if self.MODEL == "BJ-318": rs_l = RadioSettingValueList(LIST_COLOR318, - LIST_COLOR318[_lims.dn_scr_color]) + current_index=_lims.dn_scr_color) dn_scr_color = RadioSetting("hello_lims.dn_scr_color", "Screen Color", rs_l) b_band.append(dn_scr_color) @@ -1233,7 +1234,7 @@ def my_set_tone(setting, obj, is_atr, pol_atr, tone_atr): # BJ-318 lower band power if self.MODEL == "BJ-318": val_l = _vfoa.bpower # 2bits values 0,1,2= Low, Mid, High - rx = RadioSettingValueList(LIST_BPOWER, LIST_BPOWER[val_l]) + rx = RadioSettingValueList(LIST_BPOWER, current_index=val_l) powera = RadioSetting("lower.vfob.bpower", "Power", rx) b_band.append(powera) @@ -1442,7 +1443,7 @@ def my_dtmf2raw(setting, obj, atrba, atrbc, syz=7): if val > 2: val = 0 - rx = RadioSettingValueList(LIST_STATE, LIST_STATE[val]) + rx = RadioSettingValueList(LIST_STATE, current_index=val) rs = RadioSetting("codes.state_now", "Current State", rx) codes.append(rs) diff --git a/chirp/drivers/mml_jc8810.py b/chirp/drivers/mml_jc8810.py index 1ae35d3c..07751a12 100644 --- a/chirp/drivers/mml_jc8810.py +++ b/chirp/drivers/mml_jc8810.py @@ -634,12 +634,12 @@ def get_memory(self, number): mem.extra.append(rset) # PTT-ID - rs = RadioSettingValueList(PTTID_LIST, PTTID_LIST[_mem.pttid]) + rs = RadioSettingValueList(PTTID_LIST, current_index=_mem.pttid) rset = RadioSetting("pttid", "PTT ID", rs) mem.extra.append(rset) # Signal (DTMF Encoder Group #) - rs = RadioSettingValueList(PTTIDCODE_LIST, PTTIDCODE_LIST[_mem.scode]) + rs = RadioSettingValueList(PTTIDCODE_LIST, current_index=_mem.scode) rset = RadioSetting("scode", "PTT ID Code", rs) mem.extra.append(rset) @@ -749,7 +749,7 @@ def get_settings(self): group = RadioSettings(basic) # Menu 12: TOT - rs = RadioSettingValueList(TOT_LIST, TOT_LIST[_settings.tot]) + rs = RadioSettingValueList(TOT_LIST, current_index=_settings.tot) rset = RadioSetting("tot", "Time Out Timer", rs) basic.append(rset) @@ -759,12 +759,12 @@ def get_settings(self): basic.append(rset) # Menu 13: VOX - rs = RadioSettingValueList(OFF1TO9_LIST, OFF1TO9_LIST[_settings.vox]) + rs = RadioSettingValueList(OFF1TO9_LIST, current_index=_settings.vox) rset = RadioSetting("vox", "VOX", rs) basic.append(rset) # Menu 39: VOX DELAY - rs = RadioSettingValueList(VOXD_LIST, VOXD_LIST[_settings.voxd]) + rs = RadioSettingValueList(VOXD_LIST, current_index=_settings.voxd) rset = RadioSetting("voxd", "VOX Delay", rs) basic.append(rset) @@ -776,55 +776,55 @@ def get_settings(self): if self.MODEL not in ["A36plus", "A36plus_8w", "UV-A37", "AR-730"]: # Menu 17: LANGUAGE rs = RadioSettingValueList(LANGUAGE_LIST, - LANGUAGE_LIST[_settings.language]) + current_index=_settings.language) rset = RadioSetting("language", "Voice", rs) basic.append(rset) # Menu 23: ABR - rs = RadioSettingValueList(ABR_LIST, ABR_LIST[_settings.abr]) + rs = RadioSettingValueList(ABR_LIST, current_index=_settings.abr) rset = RadioSetting("abr", "Auto BackLight", rs) basic.append(rset) # Work Mode A rs = RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[_settings.vfomra]) + current_index=_settings.vfomra) rset = RadioSetting("vfomra", "Work Mode A", rs) basic.append(rset) # Work Mode B rs = RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[_settings.vfomrb]) + current_index=_settings.vfomrb) rset = RadioSetting("vfomrb", "Work Mode B", rs) basic.append(rset) # Menu 19: SC-REV - rs = RadioSettingValueList(SCREV_LIST, SCREV_LIST[_settings.screv]) + rs = RadioSettingValueList(SCREV_LIST, current_index=_settings.screv) rset = RadioSetting("screv", "Scan Resume Method", rs) basic.append(rset) # Menu 10: SAVE rs = RadioSettingValueList(SAVE_LIST, - SAVE_LIST[_settings.save]) + current_index=_settings.save) rset = RadioSetting("save", "Battery Save Mode", rs) basic.append(rset) # Menu 42: MDF-A - rs = RadioSettingValueList(MDF_LIST, MDF_LIST[_settings.mdfa]) + rs = RadioSettingValueList(MDF_LIST, current_index=_settings.mdfa) rset = RadioSetting("mdfa", "Memory Display Format A", rs) basic.append(rset) # Menu 43: MDF-B - rs = RadioSettingValueList(MDF_LIST, MDF_LIST[_settings.mdfb]) + rs = RadioSettingValueList(MDF_LIST, current_index=_settings.mdfb) rset = RadioSetting("mdfb", "Memory Display Format B", rs) basic.append(rset) # Menu 33: DTMFST (DTMF ST) - rs = RadioSettingValueList(DTMFST_LIST, DTMFST_LIST[_settings.dtmfst]) + rs = RadioSettingValueList(DTMFST_LIST, current_index=_settings.dtmfst) rset = RadioSetting("dtmfst", "DTMF Side Tone", rs) basic.append(rset) # Menu 37: PTT-LT - rs = RadioSettingValueList(PTTLT_LIST, PTTLT_LIST[_settings.pttlt]) + rs = RadioSettingValueList(PTTLT_LIST, current_index=_settings.pttlt) rset = RadioSetting("pttlt", "PTT Delay", rs) basic.append(rset) @@ -860,7 +860,7 @@ def apply_skey2s_listvalue(setting, obj): idx = SKEY2S_VALUES.index(_settings.skey2_sp) else: idx = SKEY2S_VALUES.index(0x07) # default FM - rs = RadioSettingValueList(SKEY2S_CHOICES, SKEY2S_CHOICES[idx]) + rs = RadioSettingValueList(SKEY2S_CHOICES, current_index=idx) rset = RadioSetting("skey2_sp", "PF2 Key (Short Press)", rs) rset.set_apply_callback(apply_skey2s_listvalue, _settings.skey2_sp) basic.append(rset) @@ -893,7 +893,7 @@ def apply_skey2l_listvalue(setting, obj): idx = SKEY2L_VALUES.index(_settings.skey2_lp) else: idx = SKEY2L_VALUES.index(0x1D) # default Search - rs = RadioSettingValueList(SKEY2L_CHOICES, SKEY2L_CHOICES[idx]) + rs = RadioSettingValueList(SKEY2L_CHOICES, current_index=idx) rset = RadioSetting("skey2_lp", "PF2 Key (Long Press)", rs) rset.set_apply_callback(apply_skey2l_listvalue, _settings.skey2_lp) basic.append(rset) @@ -926,7 +926,7 @@ def apply_skey3s_listvalue(setting, obj): idx = SKEY3S_VALUES.index(_settings.skey3_sp) else: idx = SKEY3S_VALUES.index(0x0C) # default NOAA - rs = RadioSettingValueList(SKEY3S_CHOICES, SKEY3S_CHOICES[idx]) + rs = RadioSettingValueList(SKEY3S_CHOICES, current_index=idx) rset = RadioSetting("skey3_sp", "PF3 Key (Short Press)", rs) rset.set_apply_callback(apply_skey3s_listvalue, _settings.skey3_sp) basic.append(rset) @@ -958,7 +958,7 @@ def apply_skey3l_listvalue(setting, obj): idx = SKEY3L_VALUES.index(_settings.skey3_lp) else: idx = SKEY3L_VALUES.index(0x1D) # default SEARCH - rs = RadioSettingValueList(SKEY3L_CHOICES, SKEY3L_CHOICES[idx]) + rs = RadioSettingValueList(SKEY3L_CHOICES, current_index=idx) rset = RadioSetting("skey3_lp", "PF3 Key (Long Press)", rs) rset.set_apply_callback(apply_skey3l_listvalue, _settings.skey3_lp) @@ -991,25 +991,25 @@ def apply_skeytop_listvalue(setting, obj): idx = SKEYTOP_VALUES.index(_settings.topkey_sp) else: idx = SKEYTOP_VALUES.index(0x1D) # default SEARCH - rs = RadioSettingValueList(SKEYTOP_CHOICES, SKEYTOP_CHOICES[idx]) + rs = RadioSettingValueList(SKEYTOP_CHOICES, current_index=idx) rset = RadioSetting("topkey_sp", "Top Key (Short Press)", rs) rset.set_apply_callback(apply_skeytop_listvalue, _settings.topkey_sp) basic.append(rset) # Mneu 36: TONE - rs = RadioSettingValueList(TONE_LIST, TONE_LIST[_settings.tone]) + rs = RadioSettingValueList(TONE_LIST, current_index=_settings.tone) rset = RadioSetting("tone", "Tone-burst Frequency", rs) basic.append(rset) # Mneu 29: POWER ON MSG - rs = RadioSettingValueList(PONMSG_LIST, PONMSG_LIST[_settings.ponmsg]) + rs = RadioSettingValueList(PONMSG_LIST, current_index=_settings.ponmsg) rset = RadioSetting("ponmsg", "Power On Message", rs) basic.append(rset) if self.MODEL in ["HI-8811", "RT-470L", "RT-470X", "RT-630", "RT-495"]: rs = RadioSettingValueList(TAILCODE_LIST, - TAILCODE_LIST[_settings.tailcode]) + current_index=_settings.tailcode) rset = RadioSetting("tailcode", "Tail Code", rs) basic.append(rset) @@ -1019,38 +1019,38 @@ def apply_skeytop_listvalue(setting, obj): basic.append(rset) # Menu 40: RP-STE - rs = RadioSettingValueList(RPSTE_LIST, RPSTE_LIST[_settings.rpste]) + rs = RadioSettingValueList(RPSTE_LIST, current_index=_settings.rpste) rset = RadioSetting("rpste", "Squelch Tail Eliminate (repeater)", rs) basic.append(rset) # Menu 41: RPT-RL - rs = RadioSettingValueList(RPSTE_LIST, RPSTE_LIST[_settings.rptrl]) + rs = RadioSettingValueList(RPSTE_LIST, current_index=_settings.rptrl) rset = RadioSetting("rptrl", "STE Repeater Delay", rs) basic.append(rset) # Menu 38: MENU EXIT TIME rs = RadioSettingValueList(MENUQUIT_LIST, - MENUQUIT_LIST[_settings.menuquit]) + current_index=_settings.menuquit) rset = RadioSetting("menuquit", "Menu Auto Quit", rs) basic.append(rset) # Menu 34: AUTOLOCK - rs = RadioSettingValueList(AUTOLK_LIST, AUTOLK_LIST[_settings.autolk]) + rs = RadioSettingValueList(AUTOLK_LIST, current_index=_settings.autolk) rset = RadioSetting("autolk", "Key Auto Lock", rs) basic.append(rset) # Menu 28: CDCSS SAVE MODE - rs = RadioSettingValueList(QTSAVE_LIST, QTSAVE_LIST[_settings.qtsave]) + rs = RadioSettingValueList(QTSAVE_LIST, current_index=_settings.qtsave) rset = RadioSetting("qtsave", "QT Save Type", rs) basic.append(rset) # Menu 45: TX-A/B - rs = RadioSettingValueList(DUALTX_LIST, DUALTX_LIST[_settings.dualtx]) + rs = RadioSettingValueList(DUALTX_LIST, current_index=_settings.dualtx) rset = RadioSetting("dualtx", "Dual TX", rs) basic.append(rset) # Menu 47: AL-MODE - rs = RadioSettingValueList(ALMODE_LIST, ALMODE_LIST[_settings.almode]) + rs = RadioSettingValueList(ALMODE_LIST, current_index=_settings.almode) rset = RadioSetting("almode", "Alarm Mode", rs) basic.append(rset) @@ -1061,7 +1061,7 @@ def apply_skeytop_listvalue(setting, obj): # choice, 'TONE1200'. RT-470 radios with a firmware version prior to # v1.22 will not honor the ROGER menu's 'TONE1200' choice in CHIRP. # ========== - rs = RadioSettingValueList(ROGER_LIST, ROGER_LIST[_settings.roger]) + rs = RadioSettingValueList(ROGER_LIST, current_index=_settings.roger) rset = RadioSetting("roger", "Roger", rs) basic.append(rset) @@ -1090,7 +1090,7 @@ def apply_skeytop_listvalue(setting, obj): if self.MODEL not in ["A36plus", "A36plus_8w", "UV-A37", "AR-730"]: # Menu 48: RX END TAIL rs = RadioSettingValueList(TONERXEND_LIST, - TONERXEND_LIST[_settings.rxendtail]) + current_index=_settings.rxendtail) rset = RadioSetting("rxendtail", "Tone RX End", rs) basic.append(rset) @@ -1117,16 +1117,16 @@ def apply_code(setting, obj, length): dtmf.append(rset) rs = RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[_dtmf.dtmfon]) + current_index=_dtmf.dtmfon) rset = RadioSetting("dtmf.dtmfon", "DTMF Speed (on)", rs) dtmf.append(rset) rs = RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[_dtmf.dtmfoff]) + current_index=_dtmf.dtmfoff) rset = RadioSetting("dtmf.dtmfoff", "DTMF Speed (off)", rs) dtmf.append(rset) - rs = RadioSettingValueList(PTTID_LIST, PTTID_LIST[_settings.pttid]) + rs = RadioSettingValueList(PTTID_LIST, current_index=_settings.pttid) rset = RadioSetting("pttid", "PTT ID", rs) dtmf.append(rset) @@ -1184,13 +1184,13 @@ def _filter(name): if self.MODEL in ["A36plus", "A36plus_8w"]: # Menu 21: RX END TAIL rs = RadioSettingValueList(TONERXEND_LIST, - TONERXEND_LIST[_settings.skey3_lp]) + current_index=_settings.skey3_lp) rset = RadioSetting("skey3_lp", "RX End Tail", rs) basic.append(rset) # Menu 23: TAIL PHASE rs = RadioSettingValueList(TAILPHASE_LIST, - TAILPHASE_LIST[_settings.rxendtail]) + current_index=_settings.rxendtail) rset = RadioSetting("rxendtail", "Tail Phase", rs) basic.append(rset) diff --git a/chirp/drivers/mursv1.py b/chirp/drivers/mursv1.py index 051c1e9d..d89f175b 100644 --- a/chirp/drivers/mursv1.py +++ b/chirp/drivers/mursv1.py @@ -577,7 +577,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -586,7 +586,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -595,7 +595,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -604,7 +604,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -621,7 +621,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -630,12 +630,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -644,12 +645,13 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) if _mem.settings.pttlt > 0x32: @@ -660,14 +662,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.sync", "Sync A & B", @@ -676,23 +680,23 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) rs = RadioSetting("settings.dbptt", "Double PTT", @@ -703,24 +707,25 @@ def get_settings(self): RadioSettingValueBoolean(_mem.settings.ste)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", RadioSettingValueBoolean(_mem.settings.roger)) basic.append(rs) - rs = RadioSetting("settings.rtone", "Tone Burst Frequency", - RadioSettingValueList(LIST_RTONE, LIST_RTONE[ - _mem.settings.rtone])) + rs = RadioSetting( + "settings.rtone", "Tone Burst Frequency", + RadioSettingValueList( + LIST_RTONE, current_index=_mem.settings.rtone)) basic.append(rs) rs = RadioSetting("settings.rogerrx", "Roger Beep (RX)", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[ - _mem.settings.rogerrx])) + LIST_OFFAB, current_index=_mem.settings.rogerrx)) basic.append(rs) # Advanced settings @@ -784,7 +789,7 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -839,7 +844,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -848,7 +853,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -861,7 +866,7 @@ def apply_code(setting, obj, length): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) def apply_alarmcode(setting, obj, length): diff --git a/chirp/drivers/radioddity_r2.py b/chirp/drivers/radioddity_r2.py index 0ee72246..0554bae5 100644 --- a/chirp/drivers/radioddity_r2.py +++ b/chirp/drivers/radioddity_r2.py @@ -595,30 +595,30 @@ def get_settings(self): rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) basic.append(rs) rs = RadioSetting("settings.scanmode", "Scan Mode", RadioSettingValueList( SCANMODE_LIST, - SCANMODE_LIST[_settings.scanmode])) + current_index=_settings.scanmode)) basic.append(rs) rs = RadioSetting("settings.voice", "Voice Prompts", RadioSettingValueList( - VOICE_LIST, VOICE_LIST[_settings.voice])) + VOICE_LIST, current_index=_settings.voice)) basic.append(rs) rs = RadioSetting("settings.voxgain", "VOX Level", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.voxgain])) + VOX_LIST, current_index=_settings.voxgain)) basic.append(rs) rs = RadioSetting("settings.voxdelay", "VOX Delay Time", RadioSettingValueList( VOXDELAY_LIST, - VOXDELAY_LIST[_settings.voxdelay])) + current_index=_settings.voxdelay)) basic.append(rs) rs = RadioSetting("settings.save", "Battery Save", diff --git a/chirp/drivers/radtel_rt490.py b/chirp/drivers/radtel_rt490.py index 3a51af2e..147323d9 100644 --- a/chirp/drivers/radtel_rt490.py +++ b/chirp/drivers/radtel_rt490.py @@ -642,7 +642,7 @@ def _get_settings_ks(self): tmp = 1 if int(_mem.management_settings.active) > 0 else 0 ret.append(RadioSetting('management_settings.active', 'Radio Status', RadioSettingValueList(self.ENABLERADIO, - self.ENABLERADIO[tmp]))) + current_index=tmp))) return ret def _get_settings_dtmf(self): @@ -708,7 +708,7 @@ def _get_settings_dtmf(self): dtmf.append(RadioSetting('settings.pttiddelay', 'PTT ID Delay', rsvl)) rsvl = RadioSettingValueList(self.DTMFSTLIST, - self.DTMFSTLIST[_mem.settings.dtmfst]) + current_index=_mem.settings.dtmfst) dtmf.append(RadioSetting('settings.dtmfst', 'DTMF Side Tone (Required for GPS ID)', rsvl)) return dtmf @@ -738,8 +738,8 @@ def _get_settings_vfo(self, vfo, chan): # WIP TODO Rx/Tx tones ret = RadioSettingGroup('settings_vfo@%s' % chan.lower(), 'VFO %s Settings' % chan) rsvl = RadioSettingValueList(self.WORKMODES, - self.WORKMODES[_mem.settings[ - 'workmode'+chan.lower()]]) + current_index=_mem.settings[ + 'workmode'+chan.lower()]) ret.append(RadioSetting('settings.workmode%s' % chan.lower(), 'VFO %s Workmode' % chan, rsvl)) tmp = ''.join(DTMFCHARS[i] for i in _mem.settings_vfo[ @@ -751,8 +751,8 @@ def _get_settings_vfo(self, vfo, chan): # WIP TODO Rx/Tx tones 'Rx Frequency', rsvf)) # TODO Rx/Tx tones rsvl = RadioSettingValueList(self.VFO_SFTD, - self.VFO_SFTD[_mem.settings_vfo[ - 'vfo_'+chan.lower()].sftd]) + current_index=_mem.settings_vfo[ + 'vfo_'+chan.lower()].sftd) ret.append(RadioSetting('settings_vfo.vfo_%s.sftd' % chan.lower(), 'Freq offset direction', rsvl)) tmp = ''.join(DTMFCHARS[i] for i in _mem.settings_vfo[ @@ -761,21 +761,18 @@ def _get_settings_vfo(self, vfo, chan): # WIP TODO Rx/Tx tones ret.append(RadioSetting('settings_vfo.vfo_%s.offset' % chan.lower(), 'Tx Offset', rsvf)) rsvl = RadioSettingValueList(self.SIGNAL, - self.SIGNAL[ - _mem.settings_vfo[ - 'vfo_'+chan.lower()].signal]) + current_index=_mem.settings_vfo[ + 'vfo_'+chan.lower()].signal) ret.append(RadioSetting('settings_vfo.vfo_%s.signal' % chan.lower(), 'PTT ID Code (S-Code)', rsvl)) rsvl = RadioSettingValueList(self.POWER_LEVELS_LIST, - self.POWER_LEVELS_LIST[ - _mem.settings_vfo[ - 'vfo_'+chan.lower()].power]) + current_index=_mem.settings_vfo[ + 'vfo_'+chan.lower()].power) ret.append(RadioSetting('settings_vfo.vfo_%s.power' % chan.lower(), 'Tx Power', rsvl)) rsvl = RadioSettingValueList(self.FHSS_LIST, - self.FHSS_LIST[ - _mem.settings_vfo[ - 'vfo_'+chan.lower()].fhss]) + current_index=_mem.settings_vfo[ + 'vfo_'+chan.lower()].fhss) ret.append(RadioSetting('settings_vfo.vfo_%s.fhss' % chan.lower(), 'FHSS (Encryption)', rsvl)) chanwidth = ['Wide', 'Narrow'] @@ -785,9 +782,8 @@ def _get_settings_vfo(self, vfo, chan): # WIP TODO Rx/Tx tones ret.append(RadioSetting('settings_vfo.vfo_%s.narrow' % chan.lower(), 'Wide / Narrow', rsvl)) rsvl = RadioSettingValueList(self.TUNING_STEPS_LIST, - self.TUNING_STEPS_LIST[ - _mem.settings_vfo[ - 'vfo_'+chan.lower()].freqstep]) + current_index=_mem.settings_vfo[ + 'vfo_'+chan.lower()].freqstep) ret.append(RadioSetting('settings_vfo.vfo_%s.freqstep' % chan.lower(), 'Tuning Step', rsvl)) return ret @@ -887,39 +883,46 @@ def _get_settings_adv(self): "Channel B Memory index", rsvi)) ret.append(RadioSetting('settings.vox', 'VOX Sensitivity', RadioSettingValueList(self.VOX_LIST, - self.VOX_LIST[_mem.settings.vox]))) - ret.append(RadioSetting('settings.vox_delay', 'VOX Delay', - RadioSettingValueList(self.VOXDELAYLIST, - self.VOXDELAYLIST[ - _mem.settings.vox_delay]))) + current_index=_mem.settings.vox))) + ret.append( + RadioSetting( + 'settings.vox_delay', 'VOX Delay', + RadioSettingValueList( + self.VOXDELAYLIST, + current_index=_mem.settings.vox_delay))) ret.append(RadioSetting('settings.tdr', 'Dual Receive (TDR)', RadioSettingValueBoolean(_mem.settings.tdr))) - ret.append(RadioSetting('settings.txundertdr', 'Tx under TDR', - RadioSettingValueList(self.TDRTXMODES, - self.TDRTXMODES[ - _mem.settings.txundertdr]))) + ret.append( + RadioSetting( + 'settings.txundertdr', 'Tx under TDR', + RadioSettingValueList( + self.TDRTXMODES, + current_index=_mem.settings.txundertdr))) ret.append(RadioSetting('settings.voice', 'Menu Voice Prompts', RadioSettingValueBoolean(_mem.settings.voice))) - ret.append(RadioSetting('settings.scanmode', 'Scan Mode', - RadioSettingValueList(self.SCANMODES, - self.SCANMODES[ - _mem.settings.scanmode]))) + ret.append( + RadioSetting( + 'settings.scanmode', 'Scan Mode', + RadioSettingValueList( + self.SCANMODES, current_index=_mem.settings.scanmode))) ret.append(RadioSetting('settings.bcl', 'Busy Channel Lockout', RadioSettingValueBoolean(_mem.settings.bcl))) ret.append(RadioSetting('settings.display_ani', 'Display ANI ID', RadioSettingValueBoolean(_mem.settings.display_ani))) ret.append(RadioSetting('settings.ani_id', 'ANI ID', RadioSettingValueList(self.ANI_IDS, - self.ANI_IDS[_mem.settings.ani_id]))) - ret.append(RadioSetting('settings.alarm_mode', 'Alarm Mode', - RadioSettingValueList(self.ALARMMODES, - self.ALARMMODES[ - _mem.settings.alarm_mode]))) + current_index=_mem.settings.ani_id))) + ret.append( + RadioSetting( + 'settings.alarm_mode', 'Alarm Mode', + RadioSettingValueList( + self.ALARMMODES, + current_index=_mem.settings.alarm_mode))) ret.append(RadioSetting('settings.alarmsound', 'Alarm Sound', RadioSettingValueBoolean(_mem.settings.alarmsound))) ret.append(RadioSetting('settings.fmradio', 'Enable FM Radio', RadioSettingValueList(self.FMRADIO, - self.FMRADIO[_mem.settings.fmradio]))) + current_index=_mem.settings.fmradio))) if RT490_EXPERIMENTAL: tmp = _mem.settings.fmpreset / 10.0 if tmp < 65.0 or tmp > 108.0: @@ -929,34 +932,43 @@ def _get_settings_adv(self): precision=1))) ret.append(RadioSetting('settings.kblock', 'Enable Keyboard Lock', RadioSettingValueBoolean(_mem.settings.kblock))) - ret.append(RadioSetting('settings.autolock', 'Autolock Keyboard', - RadioSettingValueList(self.AUTOLOCK_TO, - self.AUTOLOCK_TO[ - _mem.settings.autolock]))) - ret.append(RadioSetting('settings.timer_menu_quit', 'Menu Exit Time', - RadioSettingValueList(self.MENUEXIT_TO, - self.MENUEXIT_TO[ - _mem.settings.timer_menu_quit]))) + ret.append( + RadioSetting( + 'settings.autolock', 'Autolock Keyboard', + RadioSettingValueList( + self.AUTOLOCK_TO, + current_index=_mem.settings.autolock))) + ret.append( + RadioSetting( + 'settings.timer_menu_quit', 'Menu Exit Time', + RadioSettingValueList( + self.MENUEXIT_TO, + current_index=_mem.settings.timer_menu_quit))) ret.append(RadioSetting('settings.enable_gps', 'Enable GPS', RadioSettingValueBoolean(_mem.settings.enable_gps))) - ret.append(RadioSetting('settings.scan_dcs', 'CDCSS Save Modes', - RadioSettingValueList(self.SCANDCSMODES, - self.SCANDCSMODES[ - _mem.settings.scan_dcs]))) + ret.append( + RadioSetting( + 'settings.scan_dcs', 'CDCSS Save Modes', + RadioSettingValueList( + self.SCANDCSMODES, + current_index=_mem.settings.scan_dcs))) ret.append(RadioSetting('settings.tailnoiseclear', 'Tail Noise Clear', RadioSettingValueBoolean(_mem.settings.tailnoiseclear))) - ret.append(RadioSetting('settings.rptnoiseclear', 'Rpt Noise Clear', - RadioSettingValueList(self.RPTNOISE, - self.RPTNOISE[ - _mem.settings.rptnoiseclear]))) - ret.append(RadioSetting('settings.rptnoisedelay', 'Rpt Noise Delay', - RadioSettingValueList(self.RPTNOISE, - self.RPTNOISE[ - _mem.settings.rptnoisedelay]))) + ret.append( + RadioSetting( + 'settings.rptnoiseclear', 'Rpt Noise Clear', + RadioSettingValueList( + self.RPTNOISE, + current_index=_mem.settings.rptnoiseclear))) + ret.append( + RadioSetting( + 'settings.rptnoisedelay', 'Rpt Noise Delay', + RadioSettingValueList( + self.RPTNOISE, + current_index=_mem.settings.rptnoisedelay))) ret.append(RadioSetting('settings.rpttone', 'Rpt Tone', RadioSettingValueList(self.RPTTONES, - self.RPTTONES[ - _mem.settings.rpttone]))) + current_index=_mem.settings.rpttone))) return ret def _get_settings_basic(self): @@ -964,40 +976,49 @@ def _get_settings_basic(self): ret = RadioSettingGroup('basic', 'Basic') ret.append(RadioSetting('settings.squelch', 'Carrier Squelch Level', RadioSettingValueList(self.SQUELCHLVLS, - self.SQUELCHLVLS[ - _mem.settings.squelch]))) - ret.append(RadioSetting('settings.savemode', 'Battery Savemode', - RadioSettingValueList(self.SAVEMODES, - self.SAVEMODES[ - _mem.settings.savemode]))) - ret.append(RadioSetting('settings.backlight', 'Backlight Timeout', - RadioSettingValueList(self.BACKLIGHT_TO, - self.BACKLIGHT_TO[ - _mem.settings.backlight]))) + current_index=_mem.settings.squelch))) + ret.append( + RadioSetting( + 'settings.savemode', 'Battery Savemode', + RadioSettingValueList( + self.SAVEMODES, current_index=_mem.settings.savemode))) + ret.append( + RadioSetting( + 'settings.backlight', 'Backlight Timeout', + RadioSettingValueList( + self.BACKLIGHT_TO, + current_index=_mem.settings.backlight))) ret.append(RadioSetting('settings.timeout', 'Timeout Timer (TOT)', RadioSettingValueList(self.TOT_LIST, - self.TOT_LIST[ - _mem.settings.timeout]))) + current_index=_mem.settings.timeout))) ret.append(RadioSetting('settings.beep', 'Beep', RadioSettingValueBoolean(_mem.settings.beep))) - ret.append(RadioSetting('settings.active_channel', 'Active Channel', - RadioSettingValueList(self.CHANNELS, - self.CHANNELS[ - _mem.settings.active_channel]))) - ret.append(RadioSetting('settings.cha_disp', 'Channel A Display Mode', - RadioSettingValueList(self.DISPLAYMODES, - self.DISPLAYMODES[ - _mem.settings.cha_disp]))) - ret.append(RadioSetting('settings.chb_disp', 'Channel B Display Mode', - RadioSettingValueList(self.DISPLAYMODES, - self.DISPLAYMODES[ - _mem.settings.chb_disp]))) + ret.append( + RadioSetting( + 'settings.active_channel', 'Active Channel', + RadioSettingValueList( + self.CHANNELS, + current_index=_mem.settings.active_channel))) + ret.append( + RadioSetting( + 'settings.cha_disp', 'Channel A Display Mode', + RadioSettingValueList( + self.DISPLAYMODES, + current_index=_mem.settings.cha_disp))) + ret.append( + RadioSetting( + 'settings.chb_disp', 'Channel B Display Mode', + RadioSettingValueList( + self.DISPLAYMODES, + current_index=_mem.settings.chb_disp))) ret.append(RadioSetting('settings.roger', 'Roger Beep', RadioSettingValueBoolean(_mem.settings.roger))) - ret.append(RadioSetting('settings.powermsg', 'Power Message', - RadioSettingValueList(self.POWERMESSAGES, - self.POWERMESSAGES[ - _mem.settings.powermsg]))) + ret.append( + RadioSetting( + 'settings.powermsg', 'Power Message', + RadioSettingValueList( + self.POWERMESSAGES, + current_index=_mem.settings.powermsg))) ret.append(RadioSetting('settings.rx_time', 'Show RX Time', RadioSettingValueBoolean(_mem.settings.rx_time))) return ret diff --git a/chirp/drivers/radtel_t18.py b/chirp/drivers/radtel_t18.py index 6a6642ae..bca31d15 100644 --- a/chirp/drivers/radtel_t18.py +++ b/chirp/drivers/radtel_t18.py @@ -713,8 +713,7 @@ def get_settings(self): rs = RadioSetting("timeouttimer", "Timeout timer", RadioSettingValueList( TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[ - _settings.timeouttimer])) + current_index=_settings.timeouttimer)) basic.append(rs) if self.MODEL == "RB18" or self.MODEL == "RB618": @@ -730,14 +729,14 @@ def get_settings(self): rs = RadioSetting("scanmode", "Scan mode", RadioSettingValueList( SCANMODE_LIST, - SCANMODE_LIST[_settings.scanmode])) + current_index=_settings.scanmode)) basic.append(rs) if self.MODEL == "RT20": rs = RadioSetting("voiceprompt", "Voice prompts", RadioSettingValueList( VOICE_LIST4, - VOICE_LIST4[_settings.voiceprompt])) + current_index=_settings.voiceprompt)) basic.append(rs) elif self.MODEL == "RT22S": rs = RadioSetting("voiceprompt", "Voice prompts", @@ -756,14 +755,14 @@ def get_settings(self): rs = RadioSetting("voiceprompt", "Voice prompts", RadioSettingValueList( VOICE_LIST3, - VOICE_LIST3[_settings.voiceprompt])) + current_index=_settings.voiceprompt)) basic.append(rs) else: if self.MODEL != "RB87": rs = RadioSetting("voiceprompt", "Voice prompts", RadioSettingValueList( VOICE_LIST, - VOICE_LIST[_settings.voiceprompt])) + current_index=_settings.voiceprompt)) basic.append(rs) rs = RadioSetting("batterysaver", "Battery saver", @@ -798,27 +797,27 @@ def get_settings(self): rs = RadioSetting("voxlevel", "Vox level", RadioSettingValueList( VOXLEVEL_LIST, - VOXLEVEL_LIST[_settings.voxlevel])) + current_index=_settings.voxlevel)) basic.append(rs) rs = RadioSetting("voxdelay", "VOX delay", RadioSettingValueList( VOXDELAY_LIST, - VOXDELAY_LIST[_settings.voxdelay])) + current_index=_settings.voxdelay)) basic.append(rs) if self.MODEL == "RT22S": rs = RadioSetting("sidekey2", "Side Key 2(Long)", RadioSettingValueList( SIDEKEY2_LIST, - SIDEKEY2_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) if self.MODEL == "RB18" or self.MODEL == "RB618": rs = RadioSetting("language", "Language", RadioSettingValueList( VOICE_LIST2, - VOICE_LIST2[_settings.language])) + current_index=_settings.language)) basic.append(rs) rs = RadioSetting("tail", "Tail", @@ -853,31 +852,31 @@ def get_settings(self): rs = RadioSetting("speccode", "SpecCode Select", RadioSettingValueList( SPECCODE_LIST, - SPECCODE_LIST[_settings.speccode])) + current_index=_settings.speccode)) basic.append(rs) rs = RadioSetting("sidekey2", "Side Key 1(Short)", RadioSettingValueList( SIDEKEY85SHORT_LIST, - SIDEKEY85SHORT_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) rs = RadioSetting("sidekey1L", "Side Key 1(Long)", RadioSettingValueList( SIDEKEY85LONG_LIST, - SIDEKEY85LONG_LIST[_settings.sidekey1L])) + current_index=_settings.sidekey1L)) basic.append(rs) rs = RadioSetting("sidekey2S", "Side Key 2(Short)", RadioSettingValueList( SIDEKEY85SHORT_LIST, - SIDEKEY85SHORT_LIST[_settings.sidekey2S])) + current_index=_settings.sidekey2S)) basic.append(rs) rs = RadioSetting("sidekey2L", "Side Key 2(Long)", RadioSettingValueList( SIDEKEY85LONG_LIST, - SIDEKEY85LONG_LIST[_settings.sidekey2L])) + current_index=_settings.sidekey2L)) basic.append(rs) rs = RadioSetting("power10w", "Power 10W", @@ -888,25 +887,25 @@ def get_settings(self): rs = RadioSetting("sidekey2", "Side Key 1(Short)", RadioSettingValueList( SIDEKEY75_LIST, - SIDEKEY75_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) rs = RadioSetting("sidekey1L", "Side Key 1(Long)", RadioSettingValueList( SIDEKEY75_LIST, - SIDEKEY75_LIST[_settings.sidekey1L])) + current_index=_settings.sidekey1L)) basic.append(rs) rs = RadioSetting("sidekey2S", "Side Key 2(Short)", RadioSettingValueList( SIDEKEY75_LIST, - SIDEKEY75_LIST[_settings.sidekey2S])) + current_index=_settings.sidekey2S)) basic.append(rs) rs = RadioSetting("sidekey2L", "Side Key 2(Long)", RadioSettingValueList( SIDEKEY75_LIST, - SIDEKEY75_LIST[_settings.sidekey2L])) + current_index=_settings.sidekey2L)) basic.append(rs) rs = RadioSetting("power10w", "Low Voltage Stop TX", @@ -917,7 +916,7 @@ def get_settings(self): rs = RadioSetting("sidekey2", "Side Key 1(Long)", RadioSettingValueList( SIDEKEY87_LIST, - SIDEKEY87_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) if self.MODEL == "FRS-B1": @@ -948,7 +947,7 @@ def get_settings(self): rs = RadioSetting("sidekey2", "Left Navigation Button(Long)", RadioSettingValueList( SIDEKEY19_LIST, - SIDEKEY19_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) if self.MODEL == "RT47" or self.MODEL == "RT47V" or \ @@ -956,20 +955,20 @@ def get_settings(self): rs = RadioSetting("sidekey2", "Side Key 1(Long)", RadioSettingValueList( SIDEKEY47_LIST, - SIDEKEY47_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) rs = RadioSetting("sidekey2S", "Side Key 2(Long)", RadioSettingValueList( SIDEKEY47_LIST, - SIDEKEY47_LIST[_settings.sidekey2S])) + current_index=_settings.sidekey2S)) basic.append(rs) if self.MODEL == "BF-V8A" or self.MODEL == "BF-T20FRS": rs = RadioSetting("sidekey2", "Side key", RadioSettingValueList( SIDEKEYV8A_LIST, - SIDEKEYV8A_LIST[_settings.sidekey2])) + current_index=_settings.sidekey2)) basic.append(rs) rs = RadioSetting("settings2.rxemergency", "RX emergency", @@ -979,7 +978,7 @@ def get_settings(self): rs = RadioSetting("settings2.voiceselect", "Language", RadioSettingValueList( VOICE_LIST2, - VOICE_LIST2[_settings2.voiceselect])) + current_index=_settings2.voiceselect)) basic.append(rs) rs = RadioSetting("settings2.hivoltnotx", @@ -1012,13 +1011,13 @@ def get_settings(self): rs = RadioSetting("sidekey2S", "Side Key(Short)", RadioSettingValueList( SIDEKEY29_LIST, - SIDEKEY29_LIST[_settings.sidekey2S])) + current_index=_settings.sidekey2S)) basic.append(rs) rs = RadioSetting("sidekey2L", "Side Key(Long)", RadioSettingValueList( SIDEKEY29_LIST, - SIDEKEY29_LIST[_settings.sidekey2L])) + current_index=_settings.sidekey2L)) basic.append(rs) return top diff --git a/chirp/drivers/retevis_ra87.py b/chirp/drivers/retevis_ra87.py index 2345292c..2d46c321 100644 --- a/chirp/drivers/retevis_ra87.py +++ b/chirp/drivers/retevis_ra87.py @@ -640,7 +640,7 @@ def get_memory(self, number): options = ['Off', 'Freq 1', 'Freq 2', 'Freq 3', 'Freq 4', 'Freq 5', 'Freq 6', 'User'] - rs = RadioSettingValueList(options, options[_mem.scramble]) + rs = RadioSettingValueList(options, current_index=_mem.scramble) rset = RadioSetting("scramble", "Scramble", rs) mem.extra.append(rset) @@ -780,14 +780,14 @@ def get_settings(self): # menu 08 - SQL options = ["Off"] + ["S%s" % x for x in range(0, 8)] - rs = RadioSettingValueList(options, options[_settings.sql]) + rs = RadioSettingValueList(options, current_index=_settings.sql) rset = RadioSetting("sql", "S-Meter Squelch Level", rs) rset.set_doc("Menu 8 (Off, S1, S2, S3, S4, S5, S6, S7)") basic.append(rset) # menu 09 - SQH options = ["Off", "125", "250", "500"] - rs = RadioSettingValueList(options, options[_settings.sqh]) + rs = RadioSettingValueList(options, current_index=_settings.sqh) rset = RadioSetting("sqh", "Squelch Hang Time [ms]", rs) rset.set_doc("Menu 9 (Off, 125, 250, 500)") basic.append(rset) @@ -801,35 +801,35 @@ def get_settings(self): # menu 12 - SCAN options = ["Time Operated (TO)", "Carrier Operated (CO)", "SEarch (SE)"] - rs = RadioSettingValueList(options, options[_settings.scan]) + rs = RadioSettingValueList(options, current_index=_settings.scan) rset = RadioSetting("scan", "Scan Resume Method", rs) rset.set_doc("Menu 12") basic.append(rset) # menu 14 - ECHO options = ["Auto (S/RX)", "Manual (D/RX)"] - rs = RadioSettingValueList(options, options[_settings.echo]) + rs = RadioSettingValueList(options, current_index=_settings.echo) rset = RadioSetting("echo", "Response Mode", rs) rset.set_doc("Menu 14") basic.append(rset) # menu 16 - MDF options = ["Name", "Frequency"] - rs = RadioSettingValueList(options, options[_settings.mdf]) + rs = RadioSettingValueList(options, current_index=_settings.mdf) rset = RadioSetting("mdf", "Memory Display Format", rs) rset.set_doc("Menu 16") basic.append(rset) # menu 17 - APO options = ["Off", "30", "60", "90", "120", "180"] - rs = RadioSettingValueList(options, options[_settings.apo]) + rs = RadioSettingValueList(options, current_index=_settings.apo) rset = RadioSetting("apo", "Automatic Power Off [min]", rs) rset.set_doc("Menu 17") basic.append(rset) # menu 18 - CK options = ["CALL", "1750"] - rs = RadioSettingValueList(options, options[_settings.ck]) + rs = RadioSettingValueList(options, current_index=_settings.ck) rset = RadioSetting("ck", "CALL Key", rs) rset.set_doc("Menu 18") basic.append(rset) @@ -842,7 +842,7 @@ def get_settings(self): # menu 20 - TOT options = ["3", "5", "10"] - rs = RadioSettingValueList(options, options[_settings.tot]) + rs = RadioSettingValueList(options, current_index=_settings.tot) rset = RadioSetting("tot", "Time-Out Timer [min]", rs) rset.set_doc("Menu 20") basic.append(rset) @@ -935,22 +935,22 @@ def _filter(name): "SQL", "M-V", "M.IN", "C IN", "MENU", "SHIFT", "LOW", "CONTR", "LOCK", "STEP"] # menu 39: - PF 1 - rs = RadioSettingValueList(options, options[_settings.pf1]) + rs = RadioSettingValueList(options, current_index=_settings.pf1) rset = RadioSetting("pf1", "PF Key 1", rs) pfkey.append(rset) # menu 40: - PF 2 - rs = RadioSettingValueList(options, options[_settings.pf2]) + rs = RadioSettingValueList(options, current_index=_settings.pf2) rset = RadioSetting("pf2", "PF Key 2", rs) pfkey.append(rset) # menu 41: - PF 3 - rs = RadioSettingValueList(options, options[_settings.pf3]) + rs = RadioSettingValueList(options, current_index=_settings.pf3) rset = RadioSetting("pf3", "PF Key 3", rs) pfkey.append(rset) # menu 42: - PF 4 - rs = RadioSettingValueList(options, options[_settings.pf4]) + rs = RadioSettingValueList(options, current_index=_settings.pf4) rset = RadioSetting("pf4", "PF Key 4", rs) pfkey.append(rset) @@ -1007,7 +1007,7 @@ def _filter(name): # LCD Display # menu 43 - L.LIG options = ["Off", "On", "Auto"] - rs = RadioSettingValueList(options, options[_settings.llig]) + rs = RadioSettingValueList(options, current_index=_settings.llig) rset = RadioSetting("llig", "LCD Light", rs) lcd.append(rset) @@ -1033,7 +1033,7 @@ def _filter(name): # menu 48 - K.LIG options = ["Off", "On", "Auto"] - rs = RadioSettingValueList(options, options[_settings.klig]) + rs = RadioSettingValueList(options, current_index=_settings.klig) rset = RadioSetting("klig", "Keypad Light", rs) lcd.append(rset) @@ -1060,7 +1060,7 @@ def apply_dmtf_frame(setting, obj, len_obj): # DTMF - Encode # menu 52 - PTTID options = ["Off", "BOT", "EOT", "Both"] - rs = RadioSettingValueList(options, options[_settings.pttid]) + rs = RadioSettingValueList(options, current_index=_settings.pttid) rset = RadioSetting("pttid", "When to send PTT ID", rs) dtmf_enc.append(rset) @@ -1103,14 +1103,14 @@ def apply_dmtf_frame(setting, obj, len_obj): # menu 30 - PA options = ["100", "250", "500", "750", "1000", "1500", "2000"] - rs = RadioSettingValueList(options, options[_settings.pa]) + rs = RadioSettingValueList(options, current_index=_settings.pa) rset = RadioSetting("pa", "DTMF Pause [ms]", rs) rset.set_doc("Menu 30") dtmf_enc.append(rset) # menu 28 - SPD options = ["Fast", "Slow"] - rs = RadioSettingValueList(options, options[_settings.spd]) + rs = RadioSettingValueList(options, current_index=_settings.spd) rset = RadioSetting("spd", "DTMF Speed", rs) rset.set_doc("Menu 28") dtmf_enc.append(rset) @@ -1126,13 +1126,13 @@ def apply_dmtf_frame(setting, obj, len_obj): # options = ["Off", "A", "B", "C", "D", "*", "#"] - rs = RadioSettingValueList(options, options[_dtmfd.grpcode]) + rs = RadioSettingValueList(options, current_index=_dtmfd.grpcode) rset = RadioSetting("dtmfd.grpcode", "Group Code", rs) dtmf_dec.append(rset) # options = ["Off"] + ["%s" % x for x in range(1, 251)] - rs = RadioSettingValueList(options, options[_dtmfd.art]) + rs = RadioSettingValueList(options, current_index=_dtmfd.art) rset = RadioSetting("dtmfd.art", "Auto Reset Time[s]", rs) dtmf_dec.append(rset) @@ -1151,7 +1151,7 @@ def apply_dmtf_frame(setting, obj, len_obj): # options = ["TX Inhibit", "TX/RX Inhibit"] - rs = RadioSettingValueList(options, options[_dtmfd.stuntype]) + rs = RadioSettingValueList(options, current_index=_dtmfd.stuntype) rset = RadioSetting("dtmfd.stuntype", "Stun Type", rs) dtmf_dec.append(rset) diff --git a/chirp/drivers/retevis_rb15.py b/chirp/drivers/retevis_rb15.py index 1766c776..a2bd6070 100644 --- a/chirp/drivers/retevis_rb15.py +++ b/chirp/drivers/retevis_rb15.py @@ -520,7 +520,7 @@ def get_memory(self, number): val = _mem.bcl rs = RadioSetting("bcl", "BCL", RadioSettingValueList( - LIST_BCL, LIST_BCL[val])) + LIST_BCL, current_index=val)) mem.extra.append(rs) rs = RadioSetting("encode", "Encode", @@ -572,7 +572,7 @@ def get_settings(self): top = RadioSettings(basic, sidekey, voxset) voice = RadioSetting("voice", "Language", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[_settings.voice])) + LIST_VOICE, current_index=_settings.voice)) basic.append(voice) beep = RadioSetting("beep", "Key Beep", @@ -586,13 +586,13 @@ def get_settings(self): save = RadioSetting("save", "Battery Save", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[_settings.save])) + LIST_SAVE, current_index=_settings.save)) basic.append(save) backlight = RadioSetting("backlight", "Backlight", RadioSettingValueList( LIST_BACKLIGHT, - LIST_BACKLIGHT[_settings.backlight])) + current_index=_settings.backlight)) basic.append(backlight) vibrate = RadioSetting("vibrate", "Vibrate", @@ -610,7 +610,7 @@ def get_settings(self): roger = RadioSetting("roger", "Roger Tone", RadioSettingValueList( - LIST_ROGER, LIST_ROGER[_settings.roger])) + LIST_ROGER, current_index=_settings.roger)) basic.append(roger) squelch = RadioSetting("squelch", "Squelch Level", @@ -630,7 +630,7 @@ def apply_tot_listvalue(setting, obj): idx = TOT_VALUES.index(_settings.tot) else: idx = TOT_VALUES.index(0x78) - rs = RadioSettingValueList(TOT_CHOICES, TOT_CHOICES[idx]) + rs = RadioSettingValueList(TOT_CHOICES, current_index=idx) rset = RadioSetting("tot", "Time-out Timer", rs) rset.set_apply_callback(apply_tot_listvalue, _settings.tot) basic.append(rset) @@ -649,7 +649,7 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_settings.skeyus) else: idx = SKEY_VALUES.index(0x01) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skeyus", "Side Key(upper) - Short Press", rs) rset.set_apply_callback(apply_skey_listvalue, _settings.skeyus) sidekey.append(rset) @@ -659,7 +659,7 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_settings.skeyul) else: idx = SKEY_VALUES.index(0x04) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skeyul", "Side Key(upper) - Long Press", rs) rset.set_apply_callback(apply_skey_listvalue, _settings.skeyul) sidekey.append(rset) @@ -669,7 +669,7 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_settings.skeyds) else: idx = SKEY_VALUES.index(0x03) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skeyds", "Side Key(lower) - Short Press", rs) rset.set_apply_callback(apply_skey_listvalue, _settings.skeyds) sidekey.append(rset) @@ -679,7 +679,7 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_settings.skeydl) else: idx = SKEY_VALUES.index(0x14) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skeydl", "Side Key(lower) - Long Press", rs) rset.set_apply_callback(apply_skey_listvalue, _settings.skeydl) sidekey.append(rset) @@ -696,7 +696,7 @@ def apply_skey_listvalue(setting, obj): voxd = RadioSetting("voxd", "VOX Delay (seconde)", RadioSettingValueList( - LIST_VOXD, LIST_VOXD[_settings.voxd])) + LIST_VOXD, current_index=_settings.voxd)) voxset.append(voxd) return top diff --git a/chirp/drivers/retevis_rb17p.py b/chirp/drivers/retevis_rb17p.py index 805f280f..3668352b 100644 --- a/chirp/drivers/retevis_rb17p.py +++ b/chirp/drivers/retevis_rb17p.py @@ -357,7 +357,7 @@ def get_memory(self, number): mem.extra = RadioSettingGroup("Extra", "extra") rs = RadioSetting("bcl", "Busy Channel Lockout", - RadioSettingValueList(BCL, BCL[_mem.bcl])) + RadioSettingValueList(BCL, current_index=_mem.bcl)) mem.extra.append(rs) rs = RadioSetting("compander", "Compander", RadioSettingValueBoolean(_mem.compander)) @@ -457,7 +457,7 @@ def get_settings(self): rs = RadioSetting("workmode", "Work Mode", RadioSettingValueList( WORKMODE_LIST, - WORKMODE_LIST[(_settings.workmode) - 1])) + current_index=(_settings.workmode) - 1)) basic.append(rs) # Menu 04 - Squelch @@ -470,7 +470,7 @@ def get_settings(self): rs = RadioSetting("batterysave", "Battery Save", RadioSettingValueList( BATTERYSAVE_LIST, - BATTERYSAVE_LIST[_settings.batterysave])) + current_index=_settings.batterysave)) basic.append(rs) # Menu 06 - Dual Watch @@ -482,7 +482,7 @@ def get_settings(self): rs = RadioSetting("backlight", "Backlight Duration", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.backlight])) + current_index=_settings.backlight)) basic.append(rs) # Menu 09 - Beep Tone @@ -499,8 +499,7 @@ def get_settings(self): rs = RadioSetting("timeouttimer", "Timeout timer", RadioSettingValueList( TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[ - (_settings.timeouttimer) - 1])) + current_index=(_settings.timeouttimer) - 1)) basic.append(rs) # Menu 12 - Roger Tone @@ -512,7 +511,7 @@ def get_settings(self): rs = RadioSetting("sidekey", "Side Key", RadioSettingValueList( SIDEKEY_LIST, - SIDEKEY_LIST[_settings.sidekey])) + current_index=_settings.sidekey)) basic.append(rs) # Menu 14 - Auto Key Lock @@ -529,28 +528,28 @@ def get_settings(self): rs = RadioSetting("scanmode", "Scan mode", RadioSettingValueList( SCANMODE_LIST, - SCANMODE_LIST[_settings.scanmode])) + current_index=_settings.scanmode)) basic.append(rs) # Alarm Type rs = RadioSetting("alarmtype", "Alarm Type", RadioSettingValueList( ALARMTYPE_LIST, - ALARMTYPE_LIST[_settings.alarmtype])) + current_index=_settings.alarmtype)) basic.append(rs) # VOX Level rs = RadioSetting("voxlevel", "Vox level", RadioSettingValueList( VOXLEVEL_LIST, - VOXLEVEL_LIST[_settings.voxlevel])) + current_index=_settings.voxlevel)) basic.append(rs) # VOX Delay rs = RadioSetting("voxdelay", "Vox delay", RadioSettingValueList( VOXDELAY_LIST, - VOXDELAY_LIST[_settings.voxdelay])) + current_index=_settings.voxdelay)) basic.append(rs) return top diff --git a/chirp/drivers/retevis_rb28.py b/chirp/drivers/retevis_rb28.py index 6c2f5b21..55bbe7bc 100644 --- a/chirp/drivers/retevis_rb28.py +++ b/chirp/drivers/retevis_rb28.py @@ -588,22 +588,22 @@ def get_settings(self): basic.append(rset) rs = RadioSettingValueList(TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot - 1]) + current_index=_settings.tot - 1) rset = RadioSetting("tot", "Time-out timer", rs) basic.append(rset) rs = RadioSettingValueList(VOICE_LIST, - VOICE_LIST[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Prompts", rs) basic.append(rset) rs = RadioSettingValueList(SAVE_LIST, - SAVE_LIST[_settings.savem]) + current_index=_settings.savem) rset = RadioSetting("savem", "Battery Save Mode", rs) basic.append(rset) rs = RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.backlight]) + current_index=_settings.backlight) rset = RadioSetting("backlight", "Back Light", rs) basic.append(rset) @@ -654,12 +654,12 @@ def get_settings(self): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) diff --git a/chirp/drivers/retevis_rt1.py b/chirp/drivers/retevis_rt1.py index 17856e00..f8cb18dd 100644 --- a/chirp/drivers/retevis_rt1.py +++ b/chirp/drivers/retevis_rt1.py @@ -513,7 +513,7 @@ def get_settings(self): rs = RadioSetting("lpt", "Long Press Time[s]", RadioSettingValueList( LIST_LPT, - LIST_LPT[_settings.lpt])) + current_index=_settings.lpt)) basic.append(rs) if _settings.k1shortp > 4: @@ -523,7 +523,7 @@ def get_settings(self): rs = RadioSetting("k1shortp", "Key 1 Short Press", RadioSettingValueList( LIST_SHORT_PRESS, - LIST_SHORT_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k1longp > 6: @@ -533,7 +533,7 @@ def get_settings(self): rs = RadioSetting("k1longp", "Key 1 Long Press", RadioSettingValueList( LIST_LONG_PRESS, - LIST_LONG_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k2shortp > 4: @@ -543,7 +543,7 @@ def get_settings(self): rs = RadioSetting("k2shortp", "Key 2 Short Press", RadioSettingValueList( LIST_SHORT_PRESS, - LIST_SHORT_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k2longp > 6: @@ -553,7 +553,7 @@ def get_settings(self): rs = RadioSetting("k2longp", "Key 2 Long Press", RadioSettingValueList( LIST_LONG_PRESS, - LIST_LONG_PRESS[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("voxc", "VOX Control", @@ -571,7 +571,7 @@ def get_settings(self): rs = RadioSetting("voxd", "VOX Delay Time", RadioSettingValueList( LIST_VOXDELAY, - LIST_VOXDELAY[_settings.voxd])) + current_index=_settings.voxd)) basic.append(rs) rs = RadioSetting("voxi", "VOX Inhibit on Receive", @@ -593,7 +593,7 @@ def get_settings(self): rs = RadioSetting("voice", "Voice Prompts", RadioSettingValueList( LIST_VOICE, - LIST_VOICE[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("tone", "Tone", @@ -615,7 +615,7 @@ def get_settings(self): rs = RadioSetting("tot", "Time-out Timer[s]", RadioSettingValueList( LIST_TIMEOUTTIMER, - LIST_TIMEOUTTIMER[val])) + current_index=val)) basic.append(rs) if _settings.save < 3: @@ -625,13 +625,13 @@ def get_settings(self): rs = RadioSetting("save", "Battery Saver", RadioSettingValueList( LIST_SAVE, - LIST_SAVE[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("ssave", "Super Battery Saver[s]", RadioSettingValueList( LIST_SSAVE, - LIST_SSAVE[_settings.ssave])) + current_index=_settings.ssave)) basic.append(rs) rs = RadioSetting("alarm", "Incept Alarm", @@ -649,7 +649,7 @@ def get_settings(self): rs = RadioSetting("prioritych", "Priority Channel", RadioSettingValueList( LIST_PRIORITYCH, - LIST_PRIORITYCH[val])) + current_index=val)) basic.append(rs) if _settings.scanspeed > 8: @@ -659,7 +659,7 @@ def get_settings(self): rs = RadioSetting("scanspeed", "Scan Speed[ms]", RadioSettingValueList( LIST_SCANSPEED, - LIST_SCANSPEED[val])) + current_index=val)) basic.append(rs) if _settings.scandelay > 27: @@ -669,13 +669,13 @@ def get_settings(self): rs = RadioSetting("scandelay", "Scan Droupout Delay Time[s]", RadioSettingValueList( LIST_SCANDELAY, - LIST_SCANDELAY[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("txtone", "Tx Tone", RadioSettingValueList( LIST_TXTONE, - LIST_TXTONE[_settings.txtone])) + current_index=_settings.txtone)) basic.append(rs) return top diff --git a/chirp/drivers/retevis_rt21.py b/chirp/drivers/retevis_rt21.py index 083b4e7c..0eab1eb9 100644 --- a/chirp/drivers/retevis_rt21.py +++ b/chirp/drivers/retevis_rt21.py @@ -953,7 +953,7 @@ def get_memory(self, number): if self.MODEL == "RT21" or self.MODEL == "RB17A" or \ self.MODEL == "RT29_UHF" or self.MODEL == "RT29_VHF" or \ self.MODEL == "RT21V": - rs = RadioSettingValueList(BCL_LIST, BCL_LIST[_mem.bcl]) + rs = RadioSettingValueList(BCL_LIST, current_index=_mem.bcl) rset = RadioSetting("bcl", "Busy Channel Lockout", rs) mem.extra.append(rset) @@ -962,13 +962,14 @@ def get_memory(self, number): mem.extra.append(rset) if self.MODEL == "RB17A": - rs = RadioSettingValueList(CDCSS_LIST, CDCSS_LIST[_mem.cdcss]) + rs = RadioSettingValueList( + CDCSS_LIST, current_index=_mem.cdcss) rset = RadioSetting("cdcss", "Cdcss Mode", rs) mem.extra.append(rset) if self.MODEL == "RT29_UHF" or self.MODEL == "RT29_VHF": rs = RadioSettingValueList(CDCSS2_LIST, - CDCSS2_LIST[_mem.cdcss]) + current_index=_mem.cdcss) rset = RadioSetting("cdcss", "Cdcss Mode", rs) mem.extra.append(rset) @@ -993,7 +994,7 @@ def get_memory(self, number): if self.MODEL == "AR-63": rs = RadioSettingValueList(SCRAMBLE_LIST, - SCRAMBLE_LIST[_mem.scramble]) + current_index=_mem.scramble) rset = RadioSetting("scramble", "Scramble", rs) mem.extra.append(rset) @@ -1005,7 +1006,7 @@ def get_memory(self, number): _freqhops = self._memobj.freqhops[number - 1] rs = RadioSettingValueList(FUNCTION_LIST, - FUNCTION_LIST[_mem.function]) + current_index=_mem.function) rset = RadioSetting("function", "Function", rs) mem.extra.append(rset) @@ -1014,7 +1015,7 @@ def get_memory(self, number): mem.extra.append(rset) rs = RadioSettingValueList(FREQHOP_LIST, - FREQHOP_LIST[_freqhops.freqhop]) + current_index=_freqhops.freqhop) rset = RadioSetting("freqhop", "Frequency Hop", rs) mem.extra.append(rset) @@ -1036,7 +1037,7 @@ def get_memory(self, number): _freqhops = self._memobj.freqhops[number - 1] rs = RadioSettingValueList(FUNCTION_LIST, - FUNCTION_LIST[_mem.audio]) + current_index=_mem.audio) rset = RadioSetting("audio", "Audio", rs) mem.extra.append(rset) @@ -1045,7 +1046,7 @@ def get_memory(self, number): mem.extra.append(rset) rs = RadioSettingValueList(HOP86_LIST, - HOP86_LIST[_freqhops.freqhop]) + current_index=_freqhops.freqhop) rset = RadioSetting("freqhop", "Frequency Hop", rs) mem.extra.append(rset) @@ -1278,12 +1279,12 @@ def get_settings(self): _keys = self._memobj.keys rs = RadioSettingValueList(TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot]) + current_index=_settings.tot) rset = RadioSetting("tot", "Time-out timer", rs) basic.append(rset) rs = RadioSettingValueList(TOTALERT_LIST, - TOTALERT_LIST[_settings.totalert]) + current_index=_settings.totalert) rset = RadioSetting("totalert", "TOT Pre-alert", rs) basic.append(rset) @@ -1291,13 +1292,14 @@ def get_settings(self): rset = RadioSetting("squelch", "Squelch Level", rs) basic.append(rset) - rs = RadioSettingValueList(VOICE_LIST, VOICE_LIST[_settings.voice]) + rs = RadioSettingValueList( + VOICE_LIST, current_index=_settings.voice) rset = RadioSetting("voice", "Voice Annunciation", rs) basic.append(rset) if self.MODEL == "RB17A": rs = RadioSettingValueList(ALARM_LIST, - ALARM_LIST[_settings.alarm]) + current_index=_settings.alarm) rset = RadioSetting("alarm", "Alarm Type", rs) basic.append(rset) @@ -1313,13 +1315,13 @@ def get_settings(self): rset = RadioSetting("use_vox", "VOX", rs) basic.append(rset) - rs = RadioSettingValueList(VOX_LIST, VOX_LIST[_settings.vox]) + rs = RadioSettingValueList(VOX_LIST, current_index=_settings.vox) rset = RadioSetting("vox", "VOX Gain", rs) basic.append(rset) if self.MODEL == "RT29_UHF" or self.MODEL == "RT29_VHF": rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) @@ -1336,7 +1338,7 @@ def apply_pf1_listvalue(setting, obj): idx = PF1_VALUES.index(_keys.pf1) else: idx = LIST_DTMF_SPECIAL_VALUES.index(0x04) - rs = RadioSettingValueList(PF1_CHOICES, PF1_CHOICES[idx]) + rs = RadioSettingValueList(PF1_CHOICES, current_index=idx) rset = RadioSetting("keys.pf1", "PF1 Key Function", rs) rset.set_apply_callback(apply_pf1_listvalue, _keys.pf1) basic.append(rset) @@ -1355,7 +1357,7 @@ def apply_pf1_17a_listvalue(setting, obj): else: idx = LIST_DTMF_SPECIAL_VALUES.index(0x04) rs = RadioSettingValueList(PF1_17A_CHOICES, - PF1_17A_CHOICES[idx]) + current_index=idx) rset = RadioSetting("keys.pf1", "PF1 Key Function", rs) rset.set_apply_callback(apply_pf1_17a_listvalue, _keys.pf1) basic.append(rset) @@ -1373,7 +1375,7 @@ def apply_topkey_listvalue(setting, obj): idx = TOPKEY_VALUES.index(_keys.topkey) else: idx = TOPKEY_VALUES.index(0x0C) - rs = RadioSettingValueList(TOPKEY_CHOICES, TOPKEY_CHOICES[idx]) + rs = RadioSettingValueList(TOPKEY_CHOICES, current_index=idx) rset = RadioSetting("keys.topkey", "Top Key Function", rs) rset.set_apply_callback(apply_topkey_listvalue, _keys.topkey) basic.append(rset) @@ -1391,7 +1393,7 @@ def apply_pfkey_listvalue(setting, obj): idx = PFKEY_VALUES.index(_keys.pf1) else: idx = PFKEY_VALUES.index(0x04) - rs = RadioSettingValueList(PFKEY_CHOICES, PFKEY_CHOICES[idx]) + rs = RadioSettingValueList(PFKEY_CHOICES, current_index=idx) rset = RadioSetting("keys.pf1", "PF1 Key Function", rs) rset.set_apply_callback(apply_pfkey_listvalue, _keys.pf1) basic.append(rset) @@ -1400,7 +1402,7 @@ def apply_pfkey_listvalue(setting, obj): idx = PFKEY_VALUES.index(_keys.pf2) else: idx = PFKEY_VALUES.index(0x0A) - rs = RadioSettingValueList(PFKEY_CHOICES, PFKEY_CHOICES[idx]) + rs = RadioSettingValueList(PFKEY_CHOICES, current_index=idx) rset = RadioSetting("keys.pf2", "PF2 Key Function", rs) rset.set_apply_callback(apply_pfkey_listvalue, _keys.pf2) basic.append(rset) @@ -1425,18 +1427,18 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot]) + current_index=_settings.tot) rset = RadioSetting("tot", "Time-out timer", rs) basic.append(rset) if self.MODEL == "RT19" or self.MODEL == "RT619": rs = RadioSettingValueList(VOICE_LIST, - VOICE_LIST[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Prompts", rs) basic.append(rset) rs = RadioSettingValueList(BOOTSEL_LIST, - BOOTSEL_LIST[_settings.bootsel]) + current_index=_settings.bootsel) rset = RadioSetting("bootsel", "Boot Select", rs) basic.append(rset) @@ -1449,18 +1451,18 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) if self.MODEL == "AR-63": rs = RadioSettingValueList(VOICE_LIST, - VOICE_LIST[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Prompts", rs) basic.append(rset) @@ -1468,14 +1470,14 @@ def apply_pfkey_listvalue(setting, obj): "RT86", ]: rs = RadioSettingValueList(VOICE_LIST3, - VOICE_LIST3[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Annumciation", rs) basic.append(rset) if self.MODEL == "RB26" or self.MODEL == "RB23" \ or self.MODEL == "RB89": rs = RadioSettingValueList(VOICE_LIST2, - VOICE_LIST2[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Annumciation", rs) basic.append(rset) @@ -1486,7 +1488,7 @@ def apply_pfkey_listvalue(setting, obj): if self.MODEL == "RT86" or self.MODEL == "RB89": rs = RadioSettingValueList(SPECIAL_LIST, - SPECIAL_LIST[_settings.tailmode]) + current_index=_settings.tailmode) rset = RadioSetting("tailmode", "QT/DQT Tail Mode", rs) basic.append(rset) @@ -1509,7 +1511,7 @@ def apply_pfkey_listvalue(setting, obj): if self.MODEL != "AR-63" and self.MODEL != "RT40B": rs = RadioSettingValueList(SAVE_LIST, - SAVE_LIST[_settings.savem]) + current_index=_settings.savem) rset = RadioSetting("savem", "Battery Save Mode", rs) basic.append(rset) @@ -1517,12 +1519,12 @@ def apply_pfkey_listvalue(setting, obj): self.MODEL != "AR-63" and \ self.MODEL != "RT40B": rs = RadioSettingValueList(GAIN_LIST, - GAIN_LIST[_settings.gain]) + current_index=_settings.gain) rset = RadioSetting("gain", "MIC Gain", rs) basic.append(rset) rs = RadioSettingValueList(WARN_LIST, - WARN_LIST[_settings.warn]) + current_index=_settings.warn) rset = RadioSetting("warn", "Warn Mode", rs) basic.append(rset) @@ -1536,12 +1538,12 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) @@ -1552,23 +1554,23 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings3.voxl]) + current_index=_settings3.voxl) rset = RadioSetting("settings3.voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings3.voxd]) + current_index=_settings3.voxd) rset = RadioSetting("settings3.voxd", "Vox Delay", rs) basic.append(rset) if self.MODEL == "RB26": rs = RadioSettingValueList(PFKEY_LIST, - PFKEY_LIST[_settings.pf1]) + current_index=_settings.pf1) rset = RadioSetting("pf1", "PF1 Key Set", rs) basic.append(rset) rs = RadioSettingValueList(PFKEY_LIST, - PFKEY_LIST[_settings.pf2]) + current_index=_settings.pf2) rset = RadioSetting("pf2", "PF2 Key Set", rs) basic.append(rset) elif self.MODEL == "RB23": @@ -1585,7 +1587,7 @@ def apply_pfkey_listvalue(setting, obj): else: idx = PFKEY23_VALUES.index(0x01) rs = RadioSettingValueList(PFKEY23_CHOICES, - PFKEY23_CHOICES[idx]) + current_index=idx) rset = RadioSetting("settings.pf1", "PF1 Key Function", rs) rset.set_apply_callback(apply_pfkey_listvalue, _settings.pf1) @@ -1596,7 +1598,7 @@ def apply_pfkey_listvalue(setting, obj): else: idx = PFKEY23_VALUES.index(0x03) rs = RadioSettingValueList(PFKEY23_CHOICES, - PFKEY23_CHOICES[idx]) + current_index=idx) rset = RadioSetting("settings.pf2", "PF2 Key Function", rs) rset.set_apply_callback(apply_pfkey_listvalue, _settings.pf2) @@ -1612,12 +1614,12 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) @@ -1635,12 +1637,12 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(HOP_LIST, - HOP_LIST[_settings.hop]) + current_index=_settings.hop) rset = RadioSetting("hop", "Hop Mode", rs) basic.append(rset) rs = RadioSettingValueList(TAIL_LIST, - TAIL_LIST[_settings.tailmode]) + current_index=_settings.tailmode) rset = RadioSetting("tailmode", "DCS Tail Mode", rs) basic.append(rset) @@ -1649,23 +1651,23 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) if self.MODEL == "RT40B": rs = RadioSettingValueList(VOICE_LIST, - VOICE_LIST[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Prompts", rs) basic.append(rset) rs = RadioSettingValueList(SAVEM_LIST, - SAVEM_LIST[_settings.savem]) + current_index=_settings.savem) rset = RadioSetting("savem", "Battery Save Mode", rs) basic.append(rset) @@ -1682,34 +1684,34 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) if self.MODEL == "RT86": rs = RadioSettingValueList(PFKEY86_LIST, - PFKEY86_LIST[_settings.pf1]) + current_index=_settings.pf1) rset = RadioSetting("pf1", "PF1 Key Set", rs) basic.append(rset) rs = RadioSettingValueList(PFKEY86_LIST, - PFKEY86_LIST[_settings.pf2]) + current_index=_settings.pf2) rset = RadioSetting("pf2", "PF2 Key Set", rs) basic.append(rset) if self.MODEL == "RB89": rs = RadioSettingValueList(PFKEY89_LIST, - PFKEY89_LIST[_settings.pf1]) + current_index=_settings.pf1) rset = RadioSetting("pf1", "PF1 Key Set", rs) basic.append(rset) rs = RadioSettingValueList(PFKEY89_LIST, - PFKEY89_LIST[_settings.pf2]) + current_index=_settings.pf2) rset = RadioSetting("pf2", "PF2 Key Set", rs) basic.append(rset) @@ -1719,27 +1721,27 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot]) + current_index=_settings.tot) rset = RadioSetting("tot", "Time-out timer", rs) basic.append(rset) rs = RadioSettingValueList(VOICE_LIST2, - VOICE_LIST2[_settings.voice]) + current_index=_settings.voice) rset = RadioSetting("voice", "Voice Annumciation", rs) basic.append(rset) rs = RadioSettingValueList(POT_LIST, - POT_LIST[_settings.pwrontype]) + current_index=_settings.pwrontype) rset = RadioSetting("pwrontype", "Power on Type", rs) basic.append(rset) rs = RadioSettingValueList(SAVE_LIST, - SAVE_LIST[_settings.savem]) + current_index=_settings.savem) rset = RadioSetting("savem", "Battery Save Mode", rs) basic.append(rset) rs = RadioSettingValueList(GAIN_LIST, - GAIN_LIST[_settings.gain]) + current_index=_settings.gain) rset = RadioSetting("gain", "MIC Gain", rs) basic.append(rset) @@ -1768,22 +1770,22 @@ def apply_pfkey_listvalue(setting, obj): basic.append(rset) rs = RadioSettingValueList(VOXL_LIST, - VOXL_LIST[_settings.voxl]) + current_index=_settings.voxl) rset = RadioSetting("voxl", "Vox Level", rs) basic.append(rset) rs = RadioSettingValueList(VOXD_LIST, - VOXD_LIST[_settings.voxd]) + current_index=_settings.voxd) rset = RadioSetting("voxd", "Vox Delay", rs) basic.append(rset) rs = RadioSettingValueList(PFKEY28B_LIST, - PFKEY28B_LIST[_settings.pfkey_lt]) + current_index=_settings.pfkey_lt) rset = RadioSetting("pfkey_lt", "Key Set <", rs) basic.append(rset) rs = RadioSettingValueList(PFKEY28B_LIST, - PFKEY28B_LIST[_settings.pfkey_gt]) + current_index=_settings.pfkey_gt) rset = RadioSetting("pfkey_gt", "Key Set >", rs) basic.append(rset) diff --git a/chirp/drivers/retevis_rt22.py b/chirp/drivers/retevis_rt22.py index 90ce681d..3986edbc 100644 --- a/chirp/drivers/retevis_rt22.py +++ b/chirp/drivers/retevis_rt22.py @@ -593,17 +593,17 @@ def get_settings(self): rs = RadioSetting("tot", "Time-out timer", RadioSettingValueList( TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot])) + current_index=_settings.tot)) basic.append(rs) rs = RadioSetting("voice", "Voice Prompts", RadioSettingValueList( - VOICE_LIST, VOICE_LIST[_settings.voice])) + VOICE_LIST, current_index=_settings.voice)) basic.append(rs) rs = RadioSetting("pf2key", "PF2 Key", RadioSettingValueList( - PF2KEY_LIST, PF2KEY_LIST[_settings.pf2key])) + PF2KEY_LIST, current_index=_settings.pf2key)) basic.append(rs) rs = RadioSetting("vox", "Vox", @@ -612,13 +612,13 @@ def get_settings(self): rs = RadioSetting("voxgain", "VOX Level", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.voxgain])) + VOX_LIST, current_index=_settings.voxgain)) basic.append(rs) rs = RadioSetting("voxdelay", "VOX Delay Time (Old | New)", RadioSettingValueList( VOXDELAY_LIST, - VOXDELAY_LIST[_settings.voxdelay])) + current_index=_settings.voxdelay)) basic.append(rs) rs = RadioSetting("save", "Battery Save", diff --git a/chirp/drivers/retevis_rt23.py b/chirp/drivers/retevis_rt23.py index 66ead720..434aac61 100644 --- a/chirp/drivers/retevis_rt23.py +++ b/chirp/drivers/retevis_rt23.py @@ -538,13 +538,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList( - LIST_PTTID, LIST_PTTID[_mem.pttid])) + LIST_PTTID, current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("signaling", "Optional Signaling", RadioSettingValueList(LIST_SIGNALING, - LIST_SIGNALING[ - _mem.signaling])) + current_index=_mem.signaling)) mem.extra.append(rs) return mem @@ -626,7 +625,7 @@ def get_settings(self): vox = RadioSetting("vox", "VOX Gain", RadioSettingValueList( - LIST_VOX, LIST_VOX[_settings.vox])) + LIST_VOX, current_index=_settings.vox)) basic.append(vox) squelch = RadioSetting("squelch", "Squelch Level", @@ -639,20 +638,21 @@ def get_settings(self): basic.append(relay) tot = RadioSetting("tot", "Time-out timer", RadioSettingValueList( - LIST_TOT, LIST_TOT[_settings.tot])) + LIST_TOT, current_index=_settings.tot)) basic.append(tot) beep = RadioSetting("beep", "Key Beep", RadioSettingValueBoolean(_settings.beep)) basic.append(beep) - color = RadioSetting("color", "Background Color", - RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_settings.color - 1])) + color = RadioSetting( + "color", "Background Color", + RadioSettingValueList( + LIST_COLOR, current_index=_settings.color - 1)) basic.append(color) vot = RadioSetting("vot", "VOX Delay Time", RadioSettingValueList( - LIST_VOT, LIST_VOT[_settings.vot])) + LIST_VOT, current_index=_settings.vot)) basic.append(vot) dwait = RadioSetting("dwait", "Dual Standby", @@ -660,11 +660,11 @@ def get_settings(self): basic.append(dwait) led = RadioSetting("led", "Background Light", RadioSettingValueList( - LIST_LED, LIST_LED[_settings.led])) + LIST_LED, current_index=_settings.led)) basic.append(led) voice = RadioSetting("voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[_settings.voice])) + LIST_VOICE, current_index=_settings.voice)) basic.append(voice) roger = RadioSetting("roger", "Roger Beep", @@ -677,7 +677,7 @@ def get_settings(self): opnset = RadioSetting("opnset", "Open Mode Set", RadioSettingValueList( - LIST_OPNSET, LIST_OPNSET[_settings.opnset])) + LIST_OPNSET, current_index=_settings.opnset)) basic.append(opnset) def _filter(name): @@ -696,7 +696,7 @@ def _filter(name): basic.append(ponmsg) scans = RadioSetting("scans", "Scan Mode", RadioSettingValueList( - LIST_SCANS, LIST_SCANS[_settings.scans])) + LIST_SCANS, current_index=_settings.scans)) basic.append(scans) dw = RadioSetting("dw", "FM Radio Dual Watch", @@ -707,9 +707,10 @@ def _filter(name): RadioSettingValueBoolean(_settings.name)) basic.append(name) - rptrl = RadioSetting("rptrl", "Repeater TX Delay", - RadioSettingValueList(LIST_RPTRL, LIST_RPTRL[ - _settings.rptrl])) + rptrl = RadioSetting( + "rptrl", "Repeater TX Delay", + RadioSettingValueList( + LIST_RPTRL, current_index=_settings.rptrl)) basic.append(rptrl) rptspk = RadioSetting("rptspk", "Repeater Speaker", @@ -722,12 +723,12 @@ def _filter(name): rptmod = RadioSetting("rptmod", "Repeater Mode", RadioSettingValueList( - LIST_RPTMOD, LIST_RPTMOD[_settings.rptmod])) + LIST_RPTMOD, current_index=_settings.rptmod)) basic.append(rptmod) volmod = RadioSetting("volmod", "Volume Mode", RadioSettingValueList( - LIST_VOLMOD, LIST_VOLMOD[_settings.volmod])) + LIST_VOLMOD, current_index=_settings.volmod)) basic.append(volmod) dst = RadioSetting("dst", "DTMF Side Tone", @@ -736,7 +737,7 @@ def _filter(name): txsel = RadioSetting("txsel", "Priority TX Channel", RadioSettingValueList( - LIST_TXSEL, LIST_TXSEL[_settings.txsel])) + LIST_TXSEL, current_index=_settings.txsel)) basic.append(txsel) ste = RadioSetting("ste", "Squelch Tail Eliminate", @@ -750,7 +751,7 @@ def _filter(name): val = _settings.pf1 pf1 = RadioSetting("pf1", "PF1 Key", RadioSettingValueList( - LIST_PFKEY, LIST_PFKEY[val])) + LIST_PFKEY, current_index=val)) advanced.append(pf1) if _settings.pf2 > 0x0A: @@ -759,7 +760,7 @@ def _filter(name): val = _settings.pf2 pf2 = RadioSetting("pf2", "PF2 Key", RadioSettingValueList( - LIST_PFKEY, LIST_PFKEY[val])) + LIST_PFKEY, current_index=val)) advanced.append(pf2) # other @@ -788,14 +789,16 @@ def _filter(name): other.append(rs) # work mode - vfomr_a = RadioSetting("vfomr_a", "Display Mode A", - RadioSettingValueList( - LIST_VFOMR, LIST_VFOMR[_settings.vfomr_a])) + vfomr_a = RadioSetting( + "vfomr_a", "Display Mode A", + RadioSettingValueList( + LIST_VFOMR, current_index=_settings.vfomr_a)) workmode.append(vfomr_a) - vfomr_b = RadioSetting("vfomr_b", "Display Mode B", - RadioSettingValueList( - LIST_VFOMR, LIST_VFOMR[_settings.vfomr_b])) + vfomr_b = RadioSetting( + "vfomr_b", "Display Mode B", + RadioSettingValueList( + LIST_VFOMR, current_index=_settings.vfomr_b)) workmode.append(vfomr_b) mrcha = RadioSetting("mrcha", "Channel # A", @@ -809,10 +812,10 @@ def _filter(name): workmode.append(mrchb) # fm radio - vfomr_fm = RadioSetting("vfomr_fm", "FM Radio Display Mode", - RadioSettingValueList( - LIST_VFOMRFM, LIST_VFOMRFM[ - _settings.vfomr_fm])) + vfomr_fm = RadioSetting( + "vfomr_fm", "FM Radio Display Mode", + RadioSettingValueList( + LIST_VFOMRFM, current_index=_settings.vfomr_fm)) fmradio.append(vfomr_fm) fmch = RadioSetting("fmch", "FM Radio Channel #", diff --git a/chirp/drivers/retevis_rt26.py b/chirp/drivers/retevis_rt26.py index 5633ec25..938bda12 100644 --- a/chirp/drivers/retevis_rt26.py +++ b/chirp/drivers/retevis_rt26.py @@ -476,7 +476,7 @@ def get_memory(self, number): val = 3 - _mem.pttid rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList( - LIST_PTTID, LIST_PTTID[val])) + LIST_PTTID, current_index=val)) mem.extra.append(rs) return mem @@ -568,7 +568,7 @@ def get_settings(self): rs = RadioSetting("k1shortp", "Key 1 Short Press", RadioSettingValueList( LIST_SHORT_PRESS, - LIST_SHORT_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k1longp > 5: @@ -578,7 +578,7 @@ def get_settings(self): rs = RadioSetting("k1longp", "Key 1 Long Press", RadioSettingValueList( LIST_LONG_PRESS, - LIST_LONG_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k2shortp > 5: @@ -588,7 +588,7 @@ def get_settings(self): rs = RadioSetting("k2shortp", "Key 2 Short Press", RadioSettingValueList( LIST_SHORT_PRESS, - LIST_SHORT_PRESS[val])) + current_index=val)) basic.append(rs) if _settings.k2longp > 5: @@ -598,7 +598,7 @@ def get_settings(self): rs = RadioSetting("k2longp", "Key 2 Long Press", RadioSettingValueList( LIST_LONG_PRESS, - LIST_LONG_PRESS[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("vox", "VOX", @@ -616,7 +616,7 @@ def get_settings(self): rs = RadioSetting("voxd", "VOX Delay Time", RadioSettingValueList( LIST_VOXDELAY, - LIST_VOXDELAY[_settings.voxd])) + current_index=_settings.voxd)) basic.append(rs) rs = RadioSetting("voxi", "VOX Inhibit on Receive", @@ -638,7 +638,7 @@ def get_settings(self): rs = RadioSetting("voice", "Voice Prompts", RadioSettingValueList( LIST_VOICE, - LIST_VOICE[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("tone", "Tone", @@ -660,7 +660,7 @@ def get_settings(self): rs = RadioSetting("tot", "Time-out Timer[s]", RadioSettingValueList( LIST_TIMEOUTTIMER, - LIST_TIMEOUTTIMER[val])) + current_index=val)) basic.append(rs) if _settings.save < 3: @@ -670,13 +670,13 @@ def get_settings(self): rs = RadioSetting("save", "Battery Saver", RadioSettingValueList( LIST_SAVE, - LIST_SAVE[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("ssave", "Super Battery Saver[s]", RadioSettingValueList( LIST_SSAVE, - LIST_SSAVE[_settings.ssave])) + current_index=_settings.ssave)) basic.append(rs) rs = RadioSetting("fmradio", "Broadcast FM", @@ -690,7 +690,7 @@ def get_settings(self): rs = RadioSetting("scanspeed", "Scan Speed[ms]", RadioSettingValueList( LIST_SCANSPEED, - LIST_SCANSPEED[val])) + current_index=val)) basic.append(rs) if _settings.scandelay > 27: @@ -700,7 +700,7 @@ def get_settings(self): rs = RadioSetting("scandelay", "Scan Droupout Delay Time[s]", RadioSettingValueList( LIST_SCANDELAY, - LIST_SCANDELAY[val])) + current_index=val)) basic.append(rs) if _mem.dtmf.dtmfspd > 11: @@ -718,7 +718,7 @@ def get_settings(self): rs = RadioSetting("dtmf.digtime", "1st Digit Time[ms]", RadioSettingValueList( LIST_DIGTIME, - LIST_DIGTIME[val])) + current_index=val)) dtmf.append(rs) if _mem.dtmf.digdelay > 9: @@ -728,19 +728,19 @@ def get_settings(self): rs = RadioSetting("dtmf.digdelay", "1st Digit Delay[ms]", RadioSettingValueList( LIST_DIGDELAY, - LIST_DIGDELAY[val])) + current_index=val)) dtmf.append(rs) rs = RadioSetting("dtmf.starhash", "* and # Time[ms]", RadioSettingValueList( LIST_STARHASH, - LIST_STARHASH[_mem.dtmf.starhash])) + current_index=_mem.dtmf.starhash)) dtmf.append(rs) rs = RadioSetting("dtmf.codespace", "Code Space Time[ms]", RadioSettingValueList( LIST_CODESPACE, - LIST_CODESPACE[_mem.dtmf.codespace])) + current_index=_mem.dtmf.codespace)) dtmf.append(rs) rs = RadioSetting("dtmf.sidetone", "DTMF Sidetone", @@ -784,7 +784,7 @@ def _filter(name): rs = RadioSetting("dtmf.groupcode", "Group Code", RadioSettingValueList( LIST_GROUPCODE, - LIST_GROUPCODE[val])) + current_index=val)) dtmf.append(rs) if _mem.dtmf.resettime > 60: @@ -794,7 +794,7 @@ def _filter(name): rs = RadioSetting("dtmf.resettime", "Auto Reset Time[s]", RadioSettingValueList( LIST_RESETTIME, - LIST_RESETTIME[_mem.dtmf.resettime])) + current_index=_mem.dtmf.resettime)) dtmf.append(rs) rs = RadioSetting("dtmf.txdecode", "TX Decode", @@ -804,7 +804,7 @@ def _filter(name): rs = RadioSetting("dtmf.decodeto", "Decode Time Out[ms]", RadioSettingValueList( LIST_DECODETO, - LIST_DECODETO[_mem.dtmf.decodeto])) + current_index=_mem.dtmf.decodeto)) dtmf.append(rs) rs = RadioSetting("dtmf.decodetone", "Decode Tone", @@ -818,7 +818,7 @@ def _filter(name): rs = RadioSetting("dtmf.stuntype", "Stun Type", RadioSettingValueList( LIST_STUNTYPE, - LIST_STUNTYPE[_mem.dtmf.stuntype])) + current_index=_mem.dtmf.stuntype)) dtmf.append(rs) # setup stun entry diff --git a/chirp/drivers/retevis_rt76p.py b/chirp/drivers/retevis_rt76p.py index 06ecd42e..30029b75 100644 --- a/chirp/drivers/retevis_rt76p.py +++ b/chirp/drivers/retevis_rt76p.py @@ -508,12 +508,12 @@ def get_memory(self, number): mem.extra.append(rset) # PTT-ID - rs = RadioSettingValueList(PTTID_LIST, PTTID_LIST[_mem.pttid]) + rs = RadioSettingValueList(PTTID_LIST, current_index=_mem.pttid) rset = RadioSetting("pttid", "PTT ID", rs) mem.extra.append(rset) # Signal (DTMF Encoder Group #) - rs = RadioSettingValueList(PTTIDCODE_LIST, PTTIDCODE_LIST[_mem.scode]) + rs = RadioSettingValueList(PTTIDCODE_LIST, current_index=_mem.scode) rset = RadioSetting("scode", "PTT ID Code", rs) mem.extra.append(rset) @@ -646,7 +646,7 @@ def get_settings(self): basic.append(rset) # Menu 04: Vox Level (VOX) - rs = RadioSettingValueList(OFF1TO10_LIST, OFF1TO10_LIST[_settings.vox]) + rs = RadioSettingValueList(OFF1TO10_LIST, current_index=_settings.vox) rset = RadioSetting("vox", "VOX Level", rs) basic.append(rset) @@ -654,7 +654,7 @@ def get_settings(self): # Menu 06: Backlight (Auto Backlight) rs = RadioSettingValueList(OFF1TO10_LIST, - OFF1TO10_LIST[_settings.abr]) + current_index=_settings.abr) rset = RadioSetting("abr", "Backlight Time-out", rs) basic.append(rset) @@ -675,7 +675,7 @@ def get_settings(self): # Menu 10: Tx over time (Time Out) rs = RadioSettingValueList(TIMEOUTTIMER_LIST, - TIMEOUTTIMER_LIST[_settings.tot - 1]) + current_index=_settings.tot - 1) rset = RadioSetting("tot", "Time-out Timer", rs) basic.append(rset) @@ -686,19 +686,19 @@ def get_settings(self): # Menu 15: Voice Compand # Menu 16: DTMFST (DTMF ST) - rs = RadioSettingValueList(DTMFST_LIST, DTMFST_LIST[_settings.dtmfst]) + rs = RadioSettingValueList(DTMFST_LIST, current_index=_settings.dtmfst) rset = RadioSetting("dtmfst", "DTMF Side Tone", rs) basic.append(rset) # Mneu 17: R-TONE (Tone) - rs = RadioSettingValueList(TONE_LIST, TONE_LIST[_settings.tone]) + rs = RadioSettingValueList(TONE_LIST, current_index=_settings.tone) rset = RadioSetting("tone", "Tone-burst Frequency", rs) basic.append(rset) # Menu 18: S-CODE # Menu 19: Scan Mode - rs = RadioSettingValueList(SCMODE_LIST, SCMODE_LIST[_settings.scmode]) + rs = RadioSettingValueList(SCMODE_LIST, current_index=_settings.scmode) rset = RadioSetting("scmode", "Scan Resume Method", rs) basic.append(rset) @@ -706,12 +706,12 @@ def get_settings(self): # Menu 21: PTT-ID # Menu 22: MDF-A (Channle_A Display) - rs = RadioSettingValueList(MDF_LIST, MDF_LIST[_settings.mdfa]) + rs = RadioSettingValueList(MDF_LIST, current_index=_settings.mdfa) rset = RadioSetting("mdfa", "Memory Display Format A", rs) basic.append(rset) # Menu 23: MDF-B (Channle_B Display) - rs = RadioSettingValueList(MDF_LIST, MDF_LIST[_settings.mdfb]) + rs = RadioSettingValueList(MDF_LIST, current_index=_settings.mdfb) rset = RadioSetting("mdfb", "Memory Display Format B", rs) basic.append(rset) @@ -724,24 +724,24 @@ def get_settings(self): # Menu 26: WT-LED (Wait Backlight) rs = RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.wtled]) + current_index=_settings.wtled) rset = RadioSetting("wtled", "Wait Backlight Color", rs) basic.append(rset) # Menu 27: RX-LED (Rx Backlight) rs = RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.rxled]) + current_index=_settings.rxled) rset = RadioSetting("rxled", "RX Backlight Color", rs) basic.append(rset) # Menu 28: TX-LED (Tx Backlight) rs = RadioSettingValueList(BACKLIGHT_LIST, - BACKLIGHT_LIST[_settings.txled]) + current_index=_settings.txled) rset = RadioSetting("txled", "TX Backlight Color", rs) basic.append(rset) # Menu 29: Alarm Mode - rs = RadioSettingValueList(ALMOD_LIST, ALMOD_LIST[_settings.almod]) + rs = RadioSettingValueList(ALMOD_LIST, current_index=_settings.almod) rset = RadioSetting("almod", "Alarm Mode", rs) basic.append(rset) @@ -757,13 +757,13 @@ def get_settings(self): # Menu 32: Language rs = RadioSettingValueList(LANGUAGE_LIST, - LANGUAGE_LIST[_settings.language]) + current_index=_settings.language) rset = RadioSetting("language", "Language", rs) basic.append(rset) # Menu 33: OPENMGS (Pwr On Msg) rs = RadioSettingValueList(PWRONMSG_LIST, - PWRONMSG_LIST[_settings.pwronmsg]) + current_index=_settings.pwronmsg) rset = RadioSetting("pwronmsg", "Power On Message", rs) basic.append(rset) @@ -785,7 +785,7 @@ def get_settings(self): # Work Mode rs = RadioSettingValueList(WORKMODE_LIST, - WORKMODE_LIST[_settings.workmode]) + current_index=_settings.workmode) rset = RadioSetting("workmode", "Work Mode", rs) advanced.append(rset) @@ -806,7 +806,7 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_skey.shortp) else: idx = SKEY_VALUES.index(0x0C) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skey.shortp", "Side Key (Short Press)", rs) rset.set_apply_callback(apply_skey_listvalue, _skey.shortp) advanced.append(rset) @@ -816,18 +816,18 @@ def apply_skey_listvalue(setting, obj): idx = SKEY_VALUES.index(_skey.longp) else: idx = SKEY_VALUES.index(0x0C) - rs = RadioSettingValueList(SKEY_CHOICES, SKEY_CHOICES[idx]) + rs = RadioSettingValueList(SKEY_CHOICES, current_index=idx) rset = RadioSetting("skey.longp", "Side Key (Long Press)", rs) rset.set_apply_callback(apply_skey_listvalue, _skey.longp) advanced.append(rset) # Pass Repeat Noise - rs = RadioSettingValueList(RPSTE_LIST, RPSTE_LIST[_settings.rpste]) + rs = RadioSettingValueList(RPSTE_LIST, current_index=_settings.rpste) rset = RadioSetting("rpste", "Squelch Tail Eliminate (repeater)", rs) advanced.append(rset) # Pass Repeat Noise - rs = RadioSettingValueList(RPSTE_LIST, RPSTE_LIST[_settings.rptrl]) + rs = RadioSettingValueList(RPSTE_LIST, current_index=_settings.rptrl) rset = RadioSetting("rptrl", "STE Repeater Delay", rs) advanced.append(rset) @@ -847,7 +847,7 @@ def apply_skey_listvalue(setting, obj): advanced.append(rset) # Tx Under TDR Start - rs = RadioSettingValueList(TDRAB_LIST, TDRAB_LIST[_settings.tdrab]) + rs = RadioSettingValueList(TDRAB_LIST, current_index=_settings.tdrab) rset = RadioSetting("tdrab", "Dual Standby TX Priority", rs) advanced.append(rset) @@ -922,7 +922,7 @@ def apply_code(setting, obj, length): val = _dtmf.dtmfon rs = RadioSetting("dtmf.dtmfon", "DTMF Speed (on)", RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[val])) + current_index=val)) dtmf.append(rs) if _dtmf.dtmfoff > 0xC3: @@ -931,7 +931,7 @@ def apply_code(setting, obj, length): val = _dtmf.dtmfoff rs = RadioSetting("dtmf.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[val])) + current_index=val)) dtmf.append(rs) return group diff --git a/chirp/drivers/retevis_rt87.py b/chirp/drivers/retevis_rt87.py index 4dc443f0..a1d476fb 100644 --- a/chirp/drivers/retevis_rt87.py +++ b/chirp/drivers/retevis_rt87.py @@ -519,11 +519,11 @@ def get_memory(self, number): # Extra mem.extra = RadioSettingGroup("extra", "Extra") - rs = RadioSettingValueList(LIST_BCL, LIST_BCL[_mem.bcl]) + rs = RadioSettingValueList(LIST_BCL, current_index=_mem.bcl) rset = RadioSetting("bcl", "BCL", rs) mem.extra.append(rset) - rs = RadioSettingValueList(LIST_PTTID, LIST_PTTID[_mem.pttid]) + rs = RadioSettingValueList(LIST_PTTID, current_index=_mem.pttid) rset = RadioSetting("pttid", "PTT-ID", rs) mem.extra.append(rset) @@ -531,7 +531,7 @@ def get_memory(self, number): rset = RadioSetting("vox", "VOX", rs) mem.extra.append(rset) - rs = RadioSettingValueList(LIST_OPTION, LIST_OPTION[_mem.option]) + rs = RadioSettingValueList(LIST_OPTION, current_index=_mem.option) rset = RadioSetting("option", "Option", rs) mem.extra.append(rset) @@ -596,7 +596,7 @@ def _get_settings(self): # Menu 02: TX.SEL aka PRI rs = RadioSettingValueList(LIST_TXSEL, - LIST_TXSEL[_settings.txsel]) + current_index=_settings.txsel) rset = RadioSetting("txsel", "Priority Transmit", rs) basic.append(rset) @@ -607,7 +607,7 @@ def _get_settings(self): # Function Setting: VOX Delay Time rs = RadioSettingValueList(LIST_VOXDELAYTIME, - LIST_VOXDELAYTIME[_settings.voxdelaytime]) + current_index=_settings.voxdelaytime) rset = RadioSetting("voxdelaytime", "VOX Delay Time", rs) basic.append(rset) @@ -636,14 +636,14 @@ def apply_lamp_listvalue(setting, obj): idx = LED_VALUES.index(_settings.lamp) else: idx = LED_VALUES.index(0x04) - rs = RadioSettingValueList(LED_CHOICES, LED_CHOICES[idx]) + rs = RadioSettingValueList(LED_CHOICES, current_index=idx) rset = RadioSetting("settings.lamp", "Backlight Time", rs) rset.set_apply_callback(apply_lamp_listvalue, _settings.lamp) basic.append(rset) # Menu 08: BRIGHT (Backlight Brightness) rs = RadioSettingValueList(LIST_BRIGHTNESS, - LIST_BRIGHTNESS[_settings.brightness]) + current_index=_settings.brightness) rset = RadioSetting("brightness", "Backlight Brightness", rs) basic.append(rset) @@ -659,7 +659,7 @@ def apply_lamp_listvalue(setting, obj): # Menu 11: TOT (Transmitter Time-out Timer) rs = RadioSettingValueList(LIST_TOT, - LIST_TOT[_settings.tot]) + current_index=_settings.tot) rset = RadioSetting("tot", "Time-Out Timer", rs) basic.append(rset) @@ -683,7 +683,7 @@ def apply_lamp_listvalue(setting, obj): # Menu 17: SCN-REV (Scan Mode) rs = RadioSettingValueList(LIST_SCNREV, - LIST_SCNREV[_settings.scanmode]) + current_index=_settings.scanmode) rset = RadioSetting("scanmode", "Scan Mode", rs) basic.append(rset) @@ -699,25 +699,25 @@ def apply_lamp_listvalue(setting, obj): # Menu 20: BATT SHOW (Battery Display Method) rs = RadioSettingValueList(LIST_BATTERY, - LIST_BATTERY[_settings.batterydis]) + current_index=_settings.batterydis) rset = RadioSetting("batterydis", "Battery Display Method", rs) basic.append(rset) # Menu 21: PF1 (Side-Key 1) rs = RadioSettingValueList(LIST_SIDEKEY, - LIST_SIDEKEY[_settings.pf1]) + current_index=_settings.pf1) rset = RadioSetting("pf1", "Side Key Function 1", rs) basic.append(rset) # Menu 22: PF2 (Side-Key 2) rs = RadioSettingValueList(LIST_SIDEKEY, - LIST_SIDEKEY[_settings.pf2]) + current_index=_settings.pf2) rset = RadioSetting("pf2", "Side Key Function 2", rs) basic.append(rset) # Menu 23: OPN.SET (Power-On Display) rs = RadioSettingValueList(LIST_POWERON, - LIST_POWERON[_settings.msgmode]) + current_index=_settings.msgmode) rset = RadioSetting("msgmode", "Power-On Display Method", rs) basic.append(rset) @@ -825,14 +825,14 @@ def apply_delay_listvalue(setting, obj): idx = DELAY_VALUES.index(_optsig.delay) else: idx = DELAY_VALUES.index(30) - rs = RadioSettingValueList(DELAY_CHOICES, DELAY_CHOICES[idx]) + rs = RadioSettingValueList(DELAY_CHOICES, current_index=idx) rset = RadioSetting("optsig.delay", "Digit Delay", rs) rset.set_apply_callback(apply_delay_listvalue, _optsig.delay) common.append(rset) # Common Set: Auto Reset Timer[s] rs = RadioSettingValueList(LIST_RESET, - LIST_RESET[_optsig.autoresettimer]) + current_index=_optsig.autoresettimer) rset = RadioSetting("optsig.autoresettimer", "Auto Reset Timer", rs) common.append(rset) @@ -854,7 +854,7 @@ def apply_stun_listvalue(setting, obj): idx = STUN_VALUES.index(_settings.stunmode) else: idx = STUN_VALUES.index(0xFF) - rs = RadioSettingValueList(STUN_CHOICES, STUN_CHOICES[idx]) + rs = RadioSettingValueList(STUN_CHOICES, current_index=idx) rset = RadioSetting("settings.stunmode", "Stun Mode", rs) rset.set_apply_callback(apply_stun_listvalue, _settings.stunmode) common.append(rset) @@ -938,13 +938,13 @@ def apply_code(setting, obj): # DTMF: DTMF Signaling rs = RadioSettingValueList(LIST_DTMFSIG, - LIST_DTMFSIG[_settings.dtmfsig]) + current_index=_settings.dtmfsig) rset = RadioSetting("dtmfsig", "DTMF Signaling", rs) dtmf.append(rset) # DTMF: Intermediate Code rs = RadioSettingValueList(LIST_INTCODE, - LIST_INTCODE[_optsig.intcode]) + current_index=_optsig.intcode) rset = RadioSetting("optsig.intcode", "Intermediate Code", rs) dtmf.append(rset) @@ -961,14 +961,14 @@ def apply_group_listvalue(setting, obj): idx = GROUP_VALUES.index(_optsig.groupcode) else: idx = GROUP_VALUES.index(0x00) - rs = RadioSettingValueList(GROUP_CHOICES, GROUP_CHOICES[idx]) + rs = RadioSettingValueList(GROUP_CHOICES, current_index=idx) rset = RadioSetting("optsig.groupcode", "Group Code", rs) rset.set_apply_callback(apply_group_listvalue, _optsig.groupcode) dtmf.append(rset) # DTMF: DTMF Code Length rs = RadioSettingValueList(LIST_DTMFLEN, - LIST_DTMFLEN[_optsig.dtmflen - 3]) + current_index=_optsig.dtmflen - 3) rset = RadioSetting("optsig.dtmflen", "DTMF Code Length", rs) dtmf.append(rset) diff --git a/chirp/drivers/retevis_rt98.py b/chirp/drivers/retevis_rt98.py index e02c4491..1b30b01f 100644 --- a/chirp/drivers/retevis_rt98.py +++ b/chirp/drivers/retevis_rt98.py @@ -1158,13 +1158,13 @@ def _get_settings(self): # Function Setup # MODE SET rs = RadioSettingValueList(LIST_DISPLAY_MODE, - LIST_DISPLAY_MODE[_settings.display_mode]) + current_index=_settings.display_mode) rset = RadioSetting("display_mode", "Display Mode", rs) function.append(rset) if "AT-779" in str(_embedded.radio_type): rs = RadioSettingValueList(LIST_VFOMR, - LIST_VFOMR[_settings3.vfomr]) + current_index=_settings3.vfomr) rset = RadioSetting("settings3.vfomr", "VFO/MR", rs) function.append(rset) @@ -1201,38 +1201,40 @@ def _filter(name): # ON/OFF SET rs = RadioSettingValueList(LIST_APO, - LIST_APO[_settings.auto_power_off]) + current_index=_settings.auto_power_off) rset = RadioSetting("auto_power_off", "Auto Power Off", rs) function.append(rset) - rs = RadioSettingValueList(LIST_AOP, LIST_AOP[_settings.auto_power_on]) + rs = RadioSettingValueList( + LIST_AOP, current_index=_settings.auto_power_on) rset = RadioSetting("auto_power_on", "Power On Method", rs) function.append(rset) # STE SET rs = RadioSettingValueList(LIST_STE_FREQ, - LIST_STE_FREQ[_settings.ste_frequency]) + current_index=_settings.ste_frequency) rset = RadioSetting("ste_frequency", "STE Frequency", rs) function.append(rset) rs = RadioSettingValueList(LIST_STE_TYPE, - LIST_STE_TYPE[_settings.ste_type]) + current_index=_settings.ste_type) rset = RadioSetting("ste_type", "STE Type", rs) function.append(rset) # FUNCTION SET - rs = RadioSettingValueList(LIST_STEP, LIST_STEP[_settings.tuning_step]) + rs = RadioSettingValueList( + LIST_STEP, current_index=_settings.tuning_step) rset = RadioSetting("tuning_step", "Tuning Step", rs) function.append(rset) rs = RadioSettingValueList(LIST_SQUELCH, - LIST_SQUELCH[_settings.squelch]) + current_index=_settings.squelch) rset = RadioSetting("squelch", "Squelch Level", rs) function.append(rset) if "AT-779" in str(_embedded.radio_type): rs = RadioSettingValueList(LIST_SCAN, - LIST_SCAN[_settings.scan_resume]) + current_index=_settings.scan_resume) rset = RadioSetting("scan_resume", "Frequency Scan", rs) function.append(rset) @@ -1241,7 +1243,7 @@ def _filter(name): function.append(rset) rs = RadioSettingValueList(LIST_TIMEOUT, - LIST_TIMEOUT[_settings.timeout_timer]) + current_index=_settings.timeout_timer) rset = RadioSetting("timeout_timer", "Timeout Timer", rs) function.append(rset) @@ -1271,7 +1273,7 @@ def _filter(name): scanning.append(rset) rs = RadioSettingValueList(LIST_PRIORITY_CH, - LIST_PRIORITY_CH[_settings2.priority_ch]) + current_index=_settings2.priority_ch) rset = RadioSetting("settings2.priority_ch", "Priority Channel", rs) scanning.append(rset) @@ -1284,30 +1286,30 @@ def _filter(name): scanning.append(rset) rs = RadioSettingValueList(LIST_REVERT_CH, - LIST_REVERT_CH[_settings2.revert_ch]) + current_index=_settings2.revert_ch) rset = RadioSetting("settings2.revert_ch", "Revert Channel", rs) scanning.append(rset) rs = RadioSettingValueList(LIST_TIME46, - LIST_TIME46[_settings2.look_back_time_a]) + current_index=_settings2.look_back_time_a) rset = RadioSetting("settings2.look_back_time_a", "Look Back Time A", rs) scanning.append(rset) rs = RadioSettingValueList(LIST_TIME46, - LIST_TIME46[_settings2.look_back_time_b]) + current_index=_settings2.look_back_time_b) rset = RadioSetting("settings2.look_back_time_b", "Look Back Time B", rs) scanning.append(rset) rs = RadioSettingValueList(LIST_TIME50, - LIST_TIME50[_settings2.dropout_delay_time]) + current_index=_settings2.dropout_delay_time) rset = RadioSetting("settings2.dropout_delay_time", "Dropout Delay Time", rs) scanning.append(rset) rs = RadioSettingValueList(LIST_TIME50, - LIST_TIME50[_settings2.dwell_time]) + current_index=_settings2.dwell_time) rset = RadioSetting("settings2.dwell_time", "Dwell Time", rs) scanning.append(rset) @@ -1326,7 +1328,7 @@ def _filter(name): options = LIST_RT98W_MODES else: options = LIST_RT98U_MODES - rs = RadioSettingValueList(options, options[_embedded.mode]) + rs = RadioSettingValueList(options, current_index=_embedded.mode) rs.set_mutable(False) rset = RadioSetting("embedded_msg.mode", "Mode", rs) embedded.append(rset) @@ -1338,7 +1340,7 @@ def _filter(name): options = LIST_RT98W_FREQS else: options = LIST_RT98U_FREQS - rs = RadioSettingValueList(options, options[_settings3.bandlimit]) + rs = RadioSettingValueList(options, current_index=_settings3.bandlimit) rs.set_mutable(False) rset = RadioSetting("settings3.bandlimit", "Frequency", rs) embedded.append(rset) diff --git a/chirp/drivers/tdh8.py b/chirp/drivers/tdh8.py index f89ea016..cb88219b 100644 --- a/chirp/drivers/tdh8.py +++ b/chirp/drivers/tdh8.py @@ -1519,7 +1519,7 @@ def _get_settings(self): if self.MODEL in H8_LIST: rs = RadioSetting("stopkey1", "SHORT_KEY_TOP", RadioSettingValueList(SHORT_KEY_LIST, - SHORT_KEY_LIST[0])) + current_index=0)) basic.append(rs) rs = RadioSetting("ltopkey2", "LONG_KEY_TOP", @@ -1736,18 +1736,19 @@ def _filter(name): rs = RadioSetting("bcl", "A Busy Lock", RadioSettingValueList( - A_BUSYLOCK, A_BUSYLOCK[_vfoa.bcl])) + A_BUSYLOCK, current_index=_vfoa.bcl)) abblock.append(rs) rs = RadioSetting("specialqta", "A Special QT/DQT", RadioSettingValueList( A_SPEC_QTDQT, - A_SPEC_QTDQT[_vfoa.specialqta])) + current_index=_vfoa.specialqta)) abblock.append(rs) - rs = RadioSetting("aworkmode", "A Work Mode", - RadioSettingValueList( - A_WORKMODE, A_WORKMODE[_settings.aworkmode])) + rs = RadioSetting( + "aworkmode", "A Work Mode", + RadioSettingValueList( + A_WORKMODE, current_index=_settings.aworkmode)) abblock.append(rs) # B channel @@ -1783,7 +1784,7 @@ def _filter(name): rs = RadioSetting("offsetb", "B Offset", RadioSettingValueList( - B_OFFSET, B_OFFSET[_vfob.offsetb])) + B_OFFSET, current_index=_vfob.offsetb)) abblock.append(rs) try: @@ -1799,23 +1800,24 @@ def _filter(name): rs = RadioSetting("wideb", "B Band", RadioSettingValueList( - B_BAND, B_BAND[_vfob.wideb])) + B_BAND, current_index=_vfob.wideb)) abblock.append(rs) rs = RadioSetting("bclb", "B Busy Lock", RadioSettingValueList( - B_BUSYLOCK, B_BUSYLOCK[_vfob.bclb])) + B_BUSYLOCK, current_index=_vfob.bclb)) abblock.append(rs) rs = RadioSetting("specialqtb", "B Special QT/DQT", RadioSettingValueList( B_SPEC_QTDQT, - B_SPEC_QTDQT[_vfob.specialqtb])) + current_index=_vfob.specialqtb)) abblock.append(rs) - rs = RadioSetting("bworkmode", "B Work Mode", - RadioSettingValueList( - B_WORKMODE, B_WORKMODE[_settings.bworkmode])) + rs = RadioSetting( + "bworkmode", "B Work Mode", + RadioSettingValueList( + B_WORKMODE, current_index=_settings.bworkmode)) abblock.append(rs) group.append(fmmode) diff --git a/chirp/drivers/tdxone_tdq8a.py b/chirp/drivers/tdxone_tdq8a.py index c55ff79b..75439616 100644 --- a/chirp/drivers/tdxone_tdq8a.py +++ b/chirp/drivers/tdxone_tdq8a.py @@ -618,7 +618,7 @@ def get_memory(self, number): rs = RadioSetting("dtmf", "DTMF", RadioSettingValueList(LIST_DTMF, - LIST_DTMF[_mem.dtmf])) + current_index=_mem.dtmf)) mem.extra.append(rs) rs = RadioSetting("bcl", "BCL", @@ -731,7 +731,7 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -740,7 +740,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "VOX", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.autolk", "Automatic Key Lock", @@ -753,7 +753,7 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) if _mem.settings.toa > 0x0A: @@ -762,7 +762,7 @@ def get_settings(self): val = _mem.settings.toa rs = RadioSetting("settings.toa", "Time-out Pre-Alert", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.timeout > 0x28: @@ -771,42 +771,46 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) - rs = RadioSetting("settings.roger", "Roger Beep", - RadioSettingValueList(LIST_ROGER, LIST_ROGER[ - _mem.settings.roger])) + rs = RadioSetting( + "settings.roger", "Roger Beep", + RadioSettingValueList( + LIST_ROGER, current_index=_mem.settings.roger)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) - rs = RadioSetting("settings.pf1", "PF1 Key Assignment", - RadioSettingValueList(LIST_PF1, LIST_PF1[ - _mem.settings.pf1])) + rs = RadioSetting( + "settings.pf1", "PF1 Key Assignment", + RadioSettingValueList( + LIST_PF1, current_index=_mem.settings.pf1)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch(TDR)", @@ -823,23 +827,25 @@ def get_settings(self): val = _mem.settings.pttdly rs = RadioSetting("settings.pttdly", "PTT ID Delay", RadioSettingValueList( - LIST_OFF1TO30, LIST_OFF1TO30[val])) + LIST_OFF1TO30, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, - LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.dw", "DW", @@ -847,14 +853,16 @@ def get_settings(self): basic.append(rs) # Advanced settings - rs = RadioSetting("settings.prioritych", "Priority Channel", - RadioSettingValueList(LIST_PRIORITY, LIST_PRIORITY[ - _mem.settings.prioritych])) + rs = RadioSetting( + "settings.prioritych", "Priority Channel", + RadioSettingValueList( + LIST_PRIORITY, current_index=_mem.settings.prioritych)) advanced.append(rs) - rs = RadioSetting("settings.vfomr", "Work Mode", - RadioSettingValueList(LIST_WORKMODE, LIST_WORKMODE[ - _mem.settings.vfomr])) + rs = RadioSetting( + "settings.vfomr", "Work Mode", + RadioSettingValueList( + LIST_WORKMODE, current_index=_mem.settings.vfomr)) advanced.append(rs) dtmfchars = "0123456789" @@ -898,7 +906,7 @@ def apply_code(setting, obj): val = _mem.settings.tdrab rs = RadioSetting("settings.tdrab", "Dual Watch TX Priority", RadioSettingValueList( - LIST_AB, LIST_AB[val])) + LIST_AB, current_index=val)) advanced.append(rs) rs = RadioSetting("settings.keylk", "Key Lock", diff --git a/chirp/drivers/tg_uv2p.py b/chirp/drivers/tg_uv2p.py index 8a9a1e18..bafeb8c4 100644 --- a/chirp/drivers/tg_uv2p.py +++ b/chirp/drivers/tg_uv2p.py @@ -460,14 +460,14 @@ def get_settings(self): options = ["Off"] + ["%s min" % x for x in range(1, 10)] rs = RadioSetting("time_out_timer", "TX Time Out Timer", RadioSettingValueList( - options, options[_settings.time_out_timer])) + options, current_index=_settings.time_out_timer)) cfg_grp.append(rs) # Display mode options = ["Frequency", "Channel", "Name"] rs = RadioSetting("display", "Channel Display Mode", RadioSettingValueList( - options, options[_settings.display])) + options, current_index=_settings.display)) cfg_grp.append(rs) # Squelch level @@ -499,7 +499,7 @@ def get_settings(self): _rxmode = _settings.rxmode rs = RadioSetting("rxmode", "Dual Watch/CrossBand Monitor", RadioSettingValueList( - options, options[_rxmode])) + options, current_index=_rxmode)) cfg_grp.append(rs) # Busy channel lock @@ -582,7 +582,7 @@ def get_settings(self): tempvar = 0 if (vfo_mem[idx].current < 200) else 1 rs = RadioSetting(vfo_lower[idx] + "_mode", vfo_upper[idx]+" Mode", RadioSettingValueList( - options, options[tempvar])) + options, current_index=tempvar)) vfo_group.append(rs) if tempvar == 0: @@ -614,11 +614,10 @@ def get_settings(self): resolution=0.005)) vfo_group.append(rs) - rs = RadioSetting(vfo_lower[idx] + "_duplex", - vfo_upper[idx] + " Shift", - RadioSettingValueList( - DUPLEX, - DUPLEX[_bandsettings[band_num].duplex])) + rs = RadioSetting( + vfo_lower[idx] + "_duplex", vfo_upper[idx] + " Shift", + RadioSettingValueList( + DUPLEX, current_index=_bandsettings[band_num].duplex)) vfo_group.append(rs) rs = RadioSetting( @@ -635,14 +634,14 @@ def get_settings(self): vfo_upper[idx] + " Power", RadioSettingValueList( POWER_LEVELS_STR, - POWER_LEVELS_STR[_bandsettings[band_num].power])) + current_index=_bandsettings[band_num].power)) vfo_group.append(rs) options = ["None", "Tone", "DTCS-N", "DTCS-I"] rs = RadioSetting(vfo_lower[idx] + "_ttmode", vfo_upper[idx]+" TX tone mode", RadioSettingValueList( - options, options[txtmode])) + options, current_index=txtmode)) vfo_group.append(rs) if txtmode == 1: rs = RadioSetting( @@ -666,7 +665,7 @@ def get_settings(self): rs = RadioSetting(vfo_lower[idx] + "_rtmode", vfo_upper[idx] + " RX tone mode", RadioSettingValueList(options, - options[rxtmode])) + current_index=rxtmode)) vfo_group.append(rs) if rxtmode == 1: @@ -692,7 +691,8 @@ def get_settings(self): vfo_lower[idx] + "_fm", vfo_upper[idx] + " FM BW ", RadioSettingValueList( - options, options[_bandsettings[band_num].isnarrow])) + options, + current_index=_bandsettings[band_num].isnarrow)) vfo_group.append(rs) return group diff --git a/chirp/drivers/th9000.py b/chirp/drivers/th9000.py index 631d5117..e56de606 100644 --- a/chirp/drivers/th9000.py +++ b/chirp/drivers/th9000.py @@ -730,44 +730,52 @@ def _filter(name): rs = RadioSetting("startname", "Startup Label", val) basic.append(rs) - rs = RadioSetting("bg_color", "LCD Color", - RadioSettingValueList(BGCOLOR_LIST, BGCOLOR_LIST[ - _settings.bg_color])) + rs = RadioSetting( + "bg_color", "LCD Color", + RadioSettingValueList( + BGCOLOR_LIST, current_index=_settings.bg_color)) basic.append(rs) - rs = RadioSetting("bg_brightness", "LCD Brightness", - RadioSettingValueList(BGBRIGHT_LIST, BGBRIGHT_LIST[ - _settings.bg_brightness])) + rs = RadioSetting( + "bg_brightness", "LCD Brightness", + RadioSettingValueList( + BGBRIGHT_LIST, current_index=_settings.bg_brightness)) basic.append(rs) - rs = RadioSetting("squelch", "Squelch Level", - RadioSettingValueList(SQUELCH_LIST, SQUELCH_LIST[ - _settings.squelch])) + rs = RadioSetting( + "squelch", "Squelch Level", + RadioSettingValueList( + SQUELCH_LIST, current_index=_settings.squelch)) basic.append(rs) - rs = RadioSetting("timeout_timer", "Timeout Timer (TOT)", - RadioSettingValueList(TIMEOUT_LIST, TIMEOUT_LIST[ - _settings.timeout_timer])) + rs = RadioSetting( + "timeout_timer", "Timeout Timer (TOT)", + RadioSettingValueList( + TIMEOUT_LIST, current_index=_settings.timeout_timer)) basic.append(rs) - rs = RadioSetting("auto_power_off", "Auto Power Off (APO)", - RadioSettingValueList(APO_LIST, APO_LIST[ - _settings.auto_power_off])) + rs = RadioSetting( + "auto_power_off", "Auto Power Off (APO)", + RadioSettingValueList( + APO_LIST, current_index=_settings.auto_power_off)) basic.append(rs) - rs = RadioSetting("voice_prompt", "Beep Prompt", - RadioSettingValueList(BEEP_LIST, BEEP_LIST[ - _settings.voice_prompt])) + rs = RadioSetting( + "voice_prompt", "Beep Prompt", + RadioSettingValueList( + BEEP_LIST, current_index=_settings.voice_prompt)) basic.append(rs) - rs = RadioSetting("tbst_freq", "Tone Burst Frequency", - RadioSettingValueList(TBSTFREQ_LIST, TBSTFREQ_LIST[ - _settings.tbst_freq])) + rs = RadioSetting( + "tbst_freq", "Tone Burst Frequency", + RadioSettingValueList( + TBSTFREQ_LIST, current_index=_settings.tbst_freq)) basic.append(rs) - rs = RadioSetting("choose_tx_power", "Max Level of TX Power", - RadioSettingValueList(TXPWR_LIST, TXPWR_LIST[ - _settings.choose_tx_power])) + rs = RadioSetting( + "choose_tx_power", "Max Level of TX Power", + RadioSettingValueList( + TXPWR_LIST, current_index=_settings.choose_tx_power)) basic.append(rs) (flow, fhigh) = self.valid_freq[0] diff --git a/chirp/drivers/th9800.py b/chirp/drivers/th9800.py index 83244777..5155ec75 100644 --- a/chirp/drivers/th9800.py +++ b/chirp/drivers/th9800.py @@ -312,12 +312,12 @@ def get_memory(self, number): opts = ["Frequency", "Name"] display = RadioSetting( "display", "Display", - RadioSettingValueList(opts, opts[_mem.display])) + RadioSettingValueList(opts, current_index=_mem.display)) mem.extra.append(display) bclo = RadioSetting( "bclo", "Busy Lockout", - RadioSettingValueList(BUSY_LOCK, BUSY_LOCK[_mem.bclo])) + RadioSettingValueList(BUSY_LOCK, current_index=_mem.bclo)) bclo.set_doc("Busy Lockout") mem.extra.append(bclo) @@ -459,56 +459,70 @@ def get_settings(self): basic.append(RadioSetting( "left_sql", "Left Squelch", RadioSettingValueList( - SQLPRESET, SQLPRESET[_settings.left_sql]))) + SQLPRESET, current_index=_settings.left_sql))) basic.append(RadioSetting( "right_sql", "Right Squelch", RadioSettingValueList( - SQLPRESET, SQLPRESET[_settings.right_sql]))) + SQLPRESET, current_index=_settings.right_sql))) # basic.append(RadioSetting("apo", "Auto Power off (0.1h)", # RadioSettingValueInteger(0, 20, _settings.apo))) opts = ["Off"] + ["%0.1f" % (t / 10.0) for t in range(1, 21, 1)] basic.append(RadioSetting( "apo", "Auto Power off (Hours)", - RadioSettingValueList(opts, opts[_settings.apo]))) + RadioSettingValueList(opts, current_index=_settings.apo))) opts = ["Off", "1", "2", "3", "Full"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "backlight", "Display Backlight", - RadioSettingValueList(opts, opts[_settings.backlight]))) + RadioSettingValueList( + opts, current_index=_settings.backlight))) opts = ["Off", "Right", "Left", "Both"] basic.append(RadioSetting( "pttlock", "PTT Lock", - RadioSettingValueList(opts, opts[_settings.pttlock]))) + RadioSettingValueList(opts, current_index=_settings.pttlock))) opts = ["Manual", "Auto"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "hyper_chan", "Hyper Channel", - RadioSettingValueList(opts, opts[_settings.hyper_chan]))) + RadioSettingValueList( + opts, current_index=_settings.hyper_chan))) opts = ["Key 1", "Key 2"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "right_func_key", "Right Function Key", - RadioSettingValueList(opts, opts[_settings.right_func_key]))) + RadioSettingValueList( + opts, current_index=_settings.right_func_key))) opts = ["1000 Hz", "1450 Hz", "1750 Hz", "2100 Hz"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "tbst_freq", "Tone Burst Frequency", - RadioSettingValueList(opts, opts[_settings.tbst_freq]))) + RadioSettingValueList( + opts, current_index=_settings.tbst_freq))) opts = ["Off", "TX", "RX", "TX RX"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "mute_mode", "Mute Mode", - RadioSettingValueList(opts, opts[_settings.mute_mode]))) + RadioSettingValueList( + opts, current_index=_settings.mute_mode))) opts = ["MEM", "MSM"] scanmode = RadioSetting( "scan_mode", "Scan Mode", - RadioSettingValueList(opts, opts[_settings.scan_mode])) + RadioSettingValueList(opts, current_index=_settings.scan_mode)) scanmode.set_doc("MEM = Normal scan, bypass channels marked skip. " " MSM = Scan only channels marked priority.") basic.append(scanmode) opts = ["TO", "CO"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "scan_resume", "Scan Resume", - RadioSettingValueList(opts, opts[_settings.scan_resume]))) + RadioSettingValueList( + opts, current_index=_settings.scan_resume))) opts = ["%0.1f" % (t / 10.0) for t in range(0, 51, 1)] - basic.append(RadioSetting( + basic.append( + RadioSetting( "exit_delay", "Span Transit Exit Delay", - RadioSettingValueList(opts, opts[_settings.exit_delay]))) + RadioSettingValueList( + opts, current_index=_settings.exit_delay))) basic.append(RadioSetting( "tot", "Time Out Timer (minutes)", RadioSettingValueInteger(0, 30, _settings.tot))) @@ -523,16 +537,16 @@ def get_settings(self): RadioSettingValueInteger(0, 15, _settings.tot_reset))) basic.append(RadioSetting( "p1", "P1 Function", - RadioSettingValueList(MICKEYFUNC, MICKEYFUNC[_settings.p1]))) + RadioSettingValueList(MICKEYFUNC, current_index=_settings.p1))) basic.append(RadioSetting( "p2", "P2 Function", - RadioSettingValueList(MICKEYFUNC, MICKEYFUNC[_settings.p2]))) + RadioSettingValueList(MICKEYFUNC, current_index=_settings.p2))) basic.append(RadioSetting( "p3", "P3 Function", - RadioSettingValueList(MICKEYFUNC, MICKEYFUNC[_settings.p3]))) + RadioSettingValueList(MICKEYFUNC, current_index=_settings.p3))) basic.append(RadioSetting( "p4", "P4 Function", - RadioSettingValueList(MICKEYFUNC, MICKEYFUNC[_settings.p4]))) + RadioSettingValueList(MICKEYFUNC, current_index=_settings.p4))) # opts = ["0", "1"] # basic.append(RadioSetting("x", "Desc", # RadioSettingValueList(opts, opts[_settings.x]))) diff --git a/chirp/drivers/th_uv3r25.py b/chirp/drivers/th_uv3r25.py index 0aac295a..48d3416c 100644 --- a/chirp/drivers/th_uv3r25.py +++ b/chirp/drivers/th_uv3r25.py @@ -147,7 +147,7 @@ def get_memory(self, number): rs = RadioSetting("voice_mode", "Voice Mode", RadioSettingValueList( VOICE_MODE_LIST, - VOICE_MODE_LIST[_mem.voice_mode-1])) + current_index=_mem.voice_mode-1)) mem.extra.append(rs) return mem diff --git a/chirp/drivers/th_uv8000.py b/chirp/drivers/th_uv8000.py index 3bb73854..f9f8da9e 100644 --- a/chirp/drivers/th_uv8000.py +++ b/chirp/drivers/th_uv8000.py @@ -732,7 +732,7 @@ def _get_memory(self, mem, _mem): # ID code can't be done in extra - no Integer method or call-back - rx = RadioSettingValueList(LIST_PTT, LIST_PTT[_mem.ptt]) + rx = RadioSettingValueList(LIST_PTT, current_index=_mem.ptt) rset = RadioSetting("ptt", "Xmit PTT ID", rx) mem.extra.append(rset) @@ -1076,7 +1076,7 @@ def myset_fmfrq(setting, obj, atrb, nx): rset.set_apply_callback(my_adjraw, _sets, "voxgain", -1) basic.append(rset) - rx = RadioSettingValueList(LIST_VOXDLY, LIST_VOXDLY[_sets.voxdelay]) + rx = RadioSettingValueList(LIST_VOXDLY, current_index=_sets.voxdelay) rset = RadioSetting("setstuf.voxdelay", "Vox Delay (secs)", rx) basic.append(rset) @@ -1084,7 +1084,7 @@ def myset_fmfrq(setting, obj, atrb, nx): rset = RadioSetting("setstuf.sql", "Squelch", rx) basic.append(rset) - rx = RadioSettingValueList(LIST_STEPS, LIST_STEPS[_sets.freqstep]) + rx = RadioSettingValueList(LIST_STEPS, current_index=_sets.freqstep) rset = RadioSetting("setstuf.freqstep", "VFO Tune Step (kHz)", rx) basic.append(rset) @@ -1093,12 +1093,12 @@ def myset_fmfrq(setting, obj, atrb, nx): basic.append(rset) options = ["Off", "On", "Auto"] - rx = RadioSettingValueList(options, options[_sets.lampon]) + rx = RadioSettingValueList(options, current_index=_sets.lampon) rset = RadioSetting("setstuf.lampon", "Backlight (LED)", rx) basic.append(rset) options = ["Orange", "Purple", "Blue"] - rx = RadioSettingValueList(options, options[_sets.ledclr]) + rx = RadioSettingValueList(options, current_index=_sets.ledclr) rset = RadioSetting("setstuf.ledclr", "Backlight Color (LIGHT)", rx) basic.append(rset) @@ -1115,7 +1115,7 @@ def myset_fmfrq(setting, obj, atrb, nx): rset.set_apply_callback(my_invbool, _sets, "xbandon") basic.append(rset) - rx = RadioSettingValueList(LIST_TIMEOUT, LIST_TIMEOUT[_sets.tot]) + rx = RadioSettingValueList(LIST_TIMEOUT, current_index=_sets.tot) rset = RadioSetting("setstuf.tot", "TX Timeout (Secs)", rx) basic.append(rset) @@ -1130,12 +1130,12 @@ def myset_fmfrq(setting, obj, atrb, nx): basic.append(rset) options = ["None", "Message", "DC Volts"] - rx = RadioSettingValueList(options, options[_sets.openmsg]) + rx = RadioSettingValueList(options, current_index=_sets.openmsg) rset = RadioSetting("setstuf.openmsg", "Power-On Display", rx) basic.append(rset) options = ["Channel Name", "Frequency"] - rx = RadioSettingValueList(options, options[_sets.chs_name]) + rx = RadioSettingValueList(options, current_index=_sets.chs_name) rset = RadioSetting("setstuf.chs_name", "Display Name/Frq", rx) basic.append(rset) @@ -1150,14 +1150,14 @@ def myset_fmfrq(setting, obj, atrb, nx): # Advanced (Strange) Settings options = ["Busy: Last Tx Band", "Edit: Current Band"] - rx = RadioSettingValueList(options, options[_sets.txsel]) + rx = RadioSettingValueList(options, current_index=_sets.txsel) rset = RadioSetting("setstuf.txsel", "Transmit Priority", rx) rset.set_doc("'Busy' transmits on last band used, not current one.") adv.append(rset) options = ["Off", "English", "Unk", "Chinese"] val = _sets.voice - rx = RadioSettingValueList(options, options[val]) + rx = RadioSettingValueList(options, current_index=val) rset = RadioSetting("setstuf.voice", "Voice", rx) adv.append(rset) @@ -1165,14 +1165,14 @@ def myset_fmfrq(setting, obj, atrb, nx): val = (_sets.batsav & 0x3) + 1 # ratio if (_sets.batsav & 0x4) == 0: # Off val = 0 - rx = RadioSettingValueList(options, options[val]) + rx = RadioSettingValueList(options, current_index=val) rset = RadioSetting("setstuf.batsav", "Battery Saver", rx) rset.set_apply_callback(my_batsav, _sets, "batsav") adv.append(rset) # Find out what & where SuperSave is options = ["Off", "1", "2", "3", "4", "5", "6", "7", "8", "9"] - rx = RadioSettingValueList(options, options[_sets.supersave]) + rx = RadioSettingValueList(options, current_index=_sets.supersave) rset = RadioSetting("setstuf.supersave", "Super Save (Secs)", rx) rset.set_doc("Unknown radio attribute??") adv.append(rset) @@ -1190,7 +1190,7 @@ def myset_fmfrq(setting, obj, atrb, nx): adv.append(rset) options = ["None", "Low", "High", "Both"] - rx = RadioSettingValueList(options, options[_sets.voltx]) + rx = RadioSettingValueList(options, current_index=_sets.voltx) rset = RadioSetting("setstuf.voltx", "Transmit Inhibit Voltage", rx) rset.set_doc("Block Transmit if battery volts are too high or low,") adv.append(rset) @@ -1199,7 +1199,7 @@ def myset_fmfrq(setting, obj, atrb, nx): if _sets.manfrqyn == 0xaa: val = 1 options = ["No", "Yes"] - rx = RadioSettingValueList(options, options[val]) + rx = RadioSettingValueList(options, current_index=val) rset = RadioSetting("setstuf.manfrqyn", "Manual Frequency", rx) rset.set_apply_callback(my_manfrq, _sets, "manfrqyn") adv.append(rset) @@ -1210,14 +1210,14 @@ def myset_fmfrq(setting, obj, atrb, nx): # Scan Settings options = ["CO: During Rx", "TO: Timed", "SE: Halt"] - rx = RadioSettingValueList(options, options[_sets.scanmode]) + rx = RadioSettingValueList(options, current_index=_sets.scanmode) rset = RadioSetting("setstuf.scanmode", "Scan Mode (Scan Pauses When)", rx) scn.append(rset) options = ["100", "150", "200", "250", "300", "350", "400", "450"] - rx = RadioSettingValueList(options, options[_sets.scanspeed]) + rx = RadioSettingValueList(options, current_index=_sets.scanspeed) rset = RadioSetting("setstuf.scanspeed", "Scan Speed (ms)", rx) scn.append(rset) @@ -1244,7 +1244,7 @@ def myset_fmfrq(setting, obj, atrb, nx): fmb.append(rset) options = ["5", "50", "100", "200(USA)"] # 5 is not used - rx = RadioSettingValueList(options, options[_sets.fmstep]) + rx = RadioSettingValueList(options, current_index=_sets.fmstep) rset = RadioSetting("setstuf.fmstep", "FM Freq Step (kHz)", rx) fmb.append(rset) @@ -1286,31 +1286,31 @@ def myset_fmfrq(setting, obj, atrb, nx): # DTMF Settings options = [str(x) for x in range(4, 16)] - rx = RadioSettingValueList(options, options[_sets.dtmfspd]) + rx = RadioSettingValueList(options, current_index=_sets.dtmfspd) rset = RadioSetting("setstuf.dtmfspd", "Tx Speed (digits/sec)", rx) dtmf.append(rset) options = [str(x) for x in range(0, 1100, 100)] - rx = RadioSettingValueList(options, options[_sets.dtmfdig1time]) + rx = RadioSettingValueList(options, current_index=_sets.dtmfdig1time) rset = RadioSetting("setstuf.dtmfdig1time", "Tx 1st Digit Time (ms)", rx) dtmf.append(rset) options = [str(x) for x in range(100, 1100, 100)] - rx = RadioSettingValueList(options, options[_sets.dtmfdig1dly]) + rx = RadioSettingValueList(options, current_index=_sets.dtmfdig1dly) rset = RadioSetting("setstuf.dtmfdig1dly", "Tx 1st Digit Delay (ms)", rx) dtmf.append(rset) options = ["0", "100", "500", "1000"] - rx = RadioSettingValueList(options, options[_sets.dtmfspms]) + rx = RadioSettingValueList(options, current_index=_sets.dtmfspms) rset = RadioSetting("setstuf.dtmfspms", "Tx Star & Pound Time (ms)", rx) dtmf.append(rset) options = ["None"] + [str(x) for x in range(600, 2100, 100)] - rx = RadioSettingValueList(options, options[_sets.codespctim]) + rx = RadioSettingValueList(options, current_index=_sets.codespctim) rset = RadioSetting("setstuf.codespctim", "Tx Code Space Time (ms)", rx) dtmf.append(rset) @@ -1324,12 +1324,12 @@ def myset_fmfrq(setting, obj, atrb, nx): dtmf.append(rset) options = ["Off", "A", "B", "C", "D"] - rx = RadioSettingValueList(options, options[_sets.grpcode]) + rx = RadioSettingValueList(options, current_index=_sets.grpcode) rset = RadioSetting("setstuf.grpcode", "Rx Group Code", rx) dtmf.append(rset) options = ["Off"] + [str(x) for x in range(1, 16)] - rx = RadioSettingValueList(options, options[_sets.autoresettmo]) + rx = RadioSettingValueList(options, current_index=_sets.autoresettmo) rset = RadioSetting("setstuf.autoresettmo", "Rx Auto Reset Timeout (secs)", rx) dtmf.append(rset) @@ -1343,13 +1343,13 @@ def myset_fmfrq(setting, obj, atrb, nx): dtmf.append(rset) options = [str(x) for x in range(500, 1600, 100)] - rx = RadioSettingValueList(options, options[_sets.decodetmo]) + rx = RadioSettingValueList(options, current_index=_sets.decodetmo) rset = RadioSetting("setstuf.decodetmo", "Rx Decode Timeout (ms)", rx) dtmf.append(rset) options = ["Tx & Rx Inhibit", "Tx Inhibit"] - rx = RadioSettingValueList(options, options[_sets.stuntype]) + rx = RadioSettingValueList(options, current_index=_sets.stuntype) rset = RadioSetting("setstuf.stuntype", "Stun Type", rx) dtmf.append(rset) diff --git a/chirp/drivers/th_uv88.py b/chirp/drivers/th_uv88.py index 719632e2..d6efc07e 100644 --- a/chirp/drivers/th_uv88.py +++ b/chirp/drivers/th_uv88.py @@ -744,13 +744,13 @@ def _get_memory(self, mem, _mem, _name): mem.power = POWER_LEVELS[int(_mem.power)] rs = RadioSettingValueList(B_LOCK_LIST, - B_LOCK_LIST[min(_mem.b_lock, 0x02)]) + current_index=min(_mem.b_lock, 0x02)) b_lock = RadioSetting("b_lock", "B_Lock", rs) mem.extra.append(b_lock) step = RadioSetting("step", "Step", RadioSettingValueList(LIST_STEPS, - LIST_STEPS[_mem.step])) + current_index=_mem.step)) mem.extra.append(step) scramble_value = _mem.scramble @@ -763,21 +763,21 @@ def _get_memory(self, mem, _mem, _name): else: if scramble_value >= 8: # Looks like OFF is 0x0f ** CONFIRM scramble_value = 0 - scramble = RadioSetting("scramble", "Scramble", - RadioSettingValueList(SCRAMBLE_LIST, - SCRAMBLE_LIST[ - scramble_value])) + scramble = RadioSetting( + "scramble", "Scramble", + RadioSettingValueList( + SCRAMBLE_LIST, current_index=scramble_value)) mem.extra.append(scramble) optsig = RadioSetting("signal", "Optional signaling", RadioSettingValueList( OPTSIG_LIST, - OPTSIG_LIST[_mem.signal])) + current_index=_mem.signal)) mem.extra.append(optsig) rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) return mem @@ -872,7 +872,8 @@ def get_settings(self): # Menu 02 - TX Channel Select if self._hasLCD: options = ["Last Channel", "Main Channel"] - rx = RadioSettingValueList(options, options[_settings.txChSelect]) + rx = RadioSettingValueList( + options, current_index=_settings.txChSelect) rset = RadioSetting("basicsettings.txChSelect", "Priority Transmit", rx) basic.append(rset) @@ -884,7 +885,7 @@ def get_settings(self): # Menu 05 - Squelch Level options = ["OFF"] + ["%s" % x for x in range(1, 10)] - rx = RadioSettingValueList(options, options[_settings.sqlLevel]) + rx = RadioSettingValueList(options, current_index=_settings.sqlLevel) rset = RadioSetting("basicsettings.sqlLevel", "Squelch Level", rx) basic.append(rset) @@ -902,7 +903,8 @@ def get_settings(self): "30s"] else: options = ["Off", "On", "Auto"] - rx = RadioSettingValueList(options, options[_settings.ledMode]) + rx = RadioSettingValueList( + options, current_index=_settings.ledMode) rset = RadioSetting("basicsettings.ledMode", "LED Display Mode", rx) basic.append(rset) @@ -910,7 +912,7 @@ def get_settings(self): # Menu 08 - Light if self._hasLCD: options = ["%s" % x for x in range(1, 8)] - rx = RadioSettingValueList(options, options[_settings.light]) + rx = RadioSettingValueList(options, current_index=_settings.light) rset = RadioSetting("basicsettings.light", "Background Light Color", rx) basic.append(rset) @@ -922,7 +924,7 @@ def get_settings(self): # Menu 11 - TOT options = ["Off"] + ["%s seconds" % x for x in range(30, 300, 30)] - rx = RadioSettingValueList(options, options[_settings.tot]) + rx = RadioSettingValueList(options, current_index=_settings.tot) rset = RadioSetting("basicsettings.tot", "Transmission Time-out Timer", rx) basic.append(rset) @@ -939,7 +941,7 @@ def get_settings(self): # Menu 16 - Save Mode options = ["Off", "1:1", "1:2", "1:4"] - rx = RadioSettingValueList(options, options[_settings.saveMode]) + rx = RadioSettingValueList(options, current_index=_settings.saveMode) rset = RadioSetting("basicsettings.saveMode", "Battery Save Mode", rx) basic.append(rset) @@ -948,7 +950,7 @@ def get_settings(self): options = ["Time", "Carrier", "Stop"] else: options = ["TO", "CO", "SE"] - rx = RadioSettingValueList(options, options[_settings.scanType]) + rx = RadioSettingValueList(options, current_index=_settings.scanType) rset = RadioSetting("basicsettings.scanType", "Scan Type", rx) basic.append(rset) @@ -971,7 +973,8 @@ def get_settings(self): "Startup Logo"] else: options = ["Off", "Voltage", "Character String"] - rx = RadioSettingValueList(options, options[_settings.introScreen]) + rx = RadioSettingValueList( + options, current_index=_settings.introScreen) rset = RadioSetting("basicsettings.introScreen", "Intro Screen", rx) basic.append(rset) @@ -979,14 +982,16 @@ def get_settings(self): # Menu 32 - Key Mode if self._hasLCD: options = ["ALL", "PTT", "KEY", "Key & Side Key"] - rx = RadioSettingValueList(options, options[_settings.keyMode]) + rx = RadioSettingValueList( + options, current_index=_settings.keyMode) rset = RadioSetting("basicsettings.keyMode", "Key Lock Mode", rx) basic.append(rset) # Menu 33 - Display Mode if self._hasLCD: options = ['Frequency', 'Channel #', 'Name'] - rx = RadioSettingValueList(options, options[_settings.disMode]) + rx = RadioSettingValueList( + options, current_index=_settings.disMode) rset = RadioSetting("basicsettings.disMode", "Display Mode", rx) basic.append(rset) @@ -1003,7 +1008,8 @@ def get_settings(self): options = ['Frequency', '120', '180', '240'] else: options = ['Off', 'Frequency'] - rx = RadioSettingValueList(options, options[_settings.endToneElim]) + rx = RadioSettingValueList( + options, current_index=_settings.endToneElim) rset = RadioSetting("basicsettings.endToneElim", "End Tone Elim", rx) advanced.append(rset) @@ -1055,7 +1061,7 @@ def _char_to_name(name): # software only options = ['0.5S', '1.0S', '1.5S', '2.0S', '2.5S', '3.0S', '3.5S', '4.0S', '4.5S', '5.0S'] - rx = RadioSettingValueList(options, options[_settings.voxDelay]) + rx = RadioSettingValueList(options, current_index=_settings.voxDelay) rset = RadioSetting("basicsettings.voxDelay", "VOX Delay", rx) advanced.append(rset) @@ -1068,7 +1074,7 @@ def _char_to_name(name): if _settings2.region > 4: LOG.debug("Unknown region code: {value}". format(value=_settings2.region)) - rx = RadioSettingValueList(options, options[_settings2.region]) + rx = RadioSettingValueList(options, current_index=_settings2.region) rx.set_mutable(False) rset = RadioSetting("settings2.region", "Region", rx) advanced.append(rset) @@ -1086,24 +1092,25 @@ def _char_to_name(name): "Power Level", "Alarm", "Noise Cancelaton", "Temp Monitor", "FM Radio", "Talk Around", "Frequency Reverse"] - rx = RadioSettingValueList(options, options[_settings.sideKey1]) + rx = RadioSettingValueList( + options, current_index=_settings.sideKey1) rset = RadioSetting("basicsettings.sideKey1", "Side Key 1", rx) advanced.append(rset) rx = RadioSettingValueList(options, - options[_settings.sideKey1_long]) + current_index=_settings.sideKey1_long) rset = RadioSetting("basicsettings.sideKey1_long", "Side Key 1 Long", rx) advanced.append(rset) rx = RadioSettingValueList(options, - options[_settings.sideKey2]) + current_index=_settings.sideKey2) rset = RadioSetting("basicsettings.sideKey2", "Side Key 2", rx) advanced.append(rset) rx = RadioSettingValueList(options, - options[_settings.sideKey2_long]) + current_index=_settings.sideKey2_long) rset = RadioSetting("basicsettings.sideKey2_long", "Side Key 2 Long", rx) advanced.append(rset) @@ -1123,21 +1130,23 @@ def _char_to_name(name): # Toggle with [#] key options = ["Frequency", "Channel"] - rx = RadioSettingValueList(options, options[_workmode.vfomrmode]) + rx = RadioSettingValueList( + options, current_index=_workmode.vfomrmode) rset = RadioSetting("workmodesettings.vfomrmode", "VFO/MR Mode", rx) workmode.append(rset) # Toggle with [#] key options = ["Frequency", "Channel"] - rx = RadioSettingValueList(options, options[_workmode.vfomrmodeb]) + rx = RadioSettingValueList( + options, current_index=_workmode.vfomrmodeb) rset = RadioSetting("workmodesettings.vfomrmodeb", "VFO/MR Mode B", rx) workmode.append(rset) # Toggle with [A/B] key options = ["B", "A"] - rx = RadioSettingValueList(options, options[_workmode.ab]) + rx = RadioSettingValueList(options, current_index=_workmode.ab) rset = RadioSetting("workmodesettings.ab", "A/B Select", rx) workmode.append(rset) diff --git a/chirp/drivers/th_uvf8d.py b/chirp/drivers/th_uvf8d.py index cf4bb447..5dd92289 100644 --- a/chirp/drivers/th_uvf8d.py +++ b/chirp/drivers/th_uvf8d.py @@ -409,7 +409,7 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("vox", "VOX", @@ -418,17 +418,17 @@ def get_memory(self, number): rs = RadioSetting("bclo", "Busy Channel Lockout", RadioSettingValueList(BCLO_LIST, - BCLO_LIST[_mem.bclo])) + current_index=_mem.bclo)) mem.extra.append(rs) rs = RadioSetting("apro", "APRO", RadioSettingValueList(APRO_LIST, - APRO_LIST[_mem.apro])) + current_index=_mem.apro)) mem.extra.append(rs) rs = RadioSetting("rpt_md", "Repeater Mode", RadioSettingValueList(RPTMD_LIST, - RPTMD_LIST[_mem.rpt_md])) + current_index=_mem.rpt_md)) mem.extra.append(rs) return mem @@ -487,12 +487,12 @@ def get_settings(self): group.append(RadioSetting( "mode", "Mode", RadioSettingValueList( - MODE_LIST, MODE_LIST[_settings.mode]))) + MODE_LIST, current_index=_settings.mode))) group.append(RadioSetting( "ab_switch", "A/B", RadioSettingValueList( - AB_LIST, AB_LIST[_settings.ab_switch]))) + AB_LIST, current_index=_settings.ab_switch))) group.append(RadioSetting( "a_channel", "A Selected Memory", @@ -507,19 +507,19 @@ def get_settings(self): group.append(RadioSetting( "a_display", "A Channel Display", RadioSettingValueList( - DISPLAY_LIST, DISPLAY_LIST[_settings.a_display]))) + DISPLAY_LIST, current_index=_settings.a_display))) group.append(RadioSetting( "b_display", "B Channel Display", RadioSettingValueList( - DISPLAY_LIST, DISPLAY_LIST[_settings.b_display]))) + DISPLAY_LIST, current_index=_settings.b_display))) group.append(RadioSetting( "tx_sel", "Priority Transmit", RadioSettingValueList( - TXSEL_LIST, TXSEL_LIST[_settings.tx_sel]))) + TXSEL_LIST, current_index=_settings.tx_sel))) group.append(RadioSetting( "vox_level", "VOX Level", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.vox_level]))) + VOX_LIST, current_index=_settings.vox_level))) group.append(RadioSetting( "squelch", "Squelch Level", @@ -531,12 +531,12 @@ def get_settings(self): group.append(RadioSetting( "led", "LED Mode", - RadioSettingValueList(LED_LIST, LED_LIST[_settings.led]))) + RadioSettingValueList(LED_LIST, current_index=_settings.led))) group.append(RadioSetting( "light", "Light Color", RadioSettingValueList( - LIGHT_LIST, LIGHT_LIST[_settings.light]))) + LIGHT_LIST, current_index=_settings.light))) group.append(RadioSetting( "beep", "Beep", @@ -548,7 +548,7 @@ def get_settings(self): group.append(RadioSetting( "tot", "Timeout Timer", - RadioSettingValueList(TOT_LIST, TOT_LIST[_settings.tot]))) + RadioSettingValueList(TOT_LIST, current_index=_settings.tot))) group.append(RadioSetting( "roger", "Roger Beep", @@ -572,7 +572,7 @@ def _filter(name): group.append(RadioSetting( "scan_mode", "Scan Mode", RadioSettingValueList( - SCAN_MODE_LIST, SCAN_MODE_LIST[_settings.scan_mode]))) + SCAN_MODE_LIST, current_index=_settings.scan_mode))) group.append(RadioSetting( 'taileliminate', 'Tail Eliminate', @@ -585,7 +585,7 @@ def _filter(name): group.append(RadioSetting( "lock_mode", "Keypad Lock Mode", RadioSettingValueList( - LOCK_MODE_LIST, LOCK_MODE_LIST[_settings.lock_mode]))) + LOCK_MODE_LIST, current_index=_settings.lock_mode))) group.append(RadioSetting( "voice", "Voice Prompt", @@ -594,29 +594,29 @@ def _filter(name): group.append(RadioSetting( "opnmsg", "Opening Message", RadioSettingValueList( - OPNMSG_LIST, OPNMSG_LIST[_settings.opnmsg]))) + OPNMSG_LIST, current_index=_settings.opnmsg))) group.append(RadioSetting( "tuning_step", "Tuning Step", RadioSettingValueList( TUNING_STEPS_LIST, - TUNING_STEPS_LIST[_settings.tuning_step]))) + current_index=_settings.tuning_step))) group.append(RadioSetting( "lamp_t", "Backlight Timeout", RadioSettingValueList( BACKLIGHT_TIMEOUT_LIST, - BACKLIGHT_TIMEOUT_LIST[_settings.lamp_t]))) + current_index=_settings.lamp_t))) group.append(RadioSetting( "a_work_area", "A Work Area", RadioSettingValueList( - AB_LIST, AB_LIST[_settings.a_work_area]))) + AB_LIST, current_index=_settings.a_work_area))) group.append(RadioSetting( "b_work_area", "B Work Area", RadioSettingValueList( - AB_LIST, AB_LIST[_settings.b_work_area]))) + AB_LIST, current_index=_settings.b_work_area))) return top diff --git a/chirp/drivers/thuv1f.py b/chirp/drivers/thuv1f.py index bf5de4bb..c2fd4bde 100644 --- a/chirp/drivers/thuv1f.py +++ b/chirp/drivers/thuv1f.py @@ -331,7 +331,7 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("vox", "VOX", @@ -340,12 +340,12 @@ def get_memory(self, number): rs = RadioSetting("bcl", "Busy Channel Lockout", RadioSettingValueList(BCL_LIST, - BCL_LIST[_mem.bcl])) + current_index=_mem.bcl)) mem.extra.append(rs) rs = RadioSetting("scramble_code", "Scramble Code", RadioSettingValueList( - CODES_LIST, CODES_LIST[_mem.scramble_code])) + CODES_LIST, current_index=_mem.scramble_code)) mem.extra.append(rs) return mem @@ -397,20 +397,21 @@ def get_settings(self): group.append( RadioSetting("led", "LED Mode", RadioSettingValueList(LED_LIST, - LED_LIST[_settings.led]))) + current_index=_settings.led))) group.append( RadioSetting("light", "Light Color", RadioSettingValueList(LIGHT_LIST, - LIGHT_LIST[_settings.light]))) + current_index=_settings.light))) group.append( RadioSetting("squelch", "Squelch Level", RadioSettingValueInteger(0, 9, _settings.squelch))) group.append( - RadioSetting("vox_level", "VOX Level", - RadioSettingValueList(VOX_LIST, - VOX_LIST[_settings.vox_level]))) + RadioSetting( + "vox_level", "VOX Level", + RadioSettingValueList( + VOX_LIST, current_index=_settings.vox_level))) group.append( RadioSetting("beep", "Beep", @@ -427,7 +428,7 @@ def get_settings(self): group.append( RadioSetting("tot", "Timeout Timer", RadioSettingValueList(TOT_LIST, - TOT_LIST[_settings.tot]))) + current_index=_settings.tot))) group.append( RadioSetting("roger", "Roger Beep", @@ -444,7 +445,7 @@ def get_settings(self): group.append( RadioSetting("scans", "Scans", RadioSettingValueList(SCANS_LIST, - SCANS_LIST[_settings.scans]))) + current_index=_settings.scans))) group.append( RadioSetting("autolk", "Auto Lock", @@ -455,9 +456,10 @@ def get_settings(self): RadioSettingValueBoolean(_settings.voice))) group.append( - RadioSetting("opnmsg", "Opening Message", - RadioSettingValueList(OPNMSG_LIST, - OPNMSG_LIST[_settings.opnmsg]))) + RadioSetting( + "opnmsg", "Opening Message", + RadioSettingValueList( + OPNMSG_LIST, current_index=_settings.opnmsg))) group.append( RadioSetting("disnm", "Display Name", diff --git a/chirp/drivers/tk270.py b/chirp/drivers/tk270.py index c549cfde..98cbb1ee 100644 --- a/chirp/drivers/tk270.py +++ b/chirp/drivers/tk270.py @@ -745,23 +745,23 @@ def get_settings(self): sett.sql = 6 tot = RadioSetting("settings.tot", "Time Out Timer (TOT)", - RadioSettingValueList(TOT, TOT[int(sett.tot)])) + RadioSettingValueList(TOT, current_index=int(sett.tot))) basic.append(tot) tota = RadioSetting("settings.tot_alert", "TOT pre-plert", - RadioSettingValueList(TOT_A, TOT_A[int(sett.tot_alert)])) + RadioSettingValueList(TOT_A, current_index=int(sett.tot_alert))) basic.append(tota) totrk = RadioSetting("settings.tot_rekey", "TOT rekey time", - RadioSettingValueList(TOT_RK, TOT_RK[int(sett.tot_rekey)])) + RadioSettingValueList(TOT_RK, current_index=int(sett.tot_rekey))) basic.append(totrk) totrs = RadioSetting("settings.tot_reset", "TOT reset time", - RadioSettingValueList(TOT_RS, TOT_RS[int(sett.tot_reset)])) + RadioSettingValueList(TOT_RS, current_index=int(sett.tot_reset))) basic.append(totrs) sql = RadioSetting("settings.sql", "Squelch level", - RadioSettingValueList(SQL, SQL[int(sett.sql)])) + RadioSettingValueList(SQL, current_index=int(sett.sql))) basic.append(sql) # front keys @@ -769,35 +769,35 @@ def get_settings(self): if m > 3: m = 1 mon = RadioSetting("settings.kMoni", "Monitor", - RadioSettingValueList(MONI, MONI[m])) + RadioSettingValueList(MONI, current_index=m)) fkeys.append(mon) s = int(sett.kScan) if s > 3: s = 1 scn = RadioSetting("settings.kScan", "Scan", - RadioSettingValueList(SCAN, SCAN[s])) + RadioSettingValueList(SCAN, current_index=s)) fkeys.append(scn) d = int(sett.kDial) if d > 1: d = 0 dial = RadioSetting("settings.kDial", "Dial", - RadioSettingValueList(YESNO, YESNO[d])) + RadioSettingValueList(YESNO, current_index=d)) fkeys.append(dial) t = int(sett.kTa) if t > 2: t = 2 ta = RadioSetting("settings.kTa", "Ta", - RadioSettingValueList(TA, TA[t])) + RadioSettingValueList(TA, current_index=t)) fkeys.append(ta) l = int(sett.kLo) if l > 1: l = 0 low = RadioSetting("settings.kLo", "Low", - RadioSettingValueList(YESNO, YESNO[l])) + RadioSettingValueList(YESNO, current_index=l)) fkeys.append(low) return top diff --git a/chirp/drivers/tk760g.py b/chirp/drivers/tk760g.py index f824cddf..9568e4b3 100644 --- a/chirp/drivers/tk760g.py +++ b/chirp/drivers/tk760g.py @@ -1163,7 +1163,7 @@ def get_settings(self): if tv == 255: tv = 32 tvol = RadioSetting("settings.tone_vol", "Minimum tone volume", - RadioSettingValueList(TVOL, TVOL[tv])) + RadioSettingValueList(TVOL, current_index=tv)) basic.append(tvol) sql = RadioSetting("settings.sql_level", "SQL Ref Level", diff --git a/chirp/drivers/tk8102.py b/chirp/drivers/tk8102.py index ee925026..575b289a 100644 --- a/chirp/drivers/tk8102.py +++ b/chirp/drivers/tk8102.py @@ -327,13 +327,13 @@ def get_memory(self, number): pttid = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID, - PTTID[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(pttid) - signal = RadioSetting("signaling", "Signaling", - RadioSettingValueList(SIGNAL, - SIGNAL[ - _mem.signaling & 0x01])) + signal = RadioSetting( + "signaling", "Signaling", + RadioSettingValueList( + SIGNAL, current_index=_mem.signaling & 0x01)) mem.extra.append(signal) return mem diff --git a/chirp/drivers/tk8180.py b/chirp/drivers/tk8180.py index 37c6021c..3e04a557 100644 --- a/chirp/drivers/tk8180.py +++ b/chirp/drivers/tk8180.py @@ -837,7 +837,7 @@ def apply_clockfmt(setting): clockfmt = RadioSetting( 'clockfmt', 'Clock Format', RadioSettingValueList(CLOCKFMT, - CLOCKFMT[settings.clockfmt])) + current_index=settings.clockfmt)) clockfmt.set_apply_callback(apply_clockfmt) common1.append(clockfmt) @@ -847,7 +847,7 @@ def apply_datefmt(setting): datefmt = RadioSetting( 'datefmt', 'Date Format', RadioSettingValueList(DATEFMT, - DATEFMT[settings.datefmt])) + current_index=settings.datefmt)) datefmt.set_apply_callback(apply_datefmt) common1.append(datefmt) diff --git a/chirp/drivers/tmd710.py b/chirp/drivers/tmd710.py index 32449017..f5172457 100644 --- a/chirp/drivers/tmd710.py +++ b/chirp/drivers/tmd710.py @@ -300,7 +300,7 @@ def get_memory(self, number): mem.tuning_step = TMD710_STEPS[_mem.tstep] if self.SHORT == "G": # Only the 710G - rx = RadioSettingValueList(STEPS_STR, STEPS_STR[_mem.splitstep]) + rx = RadioSettingValueList(STEPS_STR, current_index=_mem.splitstep) sx = "Split TX step (kHz)" rset = RadioSetting("splitstep", sx, rx) mem.extra.append(rset) @@ -550,7 +550,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): disp.append(rset) opts = ["VFO", "Mem Recall"] - rx = RadioSettingValueList(opts, opts[_pmg[0].a_mr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].a_mr) sx = "A: Left Side VFO/MR" rset = RadioSetting("pmg/0.a_mr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "a_mr") @@ -561,7 +561,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): rset = RadioSetting("pmg/0.a_chn", sx, rx) disp.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].b_mr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].b_mr) sx = "B: Right Side VFO/MR" rset = RadioSetting("pmg/0.b_mr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "b_mr") @@ -578,7 +578,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): disp.append(rset) opts = ["Amber", "Green"] - rx = RadioSettingValueList(opts, opts[_pmg[0].bkltclr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].bkltclr) sx = "Backlight color" rset = RadioSetting("pmg/0.bkltclr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "bkltclr") @@ -592,7 +592,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): disp.append(rset) opts = ["Positive", "Negative"] - rx = RadioSettingValueList(opts, opts[_pmg[0].dsprev]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].dsprev) sx = "Color mode" rset = RadioSetting("pmg/0.dsprev", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "dsprev") @@ -632,7 +632,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): aud.append(rset) opts = ["Mode1", "Mode2"] - rx = RadioSettingValueList(opts, opts[_pmg[0].extspkr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].extspkr) sx = "External Speaker" rset = RadioSetting("pmg/0.extspkr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "extspkr") @@ -654,14 +654,14 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): aud.append(rset) opts = ["Off", "Auto", "Manual"] - rx = RadioSettingValueList(opts, opts[_pmg[0].ance]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].ance) sx = " Announce mode" rset = RadioSetting("pmg/0.ance", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "ance") aud.append(rset) opts = ["English", "Japanese"] - rx = RadioSettingValueList(opts, opts[_pmg[0].lang]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].lang) sx = " Announce language" rset = RadioSetting("pmg/0.lang", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "lang") @@ -680,56 +680,56 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): # ===== AUX GROUP ===== opts = ["9600", "19200", "38400", "57600"] - rx = RadioSettingValueList(opts, opts[_blk1.pcbaud]) + rx = RadioSettingValueList(opts, current_index=_blk1.pcbaud) sx = "PC port baud rate" rset = RadioSetting("block1.pcbaud", sx, rx) rset.set_apply_callback(_val_list, opts, _blk1, "pcbaud") aux.append(rset) opts = ["A-Band", "B-Band", "TX-A / RX-B", "RX-A / TX-B"] - rx = RadioSettingValueList(opts, opts[_pmg[0].intband]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].intband) sx = "Internal TNC band" rset = RadioSetting("pmg/0.intband", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "intband") aux.append(rset) opts = ["A-Band", "B-Band", "TX-A / RX-B", "RX-A / TX-B"] - rx = RadioSettingValueList(opts, opts[_pmg[0].extband]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].extband) sx = "External TNC band" rset = RadioSetting("pmg/0.extband", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "extband") aux.append(rset) opts = ["1200", "9600"] - rx = RadioSettingValueList(opts, opts[_pmg[0].extbaud]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].extbaud) sx = "External TNC baud" rset = RadioSetting("pmg/0.extbaud", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "extbaud") aux.append(rset) opts = ["Off", "BUSY", "SQL", "TX", "BUSY/TX", "SQL/TX"] - rx = RadioSettingValueList(opts, opts[_pmg[0].sqcsrc]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].sqcsrc) sx = "SQC output source" rset = RadioSetting("pmg/0.sqcsrc", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "sqcsrc") aux.append(rset) opts = ["Low", "High"] - rx = RadioSettingValueList(opts, opts[_pmg[0].sqclogic]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].sqclogic) sx = "SQC logic" rset = RadioSetting("pmg/0.sqclogic", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "sqclogic") aux.append(rset) opts = ["Off", "30", "60", "90", "120", "180"] - rx = RadioSettingValueList(opts, opts[_pmg[0].apo]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].apo) sx = "APO: Auto Power Off (Mins)" rset = RadioSetting("pmg/0.apo", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "apo") aux.append(rset) opts = ["Time Operate (TO)", "Carrier Operate (CO)", "Seek"] - rx = RadioSettingValueList(opts, opts[_pmg[0].scnrsm]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].scnrsm) sx = "Scan resume mode" rset = RadioSetting("pmg/0.scnrsm", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "scnrsm") @@ -749,7 +749,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): opts = ["Mode 1: 1ch", "Mode 2: 61ch", "Mode 3: 91ch", "Mode 4: 181ch"] - rx = RadioSettingValueList(opts, opts[_pmg[0].vsmode]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].vsmode) sx = "Visual scan" rset = RadioSetting("pmg/0.vsmode", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "vsmode") @@ -767,34 +767,34 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): # ===== TX / RX Group ========= opts = ["A: Left", "B: Right"] - rx = RadioSettingValueList(opts, opts[_pmg[0].txband]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].txband) sx = "TX Side (PTT)" rset = RadioSetting("pmg/0.txband", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "txband") txrx.append(rset) opts = ["High (50W)", "Medium (10W)", "Low (5W)"] - rx = RadioSettingValueList(opts, opts[_pmg[0].a_pwr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].a_pwr) sx = "A-Band transmit power" rset = RadioSetting("pmg/0.a_pwr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "a_pwr") txrx.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].b_pwr]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].b_pwr) sx = "B-Band transmit power" rset = RadioSetting("pmg/0.b_pwr", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "b_pwr") txrx.append(rset) opts = ["Off", "125", "250", "500", "750", "1000"] - rx = RadioSettingValueList(opts, opts[_pmg[0].mutehu]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].mutehu) sx = "Rx Mute hangup time (ms)" rset = RadioSetting("pmg/0.mutehu", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "mutehu") txrx.append(rset) opts = ["Off", "125", "250", "500"] - rx = RadioSettingValueList(opts, opts[_pmg[0].ssqlhu]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].ssqlhu) sx = "S-meter SQL hangup time (ms)" rset = RadioSetting("pmg/0.ssqlhu", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "ssqlhu") @@ -826,13 +826,13 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): txrx.append(rset) opts = ["High", "Medium", "Low"] - rx = RadioSettingValueList(opts, opts[_blk1.micsens]) + rx = RadioSettingValueList(opts, current_index=_blk1.micsens) sx = "Microphone sensitivity (gain)" rset = RadioSetting("block1.micsens", sx, rx) txrx.append(rset) opts = ["3", "5", "10"] - rx = RadioSettingValueList(opts, opts[_pmg[0].tot]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].tot) sx = "Time-Out timer (Mins)" rset = RadioSetting("pmg/0.tot", sx, rx) # rset.set_apply_callback(_val_list, opts, _pmg[0], "tot") @@ -849,7 +849,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): txrx.append(rset) opts = ["Off", "15", "30", "60"] - rx = RadioSettingValueList(opts, opts[_pmg[0].wxscntm]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].wxscntm) sx = "WX alert scan memory time (Mins)" rset = RadioSetting("pmg/0.wxscntm", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "wxscntm") @@ -862,14 +862,14 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): dtmf.append(rset) opts = ["100", "250", "500", "750", "1000", "1500", "2000"] - rx = RadioSettingValueList(opts, opts[_pmg[0].dtmfpau]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].dtmfpau) sx = "DTMF pause duration (mS)" rset = RadioSetting("pmg/0.dtmfpau", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "dtmfpau") dtmf.append(rset) opts = ["Fast", "Slow"] - rx = RadioSettingValueList(opts, opts[_pmg[0].dtmfspd]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].dtmfspd) sx = "DTMF speed" rset = RadioSetting("pmg/0.dtmfspd", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "dtmfspd") @@ -892,7 +892,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): # ===== MEMORY GROUP ===== opts = ["All Bands", "Current Band"] - rx = RadioSettingValueList(opts, opts[_pmg[0].recall]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].recall) sx = "Memory recall method" rset = RadioSetting("pmg/0.recall", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "recall") @@ -904,7 +904,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): memz.append(rset) opts = ["Fast", "Slow"] - rx = RadioSettingValueList(opts, opts[_pmg[0].eclnkspd]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].eclnkspd) sx = "Echolink speed" rset = RadioSetting("pmg/0.eclnkspd", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "eclnkspd") @@ -927,14 +927,14 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): rptr.append(rset) opts = ["Cross Band", "TX:A-Band / RX:B-Band", "RX:A-Band / TX:B-Band"] - rx = RadioSettingValueList(opts, opts[_blk1.rptrmode]) + rx = RadioSettingValueList(opts, current_index=_blk1.rptrmode) sx = "Repeater Mode" rset = RadioSetting("block1.rptrmode", sx, rx) rset.set_apply_callback(_val_list, opts, _blk1, "rptrmode") rptr.append(rset) opts = ["Off", "Morse", "Voice"] - rx = RadioSettingValueList(opts, opts[_blk1.rptridx]) + rx = RadioSettingValueList(opts, current_index=_blk1.rptridx) sx = "Repeater ID transmit" rset = RadioSetting("block1.rptridx", sx, rx) rset.set_apply_callback(_val_list, opts, _blk1, "rptridx") @@ -975,13 +975,13 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): opts = ["WX CH", "FRQ.BAND", "CTRL", "MONITOR", "VGS", "VOICE", "GROUP UP", "MENU", "MUTE", "SHIFT", "DUAL", "M>V", "1750 Tone"] - rx = RadioSettingValueList(opts, opts[_pmg[0].pf1key]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].pf1key) sx = "Front panel PF1 key" rset = RadioSetting("pmg/0.pf1key", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "pf1key") pfk.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].pf2key]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].pf2key) sx = "Front panel PF2 key" rset = RadioSetting("pmg/0.pf2key", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "pf2key") @@ -993,25 +993,25 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): "LOCK", "A/B", "ENTER", "1750 Tone", "M.LIST", "S.LIST", "MSG.NEW", "REPLY", "POS", "P.MONI", "BEACON", "DX", "WX"] - rx = RadioSettingValueList(opts, opts[_pmg[0].micpf1]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].micpf1) sx = "Microphone PF1 key" rset = RadioSetting("pmg/0.micpf1", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "micpf1") pfk.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].micpf2]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].micpf2) sx = "Microphone PF2 key" rset = RadioSetting("pmg/0.micpf2", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "micpf2") pfk.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].micpf3]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].micpf3) sx = "Microphone PF3 key" rset = RadioSetting("pmg/0.micpf3", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "micpf3") pfk.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[0].micpf4]) + rx = RadioSettingValueList(opts, current_index=_pmg[0].micpf4) sx = "Microphone PF4 key" rset = RadioSetting("pmg/0.micpf4", sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[0], "micpf4") @@ -1084,7 +1084,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): opts = [] for val in TMD710_TONES: opts.append(str(val)) - rx = RadioSettingValueList(opts, opts[_skyc.skytone]) + rx = RadioSettingValueList(opts, current_index=_skyc.skytone) sx = "Tone frequency" rset = RadioSetting("skycmd.skytone", sx, rx) rset.set_apply_callback(_val_list, opts, _skyc, "skytone") @@ -1110,7 +1110,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): pmm.append(rset) opts = ["VFO", "Mem Recall"] - rx = RadioSettingValueList(opts, opts[_pmg[ix].a_mr]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].a_mr) sx = "- A: Left Side VFO/MR" rset = RadioSetting("pmg/%i.a_mr" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "a_mr") @@ -1121,7 +1121,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): rset = RadioSetting("pmg/%i.a_chn" % ix, sx, rx) pmm.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[ix].b_mr]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].b_mr) sx = "- B: Right Side VFO/MR" rset = RadioSetting("pmg/%i.b_mr" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "b_mr") @@ -1138,7 +1138,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): pmm.append(rset) opts = ["Amber", "Green"] - rx = RadioSettingValueList(opts, opts[_pmg[ix].bkltclr]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].bkltclr) sx = "- Backlight color" rset = RadioSetting("pmg/%i.bkltclr" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "bkltclr") @@ -1152,7 +1152,7 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): pmm.append(rset) opts = ["Positive", "Negative"] - rx = RadioSettingValueList(opts, opts[_pmg[ix].dsprev]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].dsprev) sx = "- Color mode" rset = RadioSetting("pmg/%i.dsprev" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "dsprev") @@ -1176,20 +1176,20 @@ def _pad_str(setting, lenstr, padchr, obj, atrb, ndx=-1): pmm.append(rset) opts = ["A: Left", "B: Right"] - rx = RadioSettingValueList(opts, opts[_pmg[ix].txband]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].txband) sx = "- X Side (PTT)" rset = RadioSetting("pmg/%i.txband" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "txband") pmm.append(rset) opts = ["High (50W)", "Medium (10W)", "Low (5W)"] - rx = RadioSettingValueList(opts, opts[_pmg[ix].a_pwr]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].a_pwr) sx = "- A-Band transmit power" rset = RadioSetting("pmg/%i.a_pwr" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "a_pwr") pmm.append(rset) - rx = RadioSettingValueList(opts, opts[_pmg[ix].b_pwr]) + rx = RadioSettingValueList(opts, current_index=_pmg[ix].b_pwr) sx = "- B-Band transmit power" rset = RadioSetting("pmg/%i.b_pwr" % ix, sx, rx) rset.set_apply_callback(_val_list, opts, _pmg[ix], "b_pwr") diff --git a/chirp/drivers/ts480.py b/chirp/drivers/ts480.py index c3c97862..8f7288f7 100644 --- a/chirp/drivers/ts480.py +++ b/chirp/drivers/ts480.py @@ -842,7 +842,7 @@ def my_labels(kx): options = ["ANT1", "ANT2"] # CAUTION: an has value of 1 or 2 - rx = RadioSettingValueList(options, options[_sets.an - 1]) + rx = RadioSettingValueList(options, current_index=_sets.an - 1) rset = RadioSetting("settings.an", "Antenna Selected", rx) # Add 1 to the changed value. S/b 1/2 rset.set_apply_callback(my_val_list, options, _sets, "an", 1) @@ -879,7 +879,7 @@ def my_labels(kx): basic.append(rset) options = ["Menu A", "Menu B"] - rx = RadioSettingValueList(options, options[_sets.mf]) + rx = RadioSettingValueList(options, current_index=_sets.mf) sx = "Menu Selected" rset = RadioSetting("settings.mf", sx, rx) rset.set_apply_callback(my_val_list, options, _sets, "mf") @@ -909,7 +909,7 @@ def my_labels(kx): kx = _chm[mx].xmode options = ["None", "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "N/A", "FSK-R"] - rx = RadioSettingValueList(options, options[kx]) + rx = RadioSettingValueList(options, current_index=kx) sx = " VFO-Band %i Tx/Rx Mode" % (mx - 100) rset = RadioSetting("ch_mem.xmode/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _chm, @@ -952,7 +952,7 @@ def my_labels(kx): menb.append(rset) options = ["250", "500", "1000"] - rx = RadioSettingValueList(options, options[_mex[mx].ex003]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex003) sx = my_labels(3) rset = RadioSetting("exset.ex003/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -981,7 +981,7 @@ def my_labels(kx): menb.append(rset) options = ["100", "200", "300", "400", "500"] - rx = RadioSettingValueList(options, options[_mex[mx].ex009]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex009) sx = my_labels(9) rset = RadioSetting("exset.ex009/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1001,7 +1001,7 @@ def my_labels(kx): menb.append(rset) options = ["TO", "CO"] - rx = RadioSettingValueList(options, options[_mex[mx].ex011]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex011) sx = my_labels(11) rset = RadioSetting("exset.ex011/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1021,7 +1021,7 @@ def my_labels(kx): menb.append(rset) options = ["Off", "3", "5", "10", "20", "30"] - rx = RadioSettingValueList(options, options[_mex[mx].ex022]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex022) sx = my_labels(22) rset = RadioSetting("exset.ex022/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1089,7 +1089,7 @@ def my_labels(kx): mx = _asf[ix].asmode - 1 # Same logic as xmode if _asf[ix].asmode == 9: mx = 7 - rx = RadioSettingValueList(TS480_MODES, TS480_MODES[mx]) + rx = RadioSettingValueList(TS480_MODES, current_index=mx) rset = RadioSetting("asf.asmode/%d" % ix, " Mode", rx) rset.set_apply_callback(my_asf_mode, _asf, ix) amode.append(rset) diff --git a/chirp/drivers/ts590.py b/chirp/drivers/ts590.py index 82712bae..00ed03b7 100644 --- a/chirp/drivers/ts590.py +++ b/chirp/drivers/ts590.py @@ -791,14 +791,14 @@ def get_memory(self, number): # Channel Extra settings: Only Boolean & List methods, no call-backs options = ["Wide", "Narrow"] - rx = RadioSettingValueList(options, options[_mem.fmnrw]) + rx = RadioSettingValueList(options, current_index=_mem.fmnrw) # NOTE: first param of RadioSetting is the object attribute name rset = RadioSetting("fmnrw", "FM mode", rx) rset.set_apply_callback(my_val_list, options, _mem, "fmnrw") mem.extra.append(rset) options = ["Filter A", "Filter B"] - rx = RadioSettingValueList(options, options[_mem.filter]) + rx = RadioSettingValueList(options, current_index=_mem.filter) rset = RadioSetting("filter", "Filter A/B", rx) rset.set_apply_callback(my_val_list, options, _mem, "filter") mem.extra.append(rset) @@ -1057,7 +1057,7 @@ def my_labels(kx): # nsg and x_ex defined above options = ["ANT1", "ANT2"] # CAUTION: an1 has value of 1 or 2 - rx = RadioSettingValueList(options, options[_sets.an1 - 1]) + rx = RadioSettingValueList(options, current_index=_sets.an1 - 1) rset = RadioSetting("settings.an1", "Antenna Selected", rx) # Add 1 to the changed value. S/b 1/2 rset.set_apply_callback(my_val_list, options, _sets, "an1", 1) @@ -1107,7 +1107,7 @@ def my_labels(kx): # nsg and x_ex defined above basic.append(rset) options = ["Menu A", "Menu B"] - rx = RadioSettingValueList(options, options[_sets.mf]) + rx = RadioSettingValueList(options, current_index=_sets.mf) sx = "Menu Selected" rset = RadioSetting("settings.mf", sx, rx) rset.set_apply_callback(my_val_list, options, _sets, "mf") @@ -1137,7 +1137,7 @@ def my_labels(kx): # nsg and x_ex defined above kx = _chm[mx].xmode options = ["None", "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "N/A", "FSK-R"] - rx = RadioSettingValueList(options, options[kx]) + rx = RadioSettingValueList(options, current_index=kx) sx = " VFO-Band %i Tx/Rx Mode" % (mx - 100) rset = RadioSetting("ch_mem.xmode/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _chm, @@ -1228,7 +1228,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["English", "Japanese"] - rx = RadioSettingValueList(options, options[_mex[mx].ex010]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex010) sx = my_labels(10) rset = RadioSetting("exset.ex010/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1239,7 +1239,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["Off", "1", "2"] - rx = RadioSettingValueList(options, options[_mex[mx].ex011]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex011) sx = my_labels(11) rset = RadioSetting("exset.ex011/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1250,7 +1250,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["0.1", "0.5", "1.0"] - rx = RadioSettingValueList(options, options[_mex[mx].ex012]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex012) sx = my_labels(12) rset = RadioSetting("exset.ex012", sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1261,7 +1261,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["250", "500", "1000"] - rx = RadioSettingValueList(options, options[_mex[mx].ex013]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex013) sx = my_labels(13) rset = RadioSetting("exset.ex013/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1276,7 +1276,7 @@ def my_labels(kx): # nsg and x_ex defined above if self.SG: options = ["Off", "0.5", "0.5", "1.0", "2.5", "5.0", "10.0"] - rx = RadioSettingValueList(options, options[_mex[mx].ex016]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex016) sx = my_labels(16) if nsg: sx = "014: Tuning step for SSB/CW/FSK (kHz)" @@ -1290,7 +1290,7 @@ def my_labels(kx): # nsg and x_ex defined above if self.SG: # this setting only for SG rx = RadioSettingValueList(options, - options[_mex[mx].ex017]) + current_index=_mex[mx].ex017) sx = my_labels(17) rset = RadioSetting("exset.ex017/%d" % mx, sx, rx) @@ -1305,7 +1305,7 @@ def my_labels(kx): # nsg and x_ex defined above "20.0", "25.0", "30.0", "50.0", "100.0"] if self.SG: options.remove("Off") - rx = RadioSettingValueList(options, options[_mex[mx].ex018]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex018) sx = my_labels(18) rset = RadioSetting("exset.ex018/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1315,7 +1315,7 @@ def my_labels(kx): # nsg and x_ex defined above else: menb.append(rset) - rx = RadioSettingValueList(options, options[_mex[mx].ex019]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex019) sx = my_labels(19) rset = RadioSetting("exset.ex019/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1326,7 +1326,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["3", "5", "10"] - rx = RadioSettingValueList(options, options[_mex[mx].ex021]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex021) sx = my_labels(21) rset = RadioSetting("exset.ex021/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1355,7 +1355,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["100", "200", "300", "400", "500"] - rx = RadioSettingValueList(options, options[_mex[mx].ex024]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex024) sx = my_labels(24) rset = RadioSetting("exset.ex024/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1375,7 +1375,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["TO", "CO"] - rx = RadioSettingValueList(options, options[_mex[mx].ex026]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex026) sx = my_labels(26) rset = RadioSetting("exset.ex026/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1395,7 +1395,7 @@ def my_labels(kx): # nsg and x_ex defined above menb.append(rset) options = ["Off", "3", "5", "10", "20", "30"] - rx = RadioSettingValueList(options, options[_mex[mx].ex055]) + rx = RadioSettingValueList(options, current_index=_mex[mx].ex055) sx = my_labels(55) rset = RadioSetting("exset.ex055/%d" % mx, sx, rx) rset.set_apply_callback(my_val_list, options, _mex, @@ -1561,7 +1561,7 @@ def my_labels(kx): # nsg and x_ex defined above mx = 9 elif _asf[ix].asmode == 4: mx = 10 - rx = RadioSettingValueList(TS590_MODES, TS590_MODES[mx]) + rx = RadioSettingValueList(TS590_MODES, current_index=mx) rset = RadioSetting("asf.asmode/%d" % ix, " Mode", rx) rset.set_apply_callback(my_asf_mode, _asf, ix) amode.append(rset) @@ -1587,14 +1587,14 @@ def my_labels(kx): # nsg and x_ex defined above rcurves = ["Off", "HB1", "HB2", "FP", "BB1", "BB2", "FLAT", "U"] for ix in range(8): - rx = RadioSettingValueList(tcurves, tcurves[_eqx[ix].txeq]) + rx = RadioSettingValueList(tcurves, current_index=_eqx[ix].txeq) rset = RadioSetting("eqx.txeq/%d" % ix, "TX %s Equalizer" % mohd[ix], rx) rset.set_apply_callback(my_val_list, tcurves, _eqx, "txeq", 0, ix) equ.append(rset) - rx = RadioSettingValueList(rcurves, rcurves[_eqx[ix].rxeq]) + rx = RadioSettingValueList(rcurves, current_index=_eqx[ix].rxeq) rset = RadioSetting("eqx.rxeq/%d" % ix, "RX %s Equalizer" % mohd[ix], rx) rset.set_apply_callback(my_val_list, rcurves, _eqx, diff --git a/chirp/drivers/uv5r.py b/chirp/drivers/uv5r.py index 5b939301..7c19db25 100644 --- a/chirp/drivers/uv5r.py +++ b/chirp/drivers/uv5r.py @@ -1031,12 +1031,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("scode", "PTT ID Code", RadioSettingValueList(PTTIDCODE_LIST, - PTTIDCODE_LIST[_mem.scode])) + current_index=_mem.scode)) mem.extra.append(rs) immutable = [] @@ -1204,12 +1204,12 @@ def _get_settings(self): rs = RadioSetting("save", "Battery Saver", RadioSettingValueList( - SAVE_LIST, SAVE_LIST[_settings.save])) + SAVE_LIST, current_index=_settings.save)) basic.append(rs) rs = RadioSetting("vox", "VOX Sensitivity", RadioSettingValueList( - VOX_LIST, VOX_LIST[_settings.vox])) + VOX_LIST, current_index=_settings.vox)) advanced.append(rs) if self.MODEL == "UV-6": @@ -1232,7 +1232,7 @@ def _get_settings(self): if self.MODEL == "UV-6": rs = RadioSetting("tdrch", "Dual Watch Channel", RadioSettingValueList( - TDRCH_LIST, TDRCH_LIST[_settings.tdrch])) + TDRCH_LIST, current_index=_settings.tdrch)) advanced.append(rs) rs = RadioSetting("tdrab", "Dual Watch TX Priority", @@ -1241,7 +1241,7 @@ def _get_settings(self): else: rs = RadioSetting("tdrab", "Dual Watch TX Priority", RadioSettingValueList( - TDRAB_LIST, TDRAB_LIST[_settings.tdrab])) + TDRAB_LIST, current_index=_settings.tdrab)) advanced.append(rs) if self.MODEL == "UV-6": @@ -1255,7 +1255,7 @@ def _get_settings(self): val = _settings.almod rs = RadioSetting("almod", "Alarm Mode", RadioSettingValueList( - ALMOD_LIST, ALMOD_LIST[val])) + ALMOD_LIST, current_index=val)) advanced.append(rs) rs = RadioSetting("beep", "Beep", @@ -1264,7 +1264,7 @@ def _get_settings(self): rs = RadioSetting("timeout", "Timeout Timer", RadioSettingValueList( - TIMEOUT_LIST, TIMEOUT_LIST[_settings.timeout])) + TIMEOUT_LIST, current_index=_settings.timeout)) basic.append(rs) if ((self._is_orig() and self._my_version() < 251) or @@ -1275,23 +1275,23 @@ def _get_settings(self): else: rs = RadioSetting("voice", "Voice", RadioSettingValueList( - VOICE_LIST, VOICE_LIST[_settings.voice])) + VOICE_LIST, current_index=_settings.voice)) advanced.append(rs) rs = RadioSetting("screv", "Scan Resume", RadioSettingValueList( - RESUME_LIST, RESUME_LIST[_settings.screv])) + RESUME_LIST, current_index=_settings.screv)) advanced.append(rs) if self.MODEL != "UV-6": rs = RadioSetting("mdfa", "Display Mode (A)", RadioSettingValueList( - MODE_LIST, MODE_LIST[_settings.mdfa])) + MODE_LIST, current_index=_settings.mdfa)) basic.append(rs) rs = RadioSetting("mdfb", "Display Mode (B)", RadioSettingValueList( - MODE_LIST, MODE_LIST[_settings.mdfb])) + MODE_LIST, current_index=_settings.mdfb)) basic.append(rs) rs = RadioSetting("bcl", "Busy Channel Lockout", @@ -1310,17 +1310,17 @@ def _get_settings(self): if self.MODEL != "UV-6": rs = RadioSetting("wtled", "Standby LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.wtled])) + COLOR_LIST, current_index=_settings.wtled)) basic.append(rs) rs = RadioSetting("rxled", "RX LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.rxled])) + COLOR_LIST, current_index=_settings.rxled)) basic.append(rs) rs = RadioSetting("txled", "TX LED Color", RadioSettingValueList( - COLOR_LIST, COLOR_LIST[_settings.txled])) + COLOR_LIST, current_index=_settings.txled)) basic.append(rs) if isinstance(self, BaofengUV82Radio): @@ -1330,7 +1330,7 @@ def _get_settings(self): rs = RadioSetting("rogerrx", "Roger Beep (RX)", RadioSettingValueList( ROGERRX_LIST, - ROGERRX_LIST[_settings.rogerrx])) + current_index=_settings.rogerrx)) basic.append(rs) else: rs = RadioSetting("roger", "Roger Beep", @@ -1343,12 +1343,12 @@ def _get_settings(self): rs = RadioSetting("rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - RPSTE_LIST, RPSTE_LIST[_settings.rpste])) + RPSTE_LIST, current_index=_settings.rpste)) advanced.append(rs) rs = RadioSetting("rptrl", "STE Repeater Delay", RadioSettingValueList( - STEDELAY_LIST, STEDELAY_LIST[_settings.rptrl])) + STEDELAY_LIST, current_index=_settings.rptrl)) advanced.append(rs) if self.MODEL != "UV-6": @@ -1395,7 +1395,8 @@ def _get_settings(self): # this is an UV-82HP only feature rs = RadioSetting( "tdrch", "Tone Burst Frequency (BTech UV-82HP only)", - RadioSettingValueList(RTONE_LIST, RTONE_LIST[_settings.tdrch])) + RadioSettingValueList( + RTONE_LIST, current_index=_settings.tdrch)) advanced.append(rs) def set_range_flag(setting): @@ -1426,7 +1427,7 @@ def set_range_flag(setting): rs = RadioSetting("ponmsg", "Power-On Message", RadioSettingValueList( PONMSG_LIST, - PONMSG_LIST[_settings.ponmsg])) + current_index=_settings.ponmsg)) other.append(rs) if self.MODEL != "UV-6": @@ -1435,13 +1436,13 @@ def set_range_flag(setting): rs = RadioSetting("displayab", "Display", RadioSettingValueList( - AB_LIST, AB_LIST[_settings.displayab])) + AB_LIST, current_index=_settings.displayab)) workmode.append(rs) rs = RadioSetting("workmode", "VFO/MR Mode", RadioSettingValueList( WORKMODE_LIST, - WORKMODE_LIST[_settings.workmode])) + current_index=_settings.workmode)) workmode.append(rs) rs = RadioSetting("keylock", "Keypad Lock", @@ -1488,12 +1489,12 @@ def apply_freq(setting, obj): rs = RadioSetting("vfoa.sftd", "VFO A Shift", RadioSettingValueList( - SHIFTD_LIST, SHIFTD_LIST[_vfoa.sftd])) + SHIFTD_LIST, current_index=_vfoa.sftd)) workmode.append(rs) rs = RadioSetting("vfob.sftd", "VFO B Shift", RadioSettingValueList( - SHIFTD_LIST, SHIFTD_LIST[_vfob.sftd])) + SHIFTD_LIST, current_index=_vfob.sftd)) workmode.append(rs) def convert_bytes_to_offset(bytes): @@ -1530,7 +1531,7 @@ def apply_offset(setting, obj): rs = RadioSetting("vfoa.txpower3", "VFO A Power", RadioSettingValueList( TXPOWER3_LIST, - TXPOWER3_LIST[val])) + current_index=val)) workmode.append(rs) if _vfob.txpower3 > 0x02: @@ -1540,60 +1541,60 @@ def apply_offset(setting, obj): rs = RadioSetting("vfob.txpower3", "VFO B Power", RadioSettingValueList( TXPOWER3_LIST, - TXPOWER3_LIST[val])) + current_index=val)) workmode.append(rs) else: rs = RadioSetting("vfoa.txpower", "VFO A Power", RadioSettingValueList( TXPOWER_LIST, - TXPOWER_LIST[_vfoa.txpower])) + current_index=_vfoa.txpower)) workmode.append(rs) rs = RadioSetting("vfob.txpower", "VFO B Power", RadioSettingValueList( TXPOWER_LIST, - TXPOWER_LIST[_vfob.txpower])) + current_index=_vfob.txpower)) workmode.append(rs) rs = RadioSetting("vfoa.widenarr", "VFO A Bandwidth", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[_vfoa.widenarr])) + current_index=_vfoa.widenarr)) workmode.append(rs) rs = RadioSetting("vfob.widenarr", "VFO B Bandwidth", RadioSettingValueList( BANDWIDTH_LIST, - BANDWIDTH_LIST[_vfob.widenarr])) + current_index=_vfob.widenarr)) workmode.append(rs) rs = RadioSetting("vfoa.scode", "VFO A PTT-ID", RadioSettingValueList( - PTTIDCODE_LIST, PTTIDCODE_LIST[_vfoa.scode])) + PTTIDCODE_LIST, current_index=_vfoa.scode)) workmode.append(rs) rs = RadioSetting("vfob.scode", "VFO B PTT-ID", RadioSettingValueList( - PTTIDCODE_LIST, PTTIDCODE_LIST[_vfob.scode])) + PTTIDCODE_LIST, current_index=_vfob.scode)) workmode.append(rs) if not self._is_orig(): rs = RadioSetting("vfoa.step", "VFO A Tuning Step", RadioSettingValueList( - STEP291_LIST, STEP291_LIST[_vfoa.step])) + STEP291_LIST, current_index=_vfoa.step)) workmode.append(rs) rs = RadioSetting("vfob.step", "VFO B Tuning Step", RadioSettingValueList( - STEP291_LIST, STEP291_LIST[_vfob.step])) + STEP291_LIST, current_index=_vfob.step)) workmode.append(rs) else: rs = RadioSetting("vfoa.step", "VFO A Tuning Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfoa.step])) + STEP_LIST, current_index=_vfoa.step)) workmode.append(rs) rs = RadioSetting("vfob.step", "VFO B Tuning Step", RadioSettingValueList( - STEP_LIST, STEP_LIST[_vfob.step])) + STEP_LIST, current_index=_vfob.step)) workmode.append(rs) dtmf = RadioSettingGroup("dtmf", "DTMF Settings") @@ -1655,7 +1656,7 @@ def apply_code(setting, obj): rs = RadioSetting("ani.aniid", "ANI ID", RadioSettingValueList(PTTID_LIST, - PTTID_LIST[_ani.aniid])) + current_index=_ani.aniid)) dtmf.append(rs) _codeobj = self._memobj.ani.alarmcode @@ -1675,9 +1676,10 @@ def apply_code(setting, obj): rs.set_apply_callback(apply_code, _ani) dtmf.append(rs) - rs = RadioSetting("dtmfst", "DTMF Sidetone", - RadioSettingValueList(DTMFST_LIST, - DTMFST_LIST[_settings.dtmfst])) + rs = RadioSetting( + "dtmfst", "DTMF Sidetone", + RadioSettingValueList( + DTMFST_LIST, current_index=_settings.dtmfst)) dtmf.append(rs) if _ani.dtmfon > 0xC3: @@ -1686,7 +1688,7 @@ def apply_code(setting, obj): val = _ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[val])) + current_index=val)) dtmf.append(rs) if _ani.dtmfoff > 0xC3: @@ -1695,7 +1697,7 @@ def apply_code(setting, obj): val = _ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(DTMFSPEED_LIST, - DTMFSPEED_LIST[val])) + current_index=val)) dtmf.append(rs) rs = RadioSetting("pttlt", "PTT ID Delay", diff --git a/chirp/drivers/uv5x3.py b/chirp/drivers/uv5x3.py index 1ac6c07b..1e1a98d7 100644 --- a/chirp/drivers/uv5x3.py +++ b/chirp/drivers/uv5x3.py @@ -452,7 +452,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -461,7 +461,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -470,7 +470,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -479,7 +479,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -496,7 +496,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -505,12 +505,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -519,12 +520,13 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) if _mem.settings.pttlt > 0x1E: @@ -535,14 +537,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.sync", "Sync A & B", @@ -551,17 +555,17 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) if _mem.settings.almod > 0x02: @@ -570,7 +574,7 @@ def get_settings(self): val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) if _mem.settings.tdrab > 0x02: @@ -579,7 +583,7 @@ def get_settings(self): val = _mem.settings.tdrab rs = RadioSetting("settings.tdrab", "Dual Watch TX Priority", RadioSettingValueList( - LIST_OFFAB, LIST_OFFAB[val])) + LIST_OFFAB, current_index=val)) basic.append(rs) rs = RadioSetting("settings.ste", "Squelch Tail Eliminate (HT to HT)", @@ -593,7 +597,7 @@ def get_settings(self): rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - LIST_RPSTE, LIST_RPSTE[val])) + LIST_RPSTE, current_index=val)) basic.append(rs) if _mem.settings.rptrl > 0x0A: @@ -602,12 +606,13 @@ def get_settings(self): val = _mem.settings.rptrl rs = RadioSetting("settings.rptrl", "STE Repeater Delay", RadioSettingValueList( - LIST_STEDELAY, LIST_STEDELAY[val])) + LIST_STEDELAY, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", @@ -756,13 +761,13 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.workmode", "VFO/MR Mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.workmode])) + current_index=_mem.settings.workmode)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -922,12 +927,12 @@ def apply_freq(setting, obj): rs = RadioSetting("vfo.a.sftd", "VFO A Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.a.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.a.sftd)) work.append(rs) rs = RadioSetting("vfo.b.sftd", "VFO B Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.b.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.b.sftd)) work.append(rs) def convert_bytes_to_offset(bytes): @@ -959,46 +964,46 @@ def apply_offset(setting, obj): rs = RadioSetting("vfo.a.txpower", "VFO A Power", RadioSettingValueList( LIST_TXPOWER, - LIST_TXPOWER[_mem.vfo.a.txpower])) + current_index=_mem.vfo.a.txpower)) work.append(rs) rs = RadioSetting("vfo.b.txpower", "VFO B Power", RadioSettingValueList( LIST_TXPOWER, - LIST_TXPOWER[_mem.vfo.b.txpower])) + current_index=_mem.vfo.b.txpower)) work.append(rs) rs = RadioSetting("vfo.a.widenarr", "VFO A Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.a.widenarr])) + current_index=_mem.vfo.a.widenarr)) work.append(rs) rs = RadioSetting("vfo.b.widenarr", "VFO B Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.b.widenarr])) + current_index=_mem.vfo.b.widenarr)) work.append(rs) rs = RadioSetting("vfo.a.scode", "VFO A S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.a.scode])) + current_index=_mem.vfo.a.scode)) work.append(rs) rs = RadioSetting("vfo.b.scode", "VFO B S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.b.scode])) + current_index=_mem.vfo.b.scode)) work.append(rs) rs = RadioSetting("vfo.a.step", "VFO A Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.a.step])) + LIST_STEP, current_index=_mem.vfo.a.step)) work.append(rs) rs = RadioSetting("vfo.b.step", "VFO B Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.b.step])) + LIST_STEP, current_index=_mem.vfo.b.step)) work.append(rs) # broadcast FM settings @@ -1039,7 +1044,7 @@ def apply_code(setting, obj): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -1048,7 +1053,7 @@ def apply_code(setting, obj): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -1070,7 +1075,7 @@ def apply_code(setting, obj): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) # DTMF decode settings @@ -1267,7 +1272,7 @@ def apply_dmtf_listvalue(setting, obj): idx = LIST_DTMF_SPECIAL_VALUES.index(0x0B) rs = RadioSetting("ani.groupcode", "Group Code", RadioSettingValueList(LIST_DTMF_SPECIAL_DIGITS, - LIST_DTMF_SPECIAL_DIGITS[idx])) + current_index=idx)) rs.set_apply_callback(apply_dmtf_listvalue, _mem.ani.groupcode) dtmfd.append(rs) @@ -1277,7 +1282,7 @@ def apply_dmtf_listvalue(setting, obj): idx = LIST_DTMF_SPECIAL_VALUES.index(0x0C) rs = RadioSetting("ani.spacecode", "Space Code", RadioSettingValueList(LIST_DTMF_SPECIAL_DIGITS, - LIST_DTMF_SPECIAL_DIGITS[idx])) + current_index=idx)) rs.set_apply_callback(apply_dmtf_listvalue, _mem.ani.spacecode) dtmfd.append(rs) @@ -1287,7 +1292,7 @@ def apply_dmtf_listvalue(setting, obj): val = _mem.ani.resettime rs = RadioSetting("ani.resettime", "Reset Time", RadioSettingValueList(LIST_RESETTIME, - LIST_RESETTIME[val])) + current_index=val)) dtmfd.append(rs) if _mem.ani.delayproctime > 0x27: @@ -1296,7 +1301,7 @@ def apply_dmtf_listvalue(setting, obj): val = _mem.ani.delayproctime rs = RadioSetting("ani.delayproctime", "Delay Processing Time", RadioSettingValueList(LIST_DELAYPROCTIME, - LIST_DELAYPROCTIME[val])) + current_index=val)) dtmfd.append(rs) # Service settings diff --git a/chirp/drivers/uv6r.py b/chirp/drivers/uv6r.py index 1550ecf6..748f9c87 100644 --- a/chirp/drivers/uv6r.py +++ b/chirp/drivers/uv6r.py @@ -373,7 +373,7 @@ def get_settings(self): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - LIST_OFF1TO9, LIST_OFF1TO9[val])) + LIST_OFF1TO9, current_index=val)) basic.append(rs) if _mem.settings.save > 0x04: @@ -382,7 +382,7 @@ def get_settings(self): val = _mem.settings.save rs = RadioSetting("settings.save", "Battery Saver", RadioSettingValueList( - LIST_SAVE, LIST_SAVE[val])) + LIST_SAVE, current_index=val)) basic.append(rs) if _mem.settings.vox > 0x0A: @@ -391,7 +391,7 @@ def get_settings(self): val = _mem.settings.vox rs = RadioSetting("settings.vox", "Vox", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) if _mem.settings.abr > 0x0A: @@ -400,7 +400,7 @@ def get_settings(self): val = _mem.settings.abr rs = RadioSetting("settings.abr", "Backlight Timeout", RadioSettingValueList( - LIST_OFF1TO10, LIST_OFF1TO10[val])) + LIST_OFF1TO10, current_index=val)) basic.append(rs) rs = RadioSetting("settings.tdr", "Dual Watch", @@ -417,7 +417,7 @@ def get_settings(self): val = _mem.settings.timeout rs = RadioSetting("settings.timeout", "Timeout Timer", RadioSettingValueList( - LIST_TIMEOUT, LIST_TIMEOUT[val])) + LIST_TIMEOUT, current_index=val)) basic.append(rs) if _mem.settings.voice > 0x02: @@ -426,12 +426,13 @@ def get_settings(self): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - LIST_VOICE, LIST_VOICE[val])) + LIST_VOICE, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.dtmfst", "DTMF Sidetone", - RadioSettingValueList(LIST_DTMFST, LIST_DTMFST[ - _mem.settings.dtmfst])) + rs = RadioSetting( + "settings.dtmfst", "DTMF Sidetone", + RadioSettingValueList( + LIST_DTMFST, current_index=_mem.settings.dtmfst)) basic.append(rs) if _mem.settings.screv > 0x02: @@ -440,12 +441,13 @@ def get_settings(self): val = _mem.settings.screv rs = RadioSetting("settings.screv", "Scan Resume", RadioSettingValueList( - LIST_RESUME, LIST_RESUME[val])) + LIST_RESUME, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.pttid", "When to send PTT ID", - RadioSettingValueList(LIST_PTTID, LIST_PTTID[ - _mem.settings.pttid])) + rs = RadioSetting( + "settings.pttid", "When to send PTT ID", + RadioSettingValueList( + LIST_PTTID, current_index=_mem.settings.pttid)) basic.append(rs) if _mem.settings.pttlt > 0x1E: @@ -456,14 +458,16 @@ def get_settings(self): RadioSettingValueInteger(0, 50, val)) basic.append(rs) - rs = RadioSetting("settings.mdfa", "Display Mode (A)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfa])) + rs = RadioSetting( + "settings.mdfa", "Display Mode (A)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfa)) basic.append(rs) - rs = RadioSetting("settings.mdfb", "Display Mode (B)", - RadioSettingValueList(LIST_MODE, LIST_MODE[ - _mem.settings.mdfb])) + rs = RadioSetting( + "settings.mdfb", "Display Mode (B)", + RadioSettingValueList( + LIST_MODE, current_index=_mem.settings.mdfb)) basic.append(rs) rs = RadioSetting("settings.autolk", "Auto Lock Keypad", @@ -472,17 +476,17 @@ def get_settings(self): rs = RadioSetting("settings.wtled", "Standby LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.wtled])) + LIST_COLOR, current_index=_mem.settings.wtled)) basic.append(rs) rs = RadioSetting("settings.rxled", "RX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.rxled])) + LIST_COLOR, current_index=_mem.settings.rxled)) basic.append(rs) rs = RadioSetting("settings.txled", "TX LED Color", RadioSettingValueList( - LIST_COLOR, LIST_COLOR[_mem.settings.txled])) + LIST_COLOR, current_index=_mem.settings.txled)) basic.append(rs) if _mem.settings.almod > 0x02: @@ -491,7 +495,7 @@ def get_settings(self): val = _mem.settings.almod rs = RadioSetting("settings.almod", "Alarm Mode", RadioSettingValueList( - LIST_ALMOD, LIST_ALMOD[val])) + LIST_ALMOD, current_index=val)) basic.append(rs) if _mem.settings.tcall > 0x05: @@ -500,7 +504,7 @@ def get_settings(self): val = _mem.settings.tcall rs = RadioSetting("settings.tcall", "Tone Burst Frequency", RadioSettingValueList( - LIST_TCALL, LIST_TCALL[val])) + LIST_TCALL, current_index=val)) basic.append(rs) rs = RadioSetting("settings.ste", "Squelch Tail Eliminate (HT to HT)", @@ -514,7 +518,7 @@ def get_settings(self): rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", RadioSettingValueList( - LIST_RPSTE, LIST_RPSTE[val])) + LIST_RPSTE, current_index=val)) basic.append(rs) if _mem.settings.rptrl > 0x0A: @@ -523,12 +527,13 @@ def get_settings(self): val = _mem.settings.rptrl rs = RadioSetting("settings.rptrl", "STE Repeater Delay", RadioSettingValueList( - LIST_STEDELAY, LIST_STEDELAY[val])) + LIST_STEDELAY, current_index=val)) basic.append(rs) - rs = RadioSetting("settings.ponmsg", "Power-On Message", - RadioSettingValueList(LIST_PONMSG, LIST_PONMSG[ - _mem.settings.ponmsg])) + rs = RadioSetting( + "settings.ponmsg", "Power-On Message", + RadioSettingValueList( + LIST_PONMSG, current_index=_mem.settings.ponmsg)) basic.append(rs) rs = RadioSetting("settings.roger", "Roger Beep", @@ -620,13 +625,13 @@ def _filter(name): # Work mode settings rs = RadioSetting("settings.displayab", "Display", RadioSettingValueList( - LIST_AB, LIST_AB[_mem.settings.displayab])) + LIST_AB, current_index=_mem.settings.displayab)) work.append(rs) rs = RadioSetting("settings.workmode", "VFO/MR Mode", RadioSettingValueList( LIST_WORKMODE, - LIST_WORKMODE[_mem.settings.workmode])) + current_index=_mem.settings.workmode)) work.append(rs) rs = RadioSetting("settings.keylock", "Keypad Lock", @@ -682,12 +687,12 @@ def apply_freq(setting, obj): rs = RadioSetting("vfo.a.sftd", "VFO A Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.a.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.a.sftd)) work.append(rs) rs = RadioSetting("vfo.b.sftd", "VFO B Shift", RadioSettingValueList( - LIST_SHIFTD, LIST_SHIFTD[_mem.vfo.b.sftd])) + LIST_SHIFTD, current_index=_mem.vfo.b.sftd)) work.append(rs) def convert_bytes_to_offset(bytes): @@ -719,46 +724,46 @@ def apply_offset(setting, obj): rs = RadioSetting("vfo.a.txpower", "VFO A Power", RadioSettingValueList( LIST_TXPOWER, - LIST_TXPOWER[_mem.vfo.a.txpower])) + current_index=_mem.vfo.a.txpower)) work.append(rs) rs = RadioSetting("vfo.b.txpower", "VFO B Power", RadioSettingValueList( LIST_TXPOWER, - LIST_TXPOWER[_mem.vfo.b.txpower])) + current_index=_mem.vfo.b.txpower)) work.append(rs) rs = RadioSetting("vfo.a.widenarr", "VFO A Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.a.widenarr])) + current_index=_mem.vfo.a.widenarr)) work.append(rs) rs = RadioSetting("vfo.b.widenarr", "VFO B Bandwidth", RadioSettingValueList( LIST_BANDWIDTH, - LIST_BANDWIDTH[_mem.vfo.b.widenarr])) + current_index=_mem.vfo.b.widenarr)) work.append(rs) rs = RadioSetting("vfo.a.scode", "VFO A S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.a.scode])) + current_index=_mem.vfo.a.scode)) work.append(rs) rs = RadioSetting("vfo.b.scode", "VFO B S-CODE", RadioSettingValueList( LIST_SCODE, - LIST_SCODE[_mem.vfo.b.scode])) + current_index=_mem.vfo.b.scode)) work.append(rs) rs = RadioSetting("vfo.a.step", "VFO A Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.a.step])) + LIST_STEP, current_index=_mem.vfo.a.step)) work.append(rs) rs = RadioSetting("vfo.b.step", "VFO B Tuning Step", RadioSettingValueList( - LIST_STEP, LIST_STEP[_mem.vfo.b.step])) + LIST_STEP, current_index=_mem.vfo.b.step)) work.append(rs) # broadcast FM settings @@ -799,7 +804,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfon rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) if _mem.ani.dtmfoff > 0xC3: @@ -808,7 +813,7 @@ def apply_code(setting, obj, length): val = _mem.ani.dtmfoff rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList(LIST_DTMFSPEED, - LIST_DTMFSPEED[val])) + current_index=val)) dtmfe.append(rs) _codeobj = self._memobj.ani.code @@ -821,7 +826,7 @@ def apply_code(setting, obj, length): rs = RadioSetting("ani.aniid", "When to send ANI ID", RadioSettingValueList(LIST_PTTID, - LIST_PTTID[_mem.ani.aniid])) + current_index=_mem.ani.aniid)) dtmfe.append(rs) # Service settings diff --git a/chirp/drivers/uvb5.py b/chirp/drivers/uvb5.py index 479b633e..b5643aad 100644 --- a/chirp/drivers/uvb5.py +++ b/chirp/drivers/uvb5.py @@ -499,43 +499,44 @@ def get_settings(self): group = RadioSettings(basic) options = ["Time", "Carrier", "Search"] - rs = RadioSetting("scantype", "Scan Type", - RadioSettingValueList(options, - options[_settings.scantype])) + rs = RadioSetting( + "scantype", "Scan Type", + RadioSettingValueList( + options, current_index=_settings.scantype)) basic.append(rs) options = ["Off"] + ["%s min" % x for x in range(1, 8)] rs = RadioSetting("timeout", "Time Out Timer", RadioSettingValueList( - options, options[_settings.timeout])) + options, current_index=_settings.timeout)) basic.append(rs) options = ["A", "B"] rs = RadioSetting("freqmode_ab", "Frequency Mode", RadioSettingValueList( - options, options[_settings.freqmode_ab])) + options, current_index=_settings.freqmode_ab)) basic.append(rs) options = ["Frequency Mode", "Channel Mode"] rs = RadioSetting("workmode_a", "Radio Work Mode(A)", RadioSettingValueList( - options, options[_settings.workmode_a])) + options, current_index=_settings.workmode_a)) basic.append(rs) rs = RadioSetting("workmode_b", "Radio Work Mode(B)", RadioSettingValueList( - options, options[_settings.workmode_b])) + options, current_index=_settings.workmode_b)) basic.append(rs) options = ["Frequency", "Name", "Channel"] rs = RadioSetting("mdf_a", "Display Format(F1)", RadioSettingValueList( - options, options[_settings.mdf_a])) + options, current_index=_settings.mdf_a)) basic.append(rs) rs = RadioSetting("mdf_b", "Display Format(F2)", RadioSettingValueList( - options, options[_settings.mdf_b])) + options, current_index=_settings.mdf_b)) basic.append(rs) rs = RadioSetting("mem_chan_a", "Mem Channel (A)", @@ -551,7 +552,7 @@ def get_settings(self): options = ["Off", "BOT", "EOT", "Both"] rs = RadioSetting("pttid", "PTT-ID", RadioSettingValueList( - options, options[_settings.pttid])) + options, current_index=_settings.pttid)) basic.append(rs) dtmfchars = "0123456789ABCD*#" @@ -583,19 +584,20 @@ def apply_code(setting, obj): options = ["Frequency Mode", "Channel Mode"] rs = RadioSetting("workmode_fm", "FM Work Mode", RadioSettingValueList( - options, options[_settings.workmode_fm])) + options, current_index=_settings.workmode_fm)) basic.append(rs) options = ["Current Frequency", "F1 Frequency", "F2 Frequency"] rs = RadioSetting("txtdr", "Dual Standby TX Priority", RadioSettingValueList(options, - options[_settings.txtdr])) + current_index=_settings.txtdr)) basic.append(rs) options = ["English", "Chinese"] - rs = RadioSetting("language", "Language", - RadioSettingValueList(options, - options[_settings.language])) + rs = RadioSetting( + "language", "Language", + RadioSettingValueList( + options, current_index=_settings.language)) basic.append(rs) rs = RadioSetting("tdr", "Dual Standby", diff --git a/chirp/drivers/uvk5.py b/chirp/drivers/uvk5.py index f212f7fa..72fac52d 100644 --- a/chirp/drivers/uvk5.py +++ b/chirp/drivers/uvk5.py @@ -893,7 +893,7 @@ def _get_mem_extra(self, mem, _mem): enc = 0 rs = RadioSetting("scrambler", _("Scrambler"), RadioSettingValueList( - SCRAMBLER_LIST, SCRAMBLER_LIST[enc])) + SCRAMBLER_LIST, current_index=enc)) mem.extra.append(rs) rs = RadioSetting("scanlists", _("Scanlists"), RadioSettingValueList( @@ -1311,7 +1311,7 @@ def get_settings(self): tmpval = 0 rs = RadioSetting("key1_shortpress_action", "Side key 1 short press", RadioSettingValueList( - KEYACTIONS_LIST, KEYACTIONS_LIST[tmpval])) + KEYACTIONS_LIST, current_index=tmpval)) keya.append(rs) tmpval = int(_mem.key1_longpress_action) @@ -1319,7 +1319,7 @@ def get_settings(self): tmpval = 0 rs = RadioSetting("key1_longpress_action", "Side key 1 long press", RadioSettingValueList( - KEYACTIONS_LIST, KEYACTIONS_LIST[tmpval])) + KEYACTIONS_LIST, current_index=tmpval)) keya.append(rs) tmpval = int(_mem.key2_shortpress_action) @@ -1327,7 +1327,7 @@ def get_settings(self): tmpval = 0 rs = RadioSetting("key2_shortpress_action", "Side key 2 short press", RadioSettingValueList( - KEYACTIONS_LIST, KEYACTIONS_LIST[tmpval])) + KEYACTIONS_LIST, current_index=tmpval)) keya.append(rs) tmpval = int(_mem.key2_longpress_action) @@ -1335,7 +1335,7 @@ def get_settings(self): tmpval = 0 rs = RadioSetting("key2_longpress_action", "Side key 2 long press", RadioSettingValueList( - KEYACTIONS_LIST, KEYACTIONS_LIST[tmpval])) + KEYACTIONS_LIST, current_index=tmpval)) keya.append(rs) # DTMF settings @@ -1368,7 +1368,7 @@ def get_settings(self): rs = RadioSetting("dtmf_decode_response", "Decode Response", RadioSettingValueList( DTMF_DECODE_RESPONSE_LIST, - DTMF_DECODE_RESPONSE_LIST[tmpval])) + current_index=tmpval)) dtmf.append(rs) tmpval = _mem.dtmf_settings.auto_reset_time @@ -1648,7 +1648,7 @@ def get_settings(self): "Channel display mode", RadioSettingValueList( CHANNELDISP_LIST, - CHANNELDISP_LIST[tmpchdispmode])) + current_index=tmpchdispmode)) basic.append(rs) # Crossband receiving/transmitting @@ -1660,7 +1660,7 @@ def get_settings(self): "Cross-band receiving/transmitting", RadioSettingValueList( CROSSBAND_LIST, - CROSSBAND_LIST[tmpcross])) + current_index=tmpcross)) basic.append(rs) # Battery save @@ -1672,7 +1672,7 @@ def get_settings(self): "Battery Save", RadioSettingValueList( BATSAVE_LIST, - BATSAVE_LIST[tmpbatsave])) + current_index=tmpbatsave)) basic.append(rs) # Dual watch @@ -1680,7 +1680,7 @@ def get_settings(self): if tmpdual >= len(DUALWATCH_LIST): tmpdual = 0 rs = RadioSetting("dualwatch", "Dual Watch", RadioSettingValueList( - DUALWATCH_LIST, DUALWATCH_LIST[tmpdual])) + DUALWATCH_LIST, current_index=tmpdual)) basic.append(rs) # Backlight auto mode @@ -1691,7 +1691,7 @@ def get_settings(self): "Backlight auto mode", RadioSettingValueList( BACKLIGHT_LIST, - BACKLIGHT_LIST[tmpback])) + current_index=tmpback)) basic.append(rs) # Tail tone elimination @@ -1723,7 +1723,7 @@ def get_settings(self): "Scan resume mode", RadioSettingValueList( SCANRESUME_LIST, - SCANRESUME_LIST[tmpscanres])) + current_index=tmpscanres)) basic.append(rs) # Keypad locked @@ -1749,7 +1749,7 @@ def get_settings(self): "Power on display mode", RadioSettingValueList( WELCOME_LIST, - WELCOME_LIST[tmpdispmode])) + current_index=tmpdispmode)) basic.append(rs) # Keypad Tone @@ -1757,7 +1757,7 @@ def get_settings(self): if tmpkeypadtone >= len(KEYPADTONE_LIST): tmpkeypadtone = 0 rs = RadioSetting("keypad_tone", "Keypad tone", RadioSettingValueList( - KEYPADTONE_LIST, KEYPADTONE_LIST[tmpkeypadtone])) + KEYPADTONE_LIST, current_index=tmpkeypadtone)) basic.append(rs) # Language @@ -1765,7 +1765,7 @@ def get_settings(self): if tmplanguage >= len(LANGUAGE_LIST): tmplanguage = 0 rs = RadioSetting("language", "Language", RadioSettingValueList( - LANGUAGE_LIST, LANGUAGE_LIST[tmplanguage])) + LANGUAGE_LIST, current_index=tmplanguage)) basic.append(rs) # Alarm mode @@ -1773,7 +1773,7 @@ def get_settings(self): if tmpalarmmode >= len(ALARMMODE_LIST): tmpalarmmode = 0 rs = RadioSetting("alarm_mode", "Alarm mode", RadioSettingValueList( - ALARMMODE_LIST, ALARMMODE_LIST[tmpalarmmode])) + ALARMMODE_LIST, current_index=tmpalarmmode)) basic.append(rs) # Reminding of end of talk @@ -1785,7 +1785,7 @@ def get_settings(self): "Reminding of end of talk", RadioSettingValueList( REMENDOFTALK_LIST, - REMENDOFTALK_LIST[tmpalarmmode])) + current_index=tmpalarmmode)) basic.append(rs) # Repeater tail tone elimination @@ -1795,7 +1795,7 @@ def get_settings(self): rs = RadioSetting( "repeater_tail_elimination", "Repeater tail tone elimination", - RadioSettingValueList(RTE_LIST, RTE_LIST[tmprte])) + RadioSettingValueList(RTE_LIST, current_index=tmprte)) basic.append(rs) # Logo string 1 @@ -1833,7 +1833,7 @@ def get_settings(self): tmpflock = 0 rs = RadioSetting( "flock", "F-LOCK", - RadioSettingValueList(FLOCK_LIST, FLOCK_LIST[tmpflock])) + RadioSettingValueList(FLOCK_LIST, current_index=tmpflock)) unlock.append(rs) # 350TX diff --git a/chirp/drivers/uvk5_egzumer.py b/chirp/drivers/uvk5_egzumer.py index 2f1d5fd6..4ec5a23b 100644 --- a/chirp/drivers/uvk5_egzumer.py +++ b/chirp/drivers/uvk5_egzumer.py @@ -1385,7 +1385,7 @@ def get_action(action_num): # Battery Type tmpbtype = list_def(_mem.Battery_type, BATTYPE_LIST, 0) - val = RadioSettingValueList(BATTYPE_LIST, BATTYPE_LIST[tmpbtype]) + val = RadioSettingValueList(BATTYPE_LIST, current_index=tmpbtype) bat_type_setting = RadioSetting("Battery_type", "Battery Type (BatTyp)", val) diff --git a/chirp/drivers/vgc.py b/chirp/drivers/vgc.py index dd869139..22e04a5f 100644 --- a/chirp/drivers/vgc.py +++ b/chirp/drivers/vgc.py @@ -931,89 +931,103 @@ def get_settings(self): # Audio: A01-A04 - aftone = RadioSetting("settings.aftone", "AF tone control", - RadioSettingValueList(LIST_AFTONE, LIST_AFTONE[ - _mem.settings.aftone])) + aftone = RadioSetting( + "settings.aftone", "AF tone control", + RadioSettingValueList( + LIST_AFTONE, current_index=_mem.settings.aftone)) basic.append(aftone) - spkr = RadioSetting("settings.spkr", "Speaker", - RadioSettingValueList(LIST_SPKR, LIST_SPKR[ - _mem.settings.spkr])) + spkr = RadioSetting( + "settings.spkr", "Speaker", + RadioSettingValueList( + LIST_SPKR, current_index=_mem.settings.spkr)) basic.append(spkr) - audio = RadioSetting("settings.audio", "Stereo/Mono", - RadioSettingValueList(LIST_AUDIO, LIST_AUDIO[ - _mem.settings.audio])) + audio = RadioSetting( + "settings.audio", "Stereo/Mono", + RadioSettingValueList( + LIST_AUDIO, current_index=_mem.settings.audio)) basic.append(audio) - sbmute = RadioSetting("settings.sbmute", "Sub band mute", - RadioSettingValueList(LIST_SBMUTE, LIST_SBMUTE[ - _mem.settings.sbmute])) + sbmute = RadioSetting( + "settings.sbmute", "Sub band mute", + RadioSettingValueList( + LIST_SBMUTE, current_index=_mem.settings.sbmute)) basic.append(sbmute) # TX/RX: B01-B08 - mgain = RadioSetting("settings.mgain", "Mic gain", - RadioSettingValueList(LIST_MLNHM, LIST_MLNHM[ - _mem.settings.mgain])) + mgain = RadioSetting( + "settings.mgain", "Mic gain", + RadioSettingValueList( + LIST_MLNHM, current_index=_mem.settings.mgain)) basic.append(mgain) - ptt = RadioSetting("settings.ptt", "PTT mode", - RadioSettingValueList(LIST_PTT, LIST_PTT[ - _mem.settings.ptt])) + ptt = RadioSetting( + "settings.ptt", "PTT mode", + RadioSettingValueList( + LIST_PTT, current_index=_mem.settings.ptt)) basic.append(ptt) # B03 (per channel) # B04 (per channel) - rxexp = RadioSetting("settings.rxexp", "RX expansion", - RadioSettingValueList(LIST_RXEXP, LIST_RXEXP[ - _mem.settings.rxexp])) + rxexp = RadioSetting( + "settings.rxexp", "RX expansion", + RadioSettingValueList( + LIST_RXEXP, current_index=_mem.settings.rxexp)) basic.append(rxexp) - vox = RadioSetting("settings.vox", "Vox", - RadioSettingValueList(LIST_VOX, LIST_VOX[ - _mem.settings.vox])) + vox = RadioSetting( + "settings.vox", "Vox", + RadioSettingValueList( + LIST_VOX, current_index=_mem.settings.vox)) basic.append(vox) - voxs = RadioSetting("settings.voxs", "Vox sensitivity", - RadioSettingValueList(LIST_MLNHM, LIST_MLNHM[ - _mem.settings.voxs])) + voxs = RadioSetting( + "settings.voxs", "Vox sensitivity", + RadioSettingValueList( + LIST_MLNHM, current_index=_mem.settings.voxs)) basic.append(voxs) # B08 (per channel) # Display: C01-C06 - display = RadioSetting("settings.display", "Display select", - RadioSettingValueList( - LIST_DISPLAY, LIST_DISPLAY[ - _mem.settings.display])) + display = RadioSetting( + "settings.display", "Display select", + RadioSettingValueList( + LIST_DISPLAY, current_index=_mem.settings.display)) basic.append(display) - lcdb = RadioSetting("settings.lcdb", "LCD brightness", - RadioSettingValueList(LIST_MINMAX, LIST_MINMAX[ - _mem.settings.lcdb])) + lcdb = RadioSetting( + "settings.lcdb", "LCD brightness", + RadioSettingValueList( + LIST_MINMAX, current_index=_mem.settings.lcdb)) basic.append(lcdb) - color = RadioSetting("settings.color", "LCD color", - RadioSettingValueList(LIST_COLOR, LIST_COLOR[ - _mem.settings.color])) + color = RadioSetting( + "settings.color", "LCD color", + RadioSettingValueList( + LIST_COLOR, current_index=_mem.settings.color)) basic.append(color) - lcdc = RadioSetting("settings.lcdc", "LCD contrast", - RadioSettingValueList(LIST_MINMAX, LIST_MINMAX[ - _mem.settings.lcdc])) + lcdc = RadioSetting( + "settings.lcdc", "LCD contrast", + RadioSettingValueList( + LIST_MINMAX, current_index=_mem.settings.lcdc)) basic.append(lcdc) - btime = RadioSetting("settings.btime", "LCD backlight time", - RadioSettingValueList(LIST_BTIME, LIST_BTIME[ - _mem.settings.btime])) + btime = RadioSetting( + "settings.btime", "LCD backlight time", + RadioSettingValueList( + LIST_BTIME, current_index=_mem.settings.btime)) basic.append(btime) - keyb = RadioSetting("settings.keyb", "Key brightness", - RadioSettingValueList(LIST_MINMAX, LIST_MINMAX[ - _mem.settings.keyb])) + keyb = RadioSetting( + "settings.keyb", "Key brightness", + RadioSettingValueList( + LIST_MINMAX, current_index=_mem.settings.keyb)) basic.append(keyb) # Memory: D01-D04 @@ -1021,28 +1035,32 @@ def get_settings(self): # D01 (per channel) # D02 (per channel) - mrscan = RadioSetting("settings.mrscan", "Memory scan type", - RadioSettingValueList(LIST_MRSCAN, LIST_MRSCAN[ - _mem.settings.mrscan])) + mrscan = RadioSetting( + "settings.mrscan", "Memory scan type", + RadioSettingValueList( + LIST_MRSCAN, current_index=_mem.settings.mrscan)) basic.append(mrscan) # D04 (per channel) # Scan: E01-E04 - dwstop = RadioSetting("settings.dwstop", "Dual watch stop", - RadioSettingValueList(LIST_DWSTOP, LIST_DWSTOP[ - _mem.settings.dwstop])) + dwstop = RadioSetting( + "settings.dwstop", "Dual watch stop", + RadioSettingValueList( + LIST_DWSTOP, current_index=_mem.settings.dwstop)) basic.append(dwstop) - scand = RadioSetting("settings.scand", "Scan direction", - RadioSettingValueList(LIST_SCAND, LIST_SCAND[ - _mem.settings.scand])) + scand = RadioSetting( + "settings.scand", "Scan direction", + RadioSettingValueList( + LIST_SCAND, current_index=_mem.settings.scand)) basic.append(scand) - scanr = RadioSetting("settings.scanr", "Scan resume", - RadioSettingValueList(LIST_SCANR, LIST_SCANR[ - _mem.settings.scanr])) + scanr = RadioSetting( + "settings.scanr", "Scan resume", + RadioSettingValueList( + LIST_SCANR, current_index=_mem.settings.scanr)) basic.append(scanr) scansb = RadioSetting("settings.scansb", "Scan stop beep", @@ -1051,80 +1069,89 @@ def get_settings(self): # System: F01-F09 - apo = RadioSetting("settings.apo", "Automatic power off [hours]", - RadioSettingValueList(LIST_APO, LIST_APO[ - _mem.settings.apo])) + apo = RadioSetting( + "settings.apo", "Automatic power off [hours]", + RadioSettingValueList( + LIST_APO, current_index=_mem.settings.apo)) basic.append(apo) ars = RadioSetting("settings.ars", "Automatic repeater shift", RadioSettingValueBoolean(_mem.settings.ars)) basic.append(ars) - beep = RadioSetting("settings.beep", "Beep volume", - RadioSettingValueList(LIST_BEEP, LIST_BEEP[ - _mem.settings.beep])) + beep = RadioSetting( + "settings.beep", "Beep volume", + RadioSettingValueList( + LIST_BEEP, current_index=_mem.settings.beep)) basic.append(beep) - fkey = RadioSetting("settings.fkey", "F key", - RadioSettingValueList(LIST_FKEY, LIST_FKEY[ - _mem.settings.fkey])) + fkey = RadioSetting( + "settings.fkey", "F key", + RadioSettingValueList( + LIST_FKEY, current_index=_mem.settings.fkey)) basic.append(fkey) - pfkey1 = RadioSetting("settings.pfkey1", "Mic P1 key", - RadioSettingValueList(LIST_PFKEY, LIST_PFKEY[ - _mem.settings.pfkey1])) + pfkey1 = RadioSetting( + "settings.pfkey1", "Mic P1 key", + RadioSettingValueList( + LIST_PFKEY, current_index=_mem.settings.pfkey1)) basic.append(pfkey1) - pfkey2 = RadioSetting("settings.pfkey2", "Mic P2 key", - RadioSettingValueList(LIST_PFKEY, LIST_PFKEY[ - _mem.settings.pfkey2])) + pfkey2 = RadioSetting( + "settings.pfkey2", "Mic P2 key", + RadioSettingValueList( + LIST_PFKEY, current_index=_mem.settings.pfkey2)) basic.append(pfkey2) - pfkey3 = RadioSetting("settings.pfkey3", "Mic P3 key", - RadioSettingValueList(LIST_PFKEY, LIST_PFKEY[ - _mem.settings.pfkey3])) + pfkey3 = RadioSetting( + "settings.pfkey3", "Mic P3 key", + RadioSettingValueList( + LIST_PFKEY, current_index=_mem.settings.pfkey3)) basic.append(pfkey3) - pfkey4 = RadioSetting("settings.pfkey4", "Mic P4 key", - RadioSettingValueList(LIST_PFKEY, LIST_PFKEY[ - _mem.settings.pfkey4])) + pfkey4 = RadioSetting( + "settings.pfkey4", "Mic P4 key", + RadioSettingValueList( + LIST_PFKEY, current_index=_mem.settings.pfkey4)) basic.append(pfkey4) - omode = RadioSetting("settings.omode", "Operation mode", - RadioSettingValueList(LIST_AB, LIST_AB[ - _mem.settings.omode])) + omode = RadioSetting( + "settings.omode", "Operation mode", + RadioSettingValueList( + LIST_AB, current_index=_mem.settings.omode)) basic.append(omode) - rxcoverm = RadioSetting("settings.rxcoverm", "RX coverage - memory", - RadioSettingValueList( - LIST_COVERAGE, LIST_COVERAGE[ - _mem.settings.rxcoverm])) + rxcoverm = RadioSetting( + "settings.rxcoverm", "RX coverage - memory", + RadioSettingValueList( + LIST_COVERAGE, current_index=_mem.settings.rxcoverm)) basic.append(rxcoverm) - rxcoverv = RadioSetting("settings.rxcoverv", "RX coverage - VFO", - RadioSettingValueList( - LIST_COVERAGE, LIST_COVERAGE[ - _mem.settings.rxcoverv])) + rxcoverv = RadioSetting( + "settings.rxcoverv", "RX coverage - VFO", + RadioSettingValueList( + LIST_COVERAGE, current_index=_mem.settings.rxcoverv)) basic.append(rxcoverv) - tot = RadioSetting("settings.tot", "Time out timer [min]", - RadioSettingValueList(LIST_TOT, LIST_TOT[ - _mem.settings.tot])) + tot = RadioSetting( + "settings.tot", "Time out timer [min]", + RadioSettingValueList( + LIST_TOT, current_index=_mem.settings.tot)) basic.append(tot) # Timer/Clock: G01-G04 # G01 - datefmt = RadioSetting("settings.datefmt", "Date format", - RadioSettingValueList( - LIST_DATEFMT, LIST_DATEFMT[ - _mem.settings.datefmt])) + datefmt = RadioSetting( + "settings.datefmt", "Date format", + RadioSettingValueList( + LIST_DATEFMT, current_index=_mem.settings.datefmt)) basic.append(datefmt) - timefmt = RadioSetting("settings.timefmt", "Time format", - RadioSettingValueList( - LIST_TIMEFMT, LIST_TIMEFMT[ - _mem.settings.timefmt])) + timefmt = RadioSetting( + "settings.timefmt", "Time format", + RadioSettingValueList( + LIST_TIMEFMT, current_index=_mem.settings.timefmt)) basic.append(timefmt) timesig = RadioSetting("settings.timesig", "Time signal", @@ -1132,15 +1159,16 @@ def get_settings(self): basic.append(timesig) tz = RadioSetting("settings.tz", "Time zone", - RadioSettingValueList(LIST_TZ, LIST_TZ[ - _mem.settings.tz])) + RadioSettingValueList( + LIST_TZ, current_index=_mem.settings.tz)) basic.append(tz) # Signaling: H01-H06 - bell = RadioSetting("settings.bell", "Bell ringer", - RadioSettingValueList(LIST_BELL, LIST_BELL[ - _mem.settings.bell])) + bell = RadioSetting( + "settings.bell", "Bell ringer", + RadioSettingValueList( + LIST_BELL, current_index=_mem.settings.bell)) basic.append(bell) # H02 (per channel) @@ -1157,9 +1185,10 @@ def get_settings(self): # H04 (per channel) - decbandsel = RadioSetting("settings.decbandsel", "DTMF band select", - RadioSettingValueList(LIST_AB, LIST_AB[ - _mem.settings.decbandsel])) + decbandsel = RadioSetting( + "settings.decbandsel", "DTMF band select", + RadioSettingValueList( + LIST_AB, current_index=_mem.settings.decbandsel)) basic.append(decbandsel) sqlexp = RadioSetting("settings.sqlexp", "SQL expansion", @@ -1168,22 +1197,22 @@ def get_settings(self): # Pkt: I01-I03 - databnd = RadioSetting("settings.databnd", "Packet data band", - RadioSettingValueList( - LIST_DATABND, LIST_DATABND[ - _mem.settings.databnd])) + databnd = RadioSetting( + "settings.databnd", "Packet data band", + RadioSettingValueList( + LIST_DATABND, current_index=_mem.settings.databnd)) basic.append(databnd) - dataspd = RadioSetting("settings.dataspd", "Packet data speed", - RadioSettingValueList( - LIST_DATASPD, LIST_DATASPD[ - _mem.settings.dataspd])) + dataspd = RadioSetting( + "settings.dataspd", "Packet data speed", + RadioSettingValueList( + LIST_DATASPD, current_index=_mem.settings.dataspd)) basic.append(dataspd) - datasql = RadioSetting("settings.datasql", "Packet data squelch", - RadioSettingValueList( - LIST_DATASQL, LIST_DATASQL[ - _mem.settings.datasql])) + datasql = RadioSetting( + "settings.datasql", "Packet data squelch", + RadioSettingValueList( + LIST_DATASQL, current_index=_mem.settings.datasql)) basic.append(datasql) # Other @@ -1192,9 +1221,10 @@ def get_settings(self): RadioSettingValueBoolean(_mem.settings.dw)) other.append(dw) - cpuclk = RadioSetting("settings.cpuclk", "CPU clock frequency", - RadioSettingValueList(LIST_CPUCLK, LIST_CPUCLK[ - _mem.settings.cpuclk])) + cpuclk = RadioSetting( + "settings.cpuclk", "CPU clock frequency", + RadioSettingValueList( + LIST_CPUCLK, current_index=_mem.settings.cpuclk)) other.append(cpuclk) def _filter(name): @@ -1218,44 +1248,52 @@ def _filter(name): # Work - workmoda = RadioSetting("settings.workmoda", "Work mode A", - RadioSettingValueList(LIST_WORK, LIST_WORK[ - _mem.settings.workmoda])) + workmoda = RadioSetting( + "settings.workmoda", "Work mode A", + RadioSettingValueList( + LIST_WORK, current_index=_mem.settings.workmoda)) work.append(workmoda) - workmodb = RadioSetting("settings.workmodb", "Work mode B", - RadioSettingValueList(LIST_WORK, LIST_WORK[ - _mem.settings.workmodb])) + workmodb = RadioSetting( + "settings.workmodb", "Work mode B", + RadioSettingValueList( + LIST_WORK, current_index=_mem.settings.workmodb)) work.append(workmodb) - wbanda = RadioSetting("settings.wbanda", "Work band A", - RadioSettingValueList(LIST_WBANDA, LIST_WBANDA[ - (_mem.settings.wbanda) - 1])) + wbanda = RadioSetting( + "settings.wbanda", "Work band A", + RadioSettingValueList( + LIST_WBANDA, current_index=(_mem.settings.wbanda) - 1)) work.append(wbanda) - wbandb = RadioSetting("settings.wbandb", "Work band B", - RadioSettingValueList(LIST_WBANDB, LIST_WBANDB[ - (_mem.settings.wbandb) - 4])) + wbandb = RadioSetting( + "settings.wbandb", "Work band B", + RadioSettingValueList( + LIST_WBANDB, current_index=(_mem.settings.wbandb) - 4)) work.append(wbandb) - sqla = RadioSetting("settings.sqla", "Squelch A", - RadioSettingValueList(LIST_SQL, LIST_SQL[ - _mem.settings.sqla])) + sqla = RadioSetting( + "settings.sqla", "Squelch A", + RadioSettingValueList( + LIST_SQL, current_index=_mem.settings.sqla)) work.append(sqla) - sqlb = RadioSetting("settings.sqlb", "Squelch B", - RadioSettingValueList(LIST_SQL, LIST_SQL[ - _mem.settings.sqlb])) + sqlb = RadioSetting( + "settings.sqlb", "Squelch B", + RadioSettingValueList( + LIST_SQL, current_index=_mem.settings.sqlb)) work.append(sqlb) - stepa = RadioSetting("settings.stepa", "Auto step A", - RadioSettingValueList(LIST_STEP, LIST_STEP[ - _mem.settings.stepa])) + stepa = RadioSetting( + "settings.stepa", "Auto step A", + RadioSettingValueList( + LIST_STEP, current_index=_mem.settings.stepa)) work.append(stepa) - stepb = RadioSetting("settings.stepb", "Auto step B", - RadioSettingValueList(LIST_STEP, LIST_STEP[ - _mem.settings.stepb])) + stepb = RadioSetting( + "settings.stepb", "Auto step B", + RadioSettingValueList( + LIST_STEP, current_index=_mem.settings.stepb)) work.append(stepb) mrcha = RadioSetting("settings.mrcha", "Current channel A", @@ -1288,52 +1326,60 @@ def _filter(name): _mem.settings.wprichb)) work.append(wprichb) - smode = RadioSetting("settings.smode", "Smart function mode", - RadioSettingValueList(LIST_SMODE, LIST_SMODE[ - _mem.settings.smode])) + smode = RadioSetting( + "settings.smode", "Smart function mode", + RadioSettingValueList( + LIST_SMODE, current_index=_mem.settings.smode)) work.append(smode) # dtmf - ttdkey = RadioSetting("dtmf.ttdkey", "D key function", - RadioSettingValueList(LIST_TTDKEY, LIST_TTDKEY[ - _mem.dtmf.ttdkey])) + ttdkey = RadioSetting( + "dtmf.ttdkey", "D key function", + RadioSettingValueList( + LIST_TTDKEY, current_index=_mem.dtmf.ttdkey)) dtmf.append(ttdkey) - ttdgt = RadioSetting("dtmf.ttdgt", "Digit time", - RadioSettingValueList(LIST_TT200, LIST_TT200[ - (_mem.dtmf.ttdgt) - 5])) + ttdgt = RadioSetting( + "dtmf.ttdgt", "Digit time", + RadioSettingValueList( + LIST_TT200, current_index=(_mem.dtmf.ttdgt) - 5)) dtmf.append(ttdgt) - ttint = RadioSetting("dtmf.ttint", "Interval time", - RadioSettingValueList(LIST_TT200, LIST_TT200[ - (_mem.dtmf.ttint) - 5])) + ttint = RadioSetting( + "dtmf.ttint", "Interval time", + RadioSettingValueList( + LIST_TT200, current_index=(_mem.dtmf.ttint) - 5)) dtmf.append(ttint) - tt1stdgt = RadioSetting("dtmf.tt1stdgt", "1st digit time", - RadioSettingValueList(LIST_TT200, LIST_TT200[ - (_mem.dtmf.tt1stdgt) - 5])) + tt1stdgt = RadioSetting( + "dtmf.tt1stdgt", "1st digit time", + RadioSettingValueList( + LIST_TT200, current_index=(_mem.dtmf.tt1stdgt) - 5)) dtmf.append(tt1stdgt) - tt1stdly = RadioSetting("dtmf.tt1stdly", "1st digit delay time", - RadioSettingValueList(LIST_TT1000, LIST_TT1000[ - (_mem.dtmf.tt1stdly) - 2])) + tt1stdly = RadioSetting( + "dtmf.tt1stdly", "1st digit delay time", + RadioSettingValueList( + LIST_TT1000, current_index=(_mem.dtmf.tt1stdly) - 2)) dtmf.append(tt1stdly) - ttdlyqt = RadioSetting("dtmf.ttdlyqt", "Digit delay when use qt", - RadioSettingValueList(LIST_TT1000, LIST_TT1000[ - (_mem.dtmf.ttdlyqt) - 2])) + ttdlyqt = RadioSetting( + "dtmf.ttdlyqt", "Digit delay when use qt", + RadioSettingValueList( + LIST_TT1000, current_index=(_mem.dtmf.ttdlyqt) - 2)) dtmf.append(ttdlyqt) - ttsig = RadioSetting("dtmf2.ttsig", "Signal", - RadioSettingValueList(LIST_TTSIG, LIST_TTSIG[ - _mem.dtmf2.ttsig])) + ttsig = RadioSetting( + "dtmf2.ttsig", "Signal", + RadioSettingValueList( + LIST_TTSIG, current_index=_mem.dtmf2.ttsig)) dtmf.append(ttsig) - ttautorst = RadioSetting("dtmf2.ttautorst", "Auto reset time", - RadioSettingValueList( - LIST_TTAUTORST, LIST_TTAUTORST[ - _mem.dtmf2.ttautorst])) + ttautorst = RadioSetting( + "dtmf2.ttautorst", "Auto reset time", + RadioSettingValueList( + LIST_TTAUTORST, current_index=_mem.dtmf2.ttautorst)) dtmf.append(ttautorst) if _mem.dtmf2.ttgrpcode > 0x06: @@ -1342,13 +1388,13 @@ def _filter(name): val = _mem.dtmf2.ttgrpcode ttgrpcode = RadioSetting("dtmf2.ttgrpcode", "Group code", RadioSettingValueList(LIST_TTGRPCODE, - LIST_TTGRPCODE[val])) + current_index=val)) dtmf.append(ttgrpcode) - ttintcode = RadioSetting("dtmf2.ttintcode", "Interval code", - RadioSettingValueList( - LIST_TTINTCODE, LIST_TTINTCODE[ - _mem.dtmf2.ttintcode])) + ttintcode = RadioSetting( + "dtmf2.ttintcode", "Interval code", + RadioSettingValueList( + LIST_TTINTCODE, current_index=_mem.dtmf2.ttintcode)) dtmf.append(ttintcode) if _mem.dtmf2.ttalert > 0x04: @@ -1357,13 +1403,13 @@ def _filter(name): val = _mem.dtmf2.ttalert ttalert = RadioSetting("dtmf2.ttalert", "Alert tone/transpond", RadioSettingValueList(LIST_TTALERT, - LIST_TTALERT[val])) + current_index=val)) dtmf.append(ttalert) - ttautod = RadioSetting("dtmf.ttautod", "Auto dial group", - RadioSettingValueList( - LIST_TTAUTOD, LIST_TTAUTOD[ - _mem.dtmf.ttautod])) + ttautod = RadioSetting( + "dtmf.ttautod", "Auto dial group", + RadioSettingValueList( + LIST_TTAUTOD, current_index=_mem.dtmf.ttautod)) dtmf.append(ttautod) # setup 9 dtmf autodial entries diff --git a/chirp/drivers/vx2.py b/chirp/drivers/vx2.py index 41ee3f4a..0e8d8261 100644 --- a/chirp/drivers/vx2.py +++ b/chirp/drivers/vx2.py @@ -443,7 +443,7 @@ def get_settings(self): options = ["off", "30m", "1h", "3h", "5h", "8h"] rs = RadioSetting( "apo", "APO time (hrs)", - RadioSettingValueList(options, options[_settings.apo])) + RadioSettingValueList(options, current_index=_settings.apo)) basic.append(rs) rs = RadioSetting( @@ -469,7 +469,7 @@ def get_settings(self): options = ["off", "1", "3", "5", "8", "cont"] rs = RadioSetting( "bell", "Bell", - RadioSettingValueList(options, options[_settings.bell])) + RadioSettingValueList(options, current_index=_settings.bell)) basic.append(rs) rs = RadioSetting( @@ -479,8 +479,9 @@ def get_settings(self): options = ["5", "10", "50", "100"] rs = RadioSetting( - "chcounter", "Channel Counter (MHz)", - RadioSettingValueList(options, options[_settings.chcounter])) + "chcounter", "Channel Counter (MHz)", + RadioSettingValueList( + options, current_index=_settings.chcounter)) basic.append(rs) rs = RadioSetting( @@ -491,7 +492,7 @@ def get_settings(self): options = list(map(str, list(range(0, 12+1)))) rs = RadioSetting( "dimmer", "Dimmer", - RadioSettingValueList(options, options[_settings.dimmer])) + RadioSettingValueList(options, current_index=_settings.dimmer)) basic.append(rs) rs = RadioSetting( @@ -502,21 +503,22 @@ def get_settings(self): options = ["beep", "strobe", "bp+str", "beam", "bp+beam", "cw", "bp+cw"] rs = RadioSetting( - "emergmode", "Emergency Mode", - RadioSettingValueList(options, options[_settings.emergmode])) + "emergmode", "Emergency Mode", + RadioSettingValueList( + options, current_index=_settings.emergmode)) basic.append(rs) options = ["Home", "Reverse"] rs = RadioSetting( "hmrv", "HM/RV key", - RadioSettingValueList(options, options[_settings.hmrv])) + RadioSettingValueList(options, current_index=_settings.hmrv)) basic.append(rs) options = ["My Menu", "Internet"] rs = RadioSetting( "internet_key", "Internet key", RadioSettingValueList( - options, options[_settings.internet_key])) + options, current_index=_settings.internet_key)) basic.append(rs) options = ["1 APO", "2 AR BEP", "3 AR INT", "4 ARS", "5 ATT", @@ -533,58 +535,63 @@ def get_settings(self): "47 VFO MD", "48 TR SQL (JAPAN)", "48 WX ALT"] rs = RadioSetting( - "mymenu", "My Menu function", - RadioSettingValueList(options, options[_settings.mymenu - 9])) + "mymenu", "My Menu function", + RadioSettingValueList( + options, current_index=_settings.mymenu - 9)) basic.append(rs) options = ["wires", "link"] rs = RadioSetting( "internet_mode", "Internet mode", RadioSettingValueList( - options, options[_settings.internet_mode])) + options, current_index=_settings.internet_mode)) basic.append(rs) options = ["key", "cont", "off"] rs = RadioSetting( "lamp", "Lamp mode", - RadioSettingValueList(options, options[_settings.lamp])) + RadioSettingValueList(options, current_index=_settings.lamp)) basic.append(rs) options = ["key", "dial", "key+dial", "ptt", "key+ptt", "dial+ptt", "all"] rs = RadioSetting( "lock", "Lock mode", - RadioSettingValueList(options, options[_settings.lock])) + RadioSettingValueList(options, current_index=_settings.lock)) basic.append(rs) options = ["monitor", "tone call"] rs = RadioSetting( - "moni_tcall", "MONI key", - RadioSettingValueList(options, options[_settings.moni_tcall])) + "moni_tcall", "MONI key", + RadioSettingValueList( + options, current_index=_settings.moni_tcall)) basic.append(rs) options = ["lower", "next"] rs = RadioSetting( "mwmode", "Memory write mode", - RadioSettingValueList(options, options[_settings.mwmode])) + RadioSettingValueList(options, current_index=_settings.mwmode)) basic.append(rs) options = list(map(str, list(range(0, 15+1)))) rs = RadioSetting( - "nfm_sql", "NFM Sql", - RadioSettingValueList(options, options[_settings.nfm_sql])) + "nfm_sql", "NFM Sql", + RadioSettingValueList( + options, current_index=_settings.nfm_sql)) basic.append(rs) options = list(map(str, list(range(0, 8+1)))) rs = RadioSetting( - "wfm_sql", "WFM Sql", - RadioSettingValueList(options, options[_settings.wfm_sql])) + "wfm_sql", "WFM Sql", + RadioSettingValueList( + options, current_index=_settings.wfm_sql)) basic.append(rs) options = ["off", "dc", "msg"] rs = RadioSetting( - "openmsgmode", "Opening message", - RadioSettingValueList(options, options[_settings.openmsgmode])) + "openmsgmode", "Opening message", + RadioSettingValueList( + options, current_index=_settings.openmsgmode)) basic.append(rs) openmsg = RadioSettingValueString( @@ -596,25 +603,26 @@ def get_settings(self): options = ["3s", "5s", "10s", "busy", "hold"] rs = RadioSetting( "resume", "Resume", - RadioSettingValueList(options, options[_settings.resume])) + RadioSettingValueList(options, current_index=_settings.resume)) basic.append(rs) options = ["off"] + list(map(str, list(range(1, 9+1)))) rs = RadioSetting( "rfsql", "RF Sql", - RadioSettingValueList(options, options[_settings.rfsql])) + RadioSettingValueList(options, current_index=_settings.rfsql)) basic.append(rs) options = ["off", "200ms", "300ms", "500ms", "1s", "2s"] rs = RadioSetting( "rxsave", "RX pwr save", - RadioSettingValueList(options, options[_settings.rxsave])) + RadioSettingValueList(options, current_index=_settings.rxsave)) basic.append(rs) options = ["single", "cont"] rs = RadioSetting( - "smartsearch", "Smart search", - RadioSettingValueList(options, options[_settings.smartsearch])) + "smartsearch", "Smart search", + RadioSettingValueList( + options, current_index=_settings.smartsearch)) basic.append(rs) rs = RadioSetting( @@ -630,7 +638,7 @@ def get_settings(self): options = ["off", "1", "3", "5", "10"] rs = RadioSetting( "tot", "TOT (mins)", - RadioSettingValueList(options, options[_settings.tot])) + RadioSettingValueList(options, current_index=_settings.tot)) basic.append(rs) rs = RadioSetting( @@ -640,8 +648,9 @@ def get_settings(self): options = ["all", "band"] rs = RadioSetting( - "vfomode", "VFO mode", - RadioSettingValueList(options, options[_settings.vfomode])) + "vfomode", "VFO mode", + RadioSettingValueList( + options, current_index=_settings.vfomode)) basic.append(rs) rs = RadioSetting( @@ -658,13 +667,14 @@ def get_settings(self): rs = RadioSetting( "artsinterval", "ARTS Interval", RadioSettingValueList( - options, options[_settings.artsinterval])) + options, current_index=_settings.artsinterval)) arts.append(rs) options = ["off", "in range", "always"] rs = RadioSetting( - "artsbeep", "ARTS Beep", - RadioSettingValueList(options, options[_settings.artsbeep])) + "artsbeep", "ARTS Beep", + RadioSettingValueList( + options, current_index=_settings.artsbeep)) arts.append(rs) rs = RadioSetting( @@ -681,8 +691,9 @@ def get_settings(self): # setup dtmf options = ["manual", "auto"] rs = RadioSetting( - "dtmfmode", "DTMF mode", - RadioSettingValueList(options, options[_settings.dtmfmode])) + "dtmfmode", "DTMF mode", + RadioSettingValueList( + options, current_index=_settings.dtmfmode)) dtmf.append(rs) for i in range(0, 8+1): diff --git a/chirp/drivers/vx3.py b/chirp/drivers/vx3.py index 6cff0838..4d0d94f9 100644 --- a/chirp/drivers/vx3.py +++ b/chirp/drivers/vx3.py @@ -606,143 +606,177 @@ def get_settings(self): RadioSettingValueBoolean(_settings.wx_alert))) opts = ["Bar Int", "Bar Ext"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "am_antenna", "AM antenna", - RadioSettingValueList(opts, opts[_settings.am_antenna]))) + RadioSettingValueList( + opts, current_index=_settings.am_antenna))) opts = ["Ext Ant", "Earphone"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "fm_antenna", "FM antenna", - RadioSettingValueList(opts, opts[_settings.fm_antenna]))) + RadioSettingValueList( + opts, current_index=_settings.fm_antenna))) opts = ["off"] + ["%0.1f" % (t / 60.0) for t in range(30, 750, 30)] basic.append(RadioSetting( "apo", "APO time (hrs)", - RadioSettingValueList(opts, opts[_settings.apo]))) + RadioSettingValueList(opts, current_index=_settings.apo))) opts = ["+/- 5 MHz", "+/- 10 MHz", "+/- 50 MHz", "+/- 100 MHz"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "channel_counter", "Channel counter", - RadioSettingValueList(opts, opts[_settings.channel_counter]))) + RadioSettingValueList( + opts, current_index=_settings.channel_counter))) opts = ["0.3", "0.5", "0.7", "1.0", "1.5"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "fw_key_timer", "FW key timer (s)", - RadioSettingValueList(opts, opts[_settings.fw_key_timer]))) + RadioSettingValueList( + opts, current_index=_settings.fw_key_timer))) opts = ["Home", "Reverse"] basic.append(RadioSetting( "hm_rv", "HM/RV key", - RadioSettingValueList(opts, opts[_settings.hm_rv]))) + RadioSettingValueList(opts, current_index=_settings.hm_rv))) opts = ["%d" % t for t in range(2, 11)] + ["continuous", "off"] basic.append(RadioSetting( "lamp", "Lamp Timer (s)", - RadioSettingValueList(opts, opts[_settings.lamp]))) + RadioSettingValueList(opts, current_index=_settings.lamp))) basic.append(RadioSetting( "lock", "Lock", RadioSettingValueBoolean(_settings.lock))) opts = ["key", "ptt", "key+ptt"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "lock_mode", "Lock mode", - RadioSettingValueList(opts, opts[_settings.lock_mode]))) + RadioSettingValueList( + opts, current_index=_settings.lock_mode))) opts = ["10", "20", "50", "100"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "mem_ch_step", "Memory Chan step", - RadioSettingValueList(opts, opts[_settings.mem_ch_step]))) + RadioSettingValueList( + opts, current_index=_settings.mem_ch_step))) opts = ["lower", "next"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "mem_storage", "Memory storage mode", - RadioSettingValueList(opts, opts[_settings.mem_storage]))) + RadioSettingValueList( + opts, current_index=_settings.mem_storage))) opts = ["%d" % t for t in range(1, 10)] basic.append(RadioSetting( "mic_gain", "Mic gain", - RadioSettingValueList(opts, opts[_settings.mic_gain]))) + RadioSettingValueList(opts, current_index=_settings.mic_gain))) opts = ["monitor", "tone call"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "moni_tcall", "Moni/TCall button", - RadioSettingValueList(opts, opts[_settings.moni_tcall]))) + RadioSettingValueList( + opts, current_index=_settings.moni_tcall))) opts = ["off"] + \ ["%02d:%02d" % (t / 60, t % 60) for t in range(10, 1450, 10)] basic.append(RadioSetting( "on_timer", "On Timer (hrs)", - RadioSettingValueList(opts, opts[_settings.on_timer]))) + RadioSettingValueList(opts, current_index=_settings.on_timer))) opts2 = ["off"] + \ ["0.%d" % t for t in range(1, 10)] + \ ["%1.1f" % (t / 10.0) for t in range(10, 105, 5)] - basic.append(RadioSetting( + basic.append( + RadioSetting( "priority_time", "Priority time", - RadioSettingValueList(opts2, opts2[_settings.priority_time]))) + RadioSettingValueList( + opts2, current_index=_settings.priority_time))) opts = ["off", "20", "50", "100", "200"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "ptt_delay", "PTT delay (ms)", - RadioSettingValueList(opts, opts[_settings.ptt_delay]))) + RadioSettingValueList( + opts, current_index=_settings.ptt_delay))) basic.append(RadioSetting( "rx_save", "RX save (s)", - RadioSettingValueList(opts2, opts2[_settings.rx_save]))) + RadioSettingValueList(opts2, current_index=_settings.rx_save))) - basic.append(RadioSetting( + basic.append( + RadioSetting( "scan_restart", "Scan restart (s)", - RadioSettingValueList(opts2, opts2[_settings.scan_restart]))) + RadioSettingValueList( + opts2, current_index=_settings.scan_restart))) opts = ["%1.1f" % (t / 10.0) for t in range(20, 105, 5)] + \ ["busy", "hold"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "scan_resume", "Scan resume (s)", - RadioSettingValueList(opts, opts[_settings.scan_resume]))) + RadioSettingValueList( + opts, current_index=_settings.scan_resume))) opts = ["single", "continuous"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "smart_search", "Smart search", - RadioSettingValueList(opts, opts[_settings.smart_search]))) + RadioSettingValueList( + opts, current_index=_settings.smart_search))) opts = ["off"] + ["TRX %d" % t for t in range(1, 11)] + ["hold"] + \ ["TX %d" % t for t in range(1, 11)] - basic.append(RadioSetting( + basic.append( + RadioSetting( "sub_rx_timer", "Sub RX timer", - RadioSettingValueList(opts, opts[_settings.sub_rx_timer]))) + RadioSettingValueList( + opts, current_index=_settings.sub_rx_timer))) opts = ["C", "F"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "temp_unit", "Temperature unit", - RadioSettingValueList(opts, opts[_settings.temp_unit]))) + RadioSettingValueList( + opts, current_index=_settings.temp_unit))) opts = ["off"] + ["%1.1f" % (t / 10.0) for t in range(5, 105, 5)] basic.append(RadioSetting( "tot", "Time-out timer (mins)", - RadioSettingValueList(opts, opts[_settings.tot]))) + RadioSettingValueList(opts, current_index=_settings.tot))) opts = ["all", "band"] basic.append(RadioSetting( "vfo_mode", "VFO mode", - RadioSettingValueList(opts, opts[_settings.vfo_mode]))) + RadioSettingValueList(opts, current_index=_settings.vfo_mode))) opts = ["off"] + ["%d" % t for t in range(5, 65, 5)] + ["EAI"] basic.append(RadioSetting( "wake_up", "Wake up (s)", - RadioSettingValueList(opts, opts[_settings.wake_up]))) + RadioSettingValueList(opts, current_index=_settings.wake_up))) opts = ["hold", "3 secs"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "vol_key_mode", "Volume key mode", - RadioSettingValueList(opts, opts[_settings.vol_key_mode]))) + RadioSettingValueList( + opts, current_index=_settings.vol_key_mode))) # subgroup programmable keys opts = ["INTNET", "INT MR", "Set Mode (my key)"] - basic.append(RadioSetting( + basic.append( + RadioSetting( "internet_key", "Internet key", - RadioSettingValueList(opts, opts[_settings.internet_key]))) + RadioSettingValueList( + opts, current_index=_settings.internet_key))) keys = ["Antenna AM", "Antenna FM", "Antenna Attenuator", "Auto Power Off", "Auto Repeater Shift", "ARTS Beep", @@ -771,8 +805,9 @@ def get_settings(self): "Tone Search Speed", "VFO Band", "VFO Skip", "Volume Mode", "Wake Up", "Weather Alert"] rs = RadioSetting( - "my_key", "My key", - RadioSettingValueList(keys, keys[_settings.my_key - 16])) + "my_key", "My key", + RadioSettingValueList( + keys, current_index=_settings.my_key - 16)) # TODO: fix keys list isn't exactly right order # leave disabled in settings for now # basic.append(rs) @@ -784,74 +819,88 @@ def get_settings(self): RadioSettingValueBoolean(_settings.band_edge_beep))) opts = ["off", "key+scan", "key"] - sound.append(RadioSetting( + sound.append( + RadioSetting( "beep_mode", "Beep mode", - RadioSettingValueList(opts, opts[_settings.beep_mode]))) + RadioSettingValueList( + opts, current_index=_settings.beep_mode))) _volumes = self._memobj.volumes opts = list(map(str, list(range(0, 33)))) sound.append(RadioSetting( "speaker_vol", "Speaker volume", - RadioSettingValueList(opts, opts[_volumes.speaker]))) + RadioSettingValueList(opts, current_index=_volumes.speaker))) sound.append(RadioSetting( "earphone_vol", "Earphone volume", - RadioSettingValueList(opts, opts[_volumes.earphone]))) + RadioSettingValueList(opts, current_index=_volumes.earphone))) opts = ["auto", "speaker"] - sound.append(RadioSetting( + sound.append( + RadioSetting( "fm_speaker_out", "FM Speaker out", - RadioSettingValueList(opts, opts[_settings.fm_speaker_out]))) + RadioSettingValueList( + opts, current_index=_settings.fm_speaker_out))) opts = ["mono", "stereo"] sound.append(RadioSetting( "fm_broadcast_mode", "FM broadcast mode", RadioSettingValueList( - opts, opts[_settings.fm_broadcast_mode]))) + opts, current_index=_settings.fm_broadcast_mode))) opts = list(map(str, list(range(16)))) sound.append(RadioSetting( "sql_fm", "Squelch level (FM)", - RadioSettingValueList(opts, opts[_settings.sql_fm]))) + RadioSettingValueList(opts, current_index=_settings.sql_fm))) opts = list(map(str, list(range(9)))) sound.append(RadioSetting( "sql_wfm", "Squelch level (WFM)", - RadioSettingValueList(opts, opts[_settings.sql_wfm]))) + RadioSettingValueList(opts, current_index=_settings.sql_wfm))) opts = list(map(str, list(range(16)))) - sound.append(RadioSetting( + sound.append( + RadioSetting( "radio_am_sql", "Squelch level (Broadcast Radio AM)", - RadioSettingValueList(opts, opts[_settings.radio_am_sql]))) + RadioSettingValueList( + opts, current_index=_settings.radio_am_sql))) opts = list(map(str, list(range(9)))) - sound.append(RadioSetting( + sound.append( + RadioSetting( "radio_fm_sql", "Squelch level (Broadcast Radio FM)", - RadioSettingValueList(opts, opts[_settings.radio_fm_sql]))) + RadioSettingValueList( + opts, current_index=_settings.radio_fm_sql))) # dtmf tab opts = ["manual", "auto"] - dtmf.append(RadioSetting( + dtmf.append( + RadioSetting( "dtmf_autodialer", "DTMF autodialer mode", - RadioSettingValueList(opts, opts[_settings.dtmf_autodialer]))) + RadioSettingValueList( + opts, current_index=_settings.dtmf_autodialer))) opts = ["50", "250", "450", "750", "1000"] - dtmf.append(RadioSetting( + dtmf.append( + RadioSetting( "dtmf_delay", "DTMF delay (ms)", - RadioSettingValueList(opts, opts[_settings.dtmf_delay]))) + RadioSettingValueList( + opts, current_index=_settings.dtmf_delay))) opts = ["50", "100"] - dtmf.append(RadioSetting( + dtmf.append( + RadioSetting( "dtmf_speed", "DTMF speed (ms)", - RadioSettingValueList(opts, opts[_settings.dtmf_speed]))) + RadioSettingValueList( + opts, current_index=_settings.dtmf_speed))) opts = list(map(str, list(range(10)))) dtmf.append(RadioSetting( "dtmf_chan_active", "DTMF active", RadioSettingValueList( - opts, opts[_settings.dtmf_chan_active]))) + opts, current_index=_settings.dtmf_chan_active))) for i in range(10): name = "dtmf" + str(i) @@ -872,14 +921,18 @@ def get_settings(self): RadioSettingValueBoolean(_settings.arts))) opts = ["off", "in range", "always"] - arts.append(RadioSetting( + arts.append( + RadioSetting( "arts_beep", "ARTS beep", - RadioSettingValueList(opts, opts[_settings.arts_beep]))) + RadioSettingValueList( + opts, current_index=_settings.arts_beep))) opts = ["15", "25"] - arts.append(RadioSetting( + arts.append( + RadioSetting( "arts_interval", "ARTS interval", - RadioSettingValueList(opts, opts[_settings.arts_interval]))) + RadioSettingValueList( + opts, current_index=_settings.arts_interval))) arts.append(RadioSetting( "arts_cwid_enable", "CW ID", @@ -904,21 +957,23 @@ def get_settings(self): eai.append(RadioSetting( "emergency_eai_time", "EAI time", RadioSettingValueList( - opts, opts[_settings.emergency_eai_time]))) + opts, current_index=_settings.emergency_eai_time))) opts = ["beep", "strobe", "beep+strobe", "beam", "beep+beam", "cw", "beep+cw", "cwt"] eai.append(RadioSetting( "emergency_signal", "emergency signal", RadioSettingValueList( - opts, opts[_settings.emergency_signal]))) + opts, current_index=_settings.emergency_signal))) # msg tab opts = ["off", "dc voltage", "message"] - msg.append(RadioSetting( + msg.append( + RadioSetting( "openmsg_mode", "Opening message mode", - RadioSettingValueList(opts, opts[_settings.openmsg_mode]))) + RadioSettingValueList( + opts, current_index=_settings.openmsg_mode))) openmsg = RadioSettingValueString( 0, 6, self._decode_chars(_settings.openmsg.get_value())) diff --git a/chirp/drivers/vx8.py b/chirp/drivers/vx8.py index acd8087a..55a4aefc 100644 --- a/chirp/drivers/vx8.py +++ b/chirp/drivers/vx8.py @@ -827,7 +827,7 @@ def _get_aprs_general_settings(self): if aprs.custom_symbol >= len(chirp_common.APRS_SYMBOLS): symbols.append("%d" % aprs.custom_symbol) selected = len(symbols) - 1 - val = RadioSettingValueList(symbols, symbols[selected]) + val = RadioSettingValueList(symbols, current_index=selected) rs = RadioSetting("aprs.custom_symbol_text", "User Selected Symbol", val) rs.set_apply_callback(self.apply_custom_symbol, aprs) @@ -858,7 +858,7 @@ def _get_aprs_general_settings(self): # position_str[1] = "%s %s" % (latitude, longitude) # position_str[2] = "%s %s" % (latitude, longitude) val = RadioSettingValueList(position_str, - position_str[aprs.selected_position]) + current_index=aprs.selected_position) rs = RadioSetting("aprs.selected_position", "My Position", val) menu.append(rs) @@ -1087,8 +1087,8 @@ def _get_aprs_tx_settings(self): rs.set_apply_callback(self.apply_ff_padded_string, self._memobj.aprs_beacon_status_txt[index]) menu.append(rs) - val = RadioSettingValueList(desc, - desc[aprs.selected_beacon_status_txt]) + val = RadioSettingValueList( + desc, current_index=aprs.selected_beacon_status_txt) rs = RadioSetting("aprs.selected_beacon_status_txt", "Beacon Status Text", val) menu.append(rs) @@ -1121,7 +1121,7 @@ def _get_aprs_tx_settings(self): path_str[7] = self._DIGI_PATHS[7] val = RadioSettingValueList(path_str, - path_str[aprs2.selected_digi_path]) + current_index=aprs2.selected_digi_path) rs = RadioSetting("aprs2.selected_digi_path", "Selected Digi Path", val) menu.append(rs) @@ -1525,8 +1525,8 @@ def _get_aprs_tx_settings(self): rs.set_apply_callback(self.apply_ff_padded_string, self._memobj.aprs_beacon_status_txt[index]) menu.append(rs) - val = RadioSettingValueList(desc, - desc[aprs.selected_beacon_status_txt]) + val = RadioSettingValueList( + desc, current_index=aprs.selected_beacon_status_txt) rs = RadioSetting("aprs.selected_beacon_status_txt", "Beacon Status Text", val) menu.append(rs) @@ -1585,7 +1585,7 @@ def _get_aprs_tx_settings(self): path_str[6] = self._DIGI_PATHS[6] path_str[7] = self._DIGI_PATHS[7] val = RadioSettingValueList(path_str, - path_str[aprs2.selected_digi_path]) + current_index=aprs2.selected_digi_path) rs = RadioSetting("aprs2.selected_digi_path", "Selected Digi Path", val) menu.append(rs) diff --git a/chirp/drivers/wouxun.py b/chirp/drivers/wouxun.py index 98c3ca34..f8965c86 100644 --- a/chirp/drivers/wouxun.py +++ b/chirp/drivers/wouxun.py @@ -409,9 +409,8 @@ def _filter(name): # add some radio specific settings options = ["Off", "Welcome", "V bat"] - rs = RadioSetting("ponmsg", "Poweron message", - RadioSettingValueList( - options, options[self._memobj.settings.ponmsg])) + rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( + options, current_index=self._memobj.settings.ponmsg)) cfg_s.append(rs) rs = RadioSetting("strings.welcome1", "Power-On Message 1", RadioSettingValueString( @@ -426,26 +425,26 @@ def _filter(name): 0, 6, _filter(self._memobj.strings.single_band))) cfg_s.append(rs) options = ["Channel", "ch/freq", "Name", "VFO"] - rs = RadioSetting("vfo_a_ch_disp", "VFO A Channel disp mode", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_a_ch_disp])) + rs = RadioSetting( + "vfo_a_ch_disp", "VFO A Channel disp mode", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_a_ch_disp)) cfg_s.append(rs) - rs = RadioSetting("vfo_b_ch_disp", "VFO B Channel disp mode", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_b_ch_disp])) + rs = RadioSetting( + "vfo_b_ch_disp", "VFO B Channel disp mode", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_b_ch_disp)) cfg_s.append(rs) options = ["5.0", "6.25", "10.0", "12.5", "25.0", "50.0", "100.0"] - rs = RadioSetting("vfo_a_fr_step", "VFO A Frequency Step", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_a_fr_step])) + rs = RadioSetting( + "vfo_a_fr_step", "VFO A Frequency Step", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_a_fr_step)) cfg_s.append(rs) - rs = RadioSetting("vfo_b_fr_step", "VFO B Frequency Step", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_b_fr_step])) + rs = RadioSetting( + "vfo_b_fr_step", "VFO B Frequency Step", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_b_fr_step)) cfg_s.append(rs) rs = RadioSetting("vfo_a_squelch", "VFO A Squelch", RadioSettingValueInteger( @@ -472,16 +471,17 @@ def _filter(name): self._memobj.settings.power_save)) cfg_s.append(rs) options = ["Off", "Scan", "Lamp", "SOS", "Radio"] - rs = RadioSetting("pf1_function", "PF1 Function select", - RadioSettingValueList( - options, - options[self._memobj.settings.pf1_function])) + rs = RadioSetting( + "pf1_function", "PF1 Function select", + RadioSettingValueList( + options, + current_index=self._memobj.settings.pf1_function)) cfg_s.append(rs) options = ["Off", "Begin", "End", "Both"] rs = RadioSetting("roger_beep", "Roger beep select", RadioSettingValueList( options, - options[self._memobj.settings.roger_beep])) + current_index=self._memobj.settings.roger_beep)) cfg_s.append(rs) options = ["%s" % x for x in range(15, 615, 15)] transmit_time_out = options[self._memobj.settings.transmit_time_out] @@ -498,9 +498,8 @@ def _filter(name): 0, 10, self._memobj.settings.vox)) cfg_s.append(rs) options = ["Off", "Chinese", "English"] - rs = RadioSetting("voice", "Voice", - RadioSettingValueList( - options, options[self._memobj.settings.voice])) + rs = RadioSetting("voice", "Voice", RadioSettingValueList( + options, current_index=self._memobj.settings.voice)) cfg_s.append(rs) rs = RadioSetting("beep", "Beep", RadioSettingValueBoolean( @@ -515,16 +514,17 @@ def _filter(name): 0, 30, self._memobj.settings.ani_id_tx_delay)) cfg_s.append(rs) options = ["Off", "Key", "ANI", "Key+ANI"] - rs = RadioSetting("ani_id_sidetone", "ANI id sidetone", - RadioSettingValueList( - options, - options[self._memobj.settings.ani_id_sidetone])) + rs = RadioSetting( + "ani_id_sidetone", "ANI id sidetone", + RadioSettingValueList( + options, + current_index=self._memobj.settings.ani_id_sidetone)) cfg_s.append(rs) options = ["Time", "Carrier", "Search"] rs = RadioSetting("scan_mode", "Scan mode", RadioSettingValueList( options, - options[self._memobj.settings.scan_mode])) + current_index=self._memobj.settings.scan_mode)) cfg_s.append(rs) rs = RadioSetting("kbd_lock", "Keyboard lock", RadioSettingValueBoolean( @@ -542,7 +542,7 @@ def _filter(name): rs = RadioSetting("sos_ch", "SOS CH", RadioSettingValueList( options, - options[self._memobj.settings.sos_ch])) + current_index=self._memobj.settings.sos_ch)) cfg_s.append(rs) rs = RadioSetting("stopwatch", "Stopwatch", RadioSettingValueBoolean( @@ -556,14 +556,14 @@ def _filter(name): rs = RadioSetting("current_vfo", "Current VFO", RadioSettingValueList( options, - options[self._memobj.settings.current_vfo])) + current_index=self._memobj.settings.current_vfo)) cfg_s.append(rs) options = ["Dual", "Single"] - rs = RadioSetting("sd_available", "Single/Dual Band", - RadioSettingValueList( - options, - options[self._memobj.settings.sd_available])) + rs = RadioSetting( + "sd_available", "Single/Dual Band", + RadioSettingValueList( + options, current_index=self._memobj.settings.sd_available)) cfg_s.append(rs) _pwd = self._memobj.settings.mode_password @@ -795,7 +795,7 @@ def get_memory(self, number): options = ["NFM", "FM"] iswidex = RadioSetting("iswidex", "Mode TX(KG-UV6X)", RadioSettingValueList( - options, options[_mem.iswidex])) + options, current_index=_mem.iswidex)) iswidex.set_doc("Mode TX") mem.extra.append(iswidex) @@ -1140,9 +1140,8 @@ def _filter(name): # add some radio specific settings options = ["Off", "Welcome", "V bat", "N/A(KG-UV6X)"] - rs = RadioSetting("ponmsg", "Poweron message", - RadioSettingValueList( - options, options[self._memobj.settings.ponmsg])) + rs = RadioSetting("ponmsg", "Poweron message", RadioSettingValueList( + options, current_index=self._memobj.settings.ponmsg)) cfg_s.append(rs) rs = RadioSetting("strings.welcome1", "Power-On Message 1", RadioSettingValueString( @@ -1157,27 +1156,27 @@ def _filter(name): 0, 6, _filter(self._memobj.strings.single_band))) cfg_s.append(rs) options = ["Channel", "ch/freq", "Name", "VFO"] - rs = RadioSetting("vfo_a_ch_disp", "VFO A Channel disp mode", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_a_ch_disp])) + rs = RadioSetting( + "vfo_a_ch_disp", "VFO A Channel disp mode", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_a_ch_disp)) cfg_s.append(rs) - rs = RadioSetting("vfo_b_ch_disp", "VFO B Channel disp mode", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_b_ch_disp])) + rs = RadioSetting( + "vfo_b_ch_disp", "VFO B Channel disp mode", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_b_ch_disp)) cfg_s.append(rs) options = \ ["2.5", "5.0", "6.25", "10.0", "12.5", "25.0", "50.0", "100.0"] - rs = RadioSetting("vfo_a_fr_step", "VFO A Frequency Step", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_a_fr_step])) + rs = RadioSetting( + "vfo_a_fr_step", "VFO A Frequency Step", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_a_fr_step)) cfg_s.append(rs) - rs = RadioSetting("vfo_b_fr_step", "VFO B Frequency Step", - RadioSettingValueList( - options, - options[self._memobj.settings.vfo_b_fr_step])) + rs = RadioSetting( + "vfo_b_fr_step", "VFO B Frequency Step", + RadioSettingValueList( + options, current_index=self._memobj.settings.vfo_b_fr_step)) cfg_s.append(rs) rs = RadioSetting("vfo_a_squelch", "VFO A Squelch", RadioSettingValueInteger( @@ -1204,22 +1203,24 @@ def _filter(name): self._memobj.settings.power_save)) cfg_s.append(rs) options = ["Off", "Scan", "Lamp", "SOS", "Radio"] - rs = RadioSetting("pf1_function", "PF1 Function select", - RadioSettingValueList( - options, - options[self._memobj.settings.pf1_function])) + rs = RadioSetting( + "pf1_function", "PF1 Function select", + RadioSettingValueList( + options, + current_index=self._memobj.settings.pf1_function)) cfg_s.append(rs) options = ["Off", "Radio", "fr/ch", "Rpt", "Stopwatch", "Lamp", "SOS"] - rs = RadioSetting("pf2_function", "PF2 Function select", - RadioSettingValueList( - options, - options[self._memobj.settings.pf2_function])) + rs = RadioSetting( + "pf2_function", "PF2 Function select", + RadioSettingValueList( + options, + current_index=self._memobj.settings.pf2_function)) cfg_s.append(rs) options = ["Off", "Begin", "End", "Both"] rs = RadioSetting("roger_beep", "Roger beep select", RadioSettingValueList( options, - options[self._memobj.settings.roger_beep])) + current_index=self._memobj.settings.roger_beep)) cfg_s.append(rs) options = ["%s" % x for x in range(15, 615, 15)] transmit_time_out = options[self._memobj.settings.transmit_time_out] @@ -1236,9 +1237,8 @@ def _filter(name): 0, 10, self._memobj.settings.vox)) cfg_s.append(rs) options = ["Off", "Chinese", "English"] - rs = RadioSetting("voice", "Voice", - RadioSettingValueList( - options, options[self._memobj.settings.voice])) + rs = RadioSetting("voice", "Voice", RadioSettingValueList( + options, current_index=self._memobj.settings.voice)) cfg_s.append(rs) rs = RadioSetting("beep", "Beep", RadioSettingValueBoolean( @@ -1253,16 +1253,17 @@ def _filter(name): 0, 30, self._memobj.settings.ani_id_tx_delay)) cfg_s.append(rs) options = ["Off", "Key", "ANI", "Key+ANI"] - rs = RadioSetting("ani_id_sidetone", "ANI id sidetone", - RadioSettingValueList( - options, - options[self._memobj.settings.ani_id_sidetone])) + rs = RadioSetting( + "ani_id_sidetone", "ANI id sidetone", + RadioSettingValueList( + options, + current_index=self._memobj.settings.ani_id_sidetone)) cfg_s.append(rs) options = ["Time", "Carrier", "Search"] rs = RadioSetting("scan_mode", "Scan mode", RadioSettingValueList( options, - options[self._memobj.settings.scan_mode])) + current_index=self._memobj.settings.scan_mode)) cfg_s.append(rs) rs = RadioSetting("kbd_lock", "Keyboard lock", RadioSettingValueBoolean( @@ -1277,9 +1278,8 @@ def _filter(name): self._memobj.settings.auto_backlight)) cfg_s.append(rs) options = ["CH A", "CH B"] - rs = RadioSetting("sos_ch", "SOS CH", - RadioSettingValueList( - options, options[self._memobj.settings.sos_ch])) + rs = RadioSetting("sos_ch", "SOS CH", RadioSettingValueList( + options, current_index=self._memobj.settings.sos_ch)) cfg_s.append(rs) rs = RadioSetting("stopwatch", "Stopwatch", RadioSettingValueBoolean( @@ -1293,14 +1293,14 @@ def _filter(name): rs = RadioSetting("current_vfo", "Current VFO", RadioSettingValueList( options, - options[self._memobj.settings.current_vfo])) + current_index=self._memobj.settings.current_vfo)) cfg_s.append(rs) options = ["Dual", "Single"] - rs = RadioSetting("sd_available", "Single/Dual Band", - RadioSettingValueList( - options, - options[self._memobj.settings.sd_available])) + rs = RadioSetting( + "sd_available", "Single/Dual Band", + RadioSettingValueList( + options, current_index=self._memobj.settings.sd_available)) cfg_s.append(rs) _pwd = self._memobj.settings.mode_password From 5221692237e0bb336df0e00f3f0b990cd855c4d1 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 8 Sep 2024 17:28:58 -0700 Subject: [PATCH 3/6] Mass convert self.LIST settings indexes --- chirp/drivers/baofeng_common.py | 4 +- chirp/drivers/baofeng_uv17Pro.py | 27 ++++---- chirp/drivers/bjuv55.py | 16 ++--- chirp/drivers/btech.py | 2 +- chirp/drivers/ft1d.py | 110 +++++++++++++++---------------- chirp/drivers/ft450d.py | 8 +-- chirp/drivers/ft70.py | 77 +++++++++++----------- chirp/drivers/ft857.py | 27 ++++---- chirp/drivers/gmrsuv1.py | 4 +- chirp/drivers/gmrsv2.py | 4 +- chirp/drivers/h777.py | 10 +-- chirp/drivers/hf90.py | 4 +- chirp/drivers/kguv9dplus.py | 4 +- chirp/drivers/mursv1.py | 4 +- chirp/drivers/retevis_rb28.py | 4 +- chirp/drivers/thd72.py | 14 ++-- chirp/drivers/vx6.py | 70 ++++++++++---------- chirp/drivers/vx8.py | 96 +++++++++++++-------------- 18 files changed, 238 insertions(+), 247 deletions(-) diff --git a/chirp/drivers/baofeng_common.py b/chirp/drivers/baofeng_common.py index 445364c1..0b478d04 100644 --- a/chirp/drivers/baofeng_common.py +++ b/chirp/drivers/baofeng_common.py @@ -660,12 +660,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(self.PTTID_LIST, - self.PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("scode", "S-CODE", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[_mem.scode])) + current_index=_mem.scode)) mem.extra.append(rs) immutable = [] diff --git a/chirp/drivers/baofeng_uv17Pro.py b/chirp/drivers/baofeng_uv17Pro.py index c71e57cd..777f489a 100644 --- a/chirp/drivers/baofeng_uv17Pro.py +++ b/chirp/drivers/baofeng_uv17Pro.py @@ -527,7 +527,7 @@ def get_settings_common_basic(self, basic, _mem): val = _mem.settings.squelch rs = RadioSetting("settings.squelch", "Squelch", RadioSettingValueList( - self.SQUELCH_LIST, self.SQUELCH_LIST[val])) + self.SQUELCH_LIST, current_index=val)) basic.append(rs) if _mem.settings.tot >= len(self.LIST_TIMEOUT): @@ -536,7 +536,7 @@ def get_settings_common_basic(self, basic, _mem): val = _mem.settings.tot rs = RadioSetting("settings.tot", "Timeout Timer", RadioSettingValueList( - self.LIST_TIMEOUT, self.LIST_TIMEOUT[val])) + self.LIST_TIMEOUT, current_index=val)) basic.append(rs) rs = RadioSetting("settings.dualstandby", "Dual Watch", @@ -550,8 +550,7 @@ def get_settings_common_basic(self, basic, _mem): "Power On Display Type", RadioSettingValueList( self.LIST_POWERON_DISPLAY_TYPE, - self.LIST_POWERON_DISPLAY_TYPE[ - _mem.settings.powerondistype])) + current_index=_mem.settings.powerondistype)) basic.append(rs) if _mem.settings.voice >= len(self.LIST_VOICE): @@ -560,7 +559,7 @@ def get_settings_common_basic(self, basic, _mem): val = _mem.settings.voice rs = RadioSetting("settings.voice", "Voice Prompt", RadioSettingValueList( - self.LIST_VOICE, self.LIST_VOICE[val])) + self.LIST_VOICE, current_index=val)) basic.append(rs) rs = RadioSetting("settings.voicesw", "Enable Voice", @@ -574,7 +573,7 @@ def get_settings_common_basic(self, basic, _mem): rs = RadioSetting("settings.backlight", "Backlight Timer", RadioSettingValueList( self.LIST_BACKLIGHT_TIMER, - self.LIST_BACKLIGHT_TIMER[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("settings.autolock", "Key Auto Lock", @@ -593,13 +592,13 @@ def get_settings_common_basic(self, basic, _mem): rs = RadioSetting("settings.chadistype", "Channel A display type", RadioSettingValueList( self.LIST_MODE, - self.LIST_MODE[_mem.settings.chadistype])) + current_index=_mem.settings.chadistype)) basic.append(rs) rs = RadioSetting("settings.chbdistype", "Channel B display type", RadioSettingValueList( self.LIST_MODE, - self.LIST_MODE[_mem.settings.chbdistype])) + current_index=_mem.settings.chbdistype)) basic.append(rs) def get_settings_pro_basic(self, basic, _mem): @@ -610,7 +609,7 @@ def get_settings_pro_basic(self, basic, _mem): val = _mem.settings.savemode rs = RadioSetting("settings.savemode", "Save Mode", RadioSettingValueList(self.LIST_PW_SAVEMODE, - self.LIST_PW_SAVEMODE[val])) + current_index=val)) basic.append(rs) rs = RadioSetting("settings.totalarm", "Timeout Timer Alarm", @@ -892,7 +891,7 @@ def apply_offset(setting, obj): val = _mem.vfo.a.scode rs = RadioSetting("vfo.a.scode", "Signal Code", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[val])) + current_index=val)) vfoA.append(rs) if _mem.vfo.b.scode >= len(self.SCODE_LIST): @@ -901,7 +900,7 @@ def apply_offset(setting, obj): val = _mem.vfo.b.scode rs = RadioSetting("vfo.b.scode", "Signal Code", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[val])) + current_index=val)) vfoB.append(rs) if _mem.vfo.a.step >= len(STEPS): @@ -1176,15 +1175,13 @@ def get_memory_common(self, _mem, name, mem): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(self.PTTID_LIST, - self.PTTID_LIST[ - _mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) scode = (_mem.scode - self._scode_offset) % len(self.SCODE_LIST) rs = RadioSetting("scode", "S-CODE", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[ - scode])) + current_index=scode)) mem.extra.append(rs) mem.name = str(name).replace('\xFF', ' ').replace('\x00', ' ').rstrip() diff --git a/chirp/drivers/bjuv55.py b/chirp/drivers/bjuv55.py index 87cacb88..ee702493 100644 --- a/chirp/drivers/bjuv55.py +++ b/chirp/drivers/bjuv55.py @@ -286,7 +286,7 @@ def _get_settings(self): rs = RadioSetting("tdrab", "Dual Watch TX Priority", RadioSettingValueList( uv5r.TDRAB_LIST, - uv5r.TDRAB_LIST[_settings.tdrab])) + current_index=_settings.tdrab)) advanced.append(rs) rs = RadioSetting("alarm", "Alarm", @@ -300,23 +300,23 @@ def _get_settings(self): rs = RadioSetting("timeout", "Timeout Timer", RadioSettingValueList( uv5r.TIMEOUT_LIST, - uv5r.TIMEOUT_LIST[_settings.timeout])) + current_index=_settings.timeout)) basic.append(rs) rs = RadioSetting("screv", "Scan Resume", RadioSettingValueList( uv5r.RESUME_LIST, - uv5r.RESUME_LIST[_settings.screv])) + current_index=_settings.screv)) advanced.append(rs) rs = RadioSetting("mdfa", "Display Mode (A)", RadioSettingValueList( - uv5r.MODE_LIST, uv5r.MODE_LIST[_settings.mdfa])) + uv5r.MODE_LIST, current_index=_settings.mdfa)) basic.append(rs) rs = RadioSetting("mdfb", "Display Mode (B)", RadioSettingValueList( - uv5r.MODE_LIST, uv5r.MODE_LIST[_settings.mdfb])) + uv5r.MODE_LIST, current_index=_settings.mdfb)) basic.append(rs) rs = RadioSetting("bcl", "Busy Channel Lockout", @@ -620,19 +620,19 @@ def apply_code(setting, obj): rs = RadioSetting("dtmfst", "DTMF Sidetone", RadioSettingValueList( uv5r.DTMFST_LIST, - uv5r.DTMFST_LIST[_settings.dtmfst])) + current_index=_settings.dtmfst)) dtmf.append(rs) rs = RadioSetting("ani.dtmfon", "DTMF Speed (on)", RadioSettingValueList( uv5r.DTMFSPEED_LIST, - uv5r.DTMFSPEED_LIST[self._memobj.ani.dtmfon])) + current_index=self._memobj.ani.dtmfon)) dtmf.append(rs) rs = RadioSetting("ani.dtmfoff", "DTMF Speed (off)", RadioSettingValueList( uv5r.DTMFSPEED_LIST, - uv5r.DTMFSPEED_LIST[self._memobj.ani.dtmfoff])) + current_index=self._memobj.ani.dtmfoff)) dtmf.append(rs) return group diff --git a/chirp/drivers/btech.py b/chirp/drivers/btech.py index b932d22d..55324f8b 100644 --- a/chirp/drivers/btech.py +++ b/chirp/drivers/btech.py @@ -1118,7 +1118,7 @@ def get_settings(self): # Basic if self.COLOR_LCD: val = min(_mem.settings.tmr, len(self.LIST_TMR) - 1) - rs = RadioSettingValueList(self.LIST_TMR, self.LIST_TMR[val]) + rs = RadioSettingValueList(self.LIST_TMR, current_index=val) tmr = RadioSetting("settings.tmr", "Transceiver multi-receive", rs) basic.append(tmr) else: diff --git a/chirp/drivers/ft1d.py b/chirp/drivers/ft1d.py index 6d1836a0..c0b5ad44 100644 --- a/chirp/drivers/ft1d.py +++ b/chirp/drivers/ft1d.py @@ -1315,12 +1315,12 @@ def _get_aprs_general_settings(self): val = RadioSettingValueList( chirp_common.APRS_SSID, - chirp_common.APRS_SSID[aprs.my_callsign.ssid]) + current_index=aprs.my_callsign.ssid) rs = RadioSetting("aprs.my_callsign.ssid", "My SSID", val) menu.append(rs) val = RadioSettingValueList(self._MY_SYMBOL, - self._MY_SYMBOL[aprs.selected_my_symbol]) + current_index=aprs.selected_my_symbol) rs = RadioSetting("aprs.selected_my_symbol", "My Symbol", val) menu.append(rs) @@ -1337,7 +1337,7 @@ def _get_aprs_general_settings(self): val = RadioSettingValueList( chirp_common.APRS_POSITION_COMMENT, - chirp_common.APRS_POSITION_COMMENT[aprs.selected_position_comment]) + current_index=aprs.selected_position_comment) rs = RadioSetting("aprs.selected_position_comment", "Position Comment", val) menu.append(rs) @@ -1375,67 +1375,67 @@ def _get_aprs_general_settings(self): menu.append(rs) val = RadioSettingValueList( - self._TIME_SOURCE, self._TIME_SOURCE[aprs.set_time_manually]) + self._TIME_SOURCE, current_index=aprs.set_time_manually) rs = RadioSetting("aprs.set_time_manually", "Time Source", val) menu.append(rs) - val = RadioSettingValueList(self._TZ, self._TZ[aprs.timezone]) + val = RadioSettingValueList(self._TZ, current_index=aprs.timezone) rs = RadioSetting("aprs.timezone", "Timezone", val) menu.append(rs) val = RadioSettingValueList(self._SPEED_UNITS, - self._SPEED_UNITS[aprs.aprs_units_speed]) + current_index=aprs.aprs_units_speed) rs = RadioSetting("aprs.aprs_units_speed", "APRS Speed Units", val) menu.append(rs) val = RadioSettingValueList(self._SPEED_UNITS, - self._SPEED_UNITS[aprs.gps_units_speed]) + current_index=aprs.gps_units_speed) rs = RadioSetting("aprs.gps_units_speed", "GPS Speed Units", val) menu.append(rs) val = RadioSettingValueList( - self._ALT_UNITS, self._ALT_UNITS[aprs.aprs_units_altitude_ft]) + self._ALT_UNITS, current_index=aprs.aprs_units_altitude_ft) rs = RadioSetting("aprs.aprs_units_altitude_ft", "APRS Altitude Units", val) menu.append(rs) val = RadioSettingValueList( - self._ALT_UNITS, self._ALT_UNITS[aprs.gps_units_altitude_ft]) + self._ALT_UNITS, current_index=aprs.gps_units_altitude_ft) rs = RadioSetting("aprs.gps_units_altitude_ft", "GPS Altitude Units", val) menu.append(rs) val = RadioSettingValueList( - self._POS_UNITS, self._POS_UNITS[aprs.aprs_units_position_mmss]) + self._POS_UNITS, current_index=aprs.aprs_units_position_mmss) rs = RadioSetting("aprs.aprs_units_position_mmss", "APRS Position Format", val) menu.append(rs) val = RadioSettingValueList( - self._POS_UNITS, self._POS_UNITS[aprs.gps_units_position_sss]) + self._POS_UNITS, current_index=aprs.gps_units_position_sss) rs = RadioSetting("aprs.gps_units_position_sss", "GPS Position Format", val) menu.append(rs) val = RadioSettingValueList( - self._DIST_UNITS, self._DIST_UNITS[aprs.aprs_units_distance_m]) + self._DIST_UNITS, current_index=aprs.aprs_units_distance_m) rs = RadioSetting("aprs.aprs_units_distance_m", "APRS Distance Units", val) menu.append(rs) val = RadioSettingValueList(self._WIND_UNITS, - self._WIND_UNITS[aprs.aprs_units_wind_mph]) + current_index=aprs.aprs_units_wind_mph) rs = RadioSetting("aprs.aprs_units_wind_mph", "APRS Wind Speed Units", val) menu.append(rs) val = RadioSettingValueList( - self._RAIN_UNITS, self._RAIN_UNITS[aprs.aprs_units_rain_inch]) + self._RAIN_UNITS, current_index=aprs.aprs_units_rain_inch) rs = RadioSetting("aprs.aprs_units_rain_inch", "APRS Rain Units", val) menu.append(rs) val = RadioSettingValueList( - self._TEMP_UNITS, self._TEMP_UNITS[aprs.aprs_units_temperature_f]) + self._TEMP_UNITS, current_index=aprs.aprs_units_temperature_f) rs = RadioSetting("aprs.aprs_units_temperature_f", "APRS Temperature Units", val) menu.append(rs) @@ -1547,7 +1547,7 @@ def _get_aprs_rx_settings(self): menu = RadioSettingGroup("aprs_rx", "APRS Receive") aprs = self._memobj.aprs - val = RadioSettingValueList(self._RX_BAUD, self._RX_BAUD[aprs.rx_baud]) + val = RadioSettingValueList(self._RX_BAUD, current_index=aprs.rx_baud) rs = RadioSetting("aprs.rx_baud", "Modem RX", val) menu.append(rs) @@ -1569,37 +1569,37 @@ def _get_aprs_rx_settings(self): menu.append(rs) val = RadioSettingValueList(self._FLASH, - self._FLASH[aprs.flash_msg]) + current_index=aprs.flash_msg) rs = RadioSetting("aprs.flash_msg", "Flash on personal message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH, - self._FLASH[aprs.vibrate_msg]) + current_index=aprs.vibrate_msg) rs = RadioSetting("aprs.vibrate_msg", "Vibrate on personal message", val) menu.append(rs) val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs.flash_bln]) + current_index=aprs.flash_bln) rs = RadioSetting("aprs.flash_bln", "Flash on bulletin message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs.vibrate_bln]) + current_index=aprs.vibrate_bln) rs = RadioSetting("aprs.vibrate_bln", "Vibrate on bulletin message", val) menu.append(rs) val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs.flash_grp]) + current_index=aprs.flash_grp) rs = RadioSetting("aprs.flash_grp", "Flash on group message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs.vibrate_grp]) + current_index=aprs.vibrate_grp) rs = RadioSetting("aprs.vibrate_grp", "Vibrate on group message", val) menu.append(rs) @@ -1616,7 +1616,7 @@ def _get_aprs_rx_settings(self): # TODO: Use filter_val as the list entries and update it on edit. val = RadioSettingValueList( self._MSG_GROUP_NAMES, - self._MSG_GROUP_NAMES[aprs.selected_msg_group]) + current_index=aprs.selected_msg_group) rs = RadioSetting("aprs.selected_msg_group", "Selected Message Group", val) menu.append(rs) @@ -1659,18 +1659,18 @@ def _get_aprs_tx_settings(self): beacon_type = (aprs.tx_smartbeacon << 1) | aprs.tx_interval_beacon val = RadioSettingValueList(self._BEACON_TYPE, - self._BEACON_TYPE[beacon_type]) + current_index=beacon_type) rs = RadioSetting("aprs.transmit", "TX Beacons", val) rs.set_apply_callback(self.apply_beacon_type, aprs) menu.append(rs) val = RadioSettingValueList(self._TX_DELAY, - self._TX_DELAY[aprs.tx_delay]) + current_index=aprs.tx_delay) rs = RadioSetting("aprs.tx_delay", "TX Delay", val) menu.append(rs) val = RadioSettingValueList(self._BEACON_INT, - self._BEACON_INT[aprs.beacon_interval]) + current_index=aprs.beacon_interval) rs = RadioSetting("aprs.beacon_interval", "Beacon Interval", val) menu.append(rs) @@ -1757,7 +1757,7 @@ def _get_aprs_smartbeacon(self): val = RadioSettingValueList( self._SMARTBEACON_PROFILE, - self._SMARTBEACON_PROFILE[aprs.active_smartbeaconing]) + current_index=aprs.active_smartbeaconing) rs = RadioSetting("aprs.active_smartbeaconing", "SmartBeacon profile", val) menu.append(rs) @@ -1830,7 +1830,7 @@ def _get_digital_settings(self): digital_settings = self._memobj.digital_settings val = RadioSettingValueList( self._AMS_TX_MODE, - self._AMS_TX_MODE[digital_settings.ams_tx_mode]) + current_index=digital_settings.ams_tx_mode) rs = RadioSetting("digital_settings.ams_tx_mode", "AMS TX Mode", val) menu.append(rs) @@ -1838,14 +1838,14 @@ def _get_digital_settings(self): # 16 DIG VW Turn the VW mode selection ON or OFF. val = RadioSettingValueList( self._VW_MODE, - self._VW_MODE[digital_settings.vw_mode]) + current_index=digital_settings.vw_mode) rs = RadioSetting("digital_settings.vw_mode", "VW Mode", val) menu.append(rs) # TX DG-ID Long Press Mode Key, Dial val = RadioSettingValueList( self._DG_ID, - self._DG_ID[digital_settings.tx_dg_id]) + current_index=digital_settings.tx_dg_id) rs = RadioSetting("digital_settings.tx_dg_id", "TX DG-ID", val) menu.append(rs) @@ -1853,7 +1853,7 @@ def _get_digital_settings(self): # RX DG-ID Long Press Mode Key, Mode Key to select, Dial val = RadioSettingValueList( self._DG_ID, - self._DG_ID[digital_settings.rx_dg_id]) + current_index=digital_settings.rx_dg_id) rs = RadioSetting("digital_settings.rx_dg_id", "RX DG-ID", val) menu.append(rs) @@ -1863,9 +1863,9 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._DIG_POP_UP, - self._DIG_POP_UP[ + current_index=( 0 if digital_settings_more.digital_popup == 0 - else digital_settings_more.digital_popup - 9]) + else digital_settings_more.digital_popup - 9)) rs = RadioSetting("digital_settings_more.digital_popup", "Digital Popup", val) @@ -1876,7 +1876,7 @@ def _get_digital_settings(self): # 07 BEP.STB Standby Beep in the digital C4FM mode. On/Off val = RadioSettingValueList( self._STANDBY_BEEP, - self._STANDBY_BEEP[digital_settings.standby_beep]) + current_index=digital_settings.standby_beep) rs = RadioSetting("digital_settings.standby_beep", "Standby Beep", val) menu.append(rs) @@ -1886,7 +1886,7 @@ def _get_digital_settings(self): first_settings = self._memobj.first_settings val = RadioSettingValueList( self._GM_RING, - self._GM_RING[first_settings.gm_ring]) + current_index=first_settings.gm_ring) rs = RadioSetting("first_settings.gm_ring", "GM Ring", val) GMmenu.append(rs) @@ -1894,7 +1894,7 @@ def _get_digital_settings(self): scan_settings = self._memobj.scan_settings val = RadioSettingValueList( self._GM_INTERVAL, - self._GM_INTERVAL[scan_settings.gm_interval]) + current_index=scan_settings.gm_interval) rs = RadioSetting("scan_settings.gm_interval", "GM Interval", val) GMmenu.append(rs) @@ -1976,20 +1976,20 @@ def _get_dtmf_settings(self): val = RadioSettingValueList( self._DTMF_MODE, - self._DTMF_MODE[dtmf.dtmf_mode]) + current_index=dtmf.dtmf_mode) rs = RadioSetting("scan_settings.dtmf_mode", "DTMF Mode", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_SPEED, - self._DTMF_SPEED[dtmf.dtmf_speed]) + current_index=dtmf.dtmf_speed) rs = RadioSetting( "scan_settings.dtmf_speed", "DTMF AutoDial Speed", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_DELAY, - self._DTMF_DELAY[dtmf.dtmf_delay]) + current_index=dtmf.dtmf_delay) rs = RadioSetting( "scan_settings.dtmf_delay", "DTMF AutoDial Delay", val) menu.append(rs) @@ -2017,13 +2017,13 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._LCD_DIMMER, - self._LCD_DIMMER[scan_settings.lcd_dimmer]) + current_index=scan_settings.lcd_dimmer) rs = RadioSetting("scan_settings.lcd_dimmer", "LCD Dimmer", val) menu.append(rs) val = RadioSettingValueList( self._LCD_CONTRAST, - self._LCD_CONTRAST[scan_settings.lcd_contrast - 1]) + current_index=scan_settings.lcd_contrast - 1) rs = RadioSetting("scan_settings.lcd_contrast", "LCD Contrast", val) rs.set_apply_callback(self.apply_lcd_contrast, scan_settings) @@ -2031,7 +2031,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._LAMP_KEY, - self._LAMP_KEY[scan_settings.lamp]) + current_index=scan_settings.lamp) rs = RadioSetting("scan_settings.lamp", "Lamp", val) menu.append(rs) @@ -2039,7 +2039,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._BEEP_SELECT, - self._BEEP_SELECT[beep_select.beep]) + current_index=beep_select.beep) rs = RadioSetting("beep_select.beep", "Beep Select", val) menu.append(rs) @@ -2047,7 +2047,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._OPENING_MESSAGE, - self._OPENING_MESSAGE[opening_message.flag]) + current_index=opening_message.flag) rs = RadioSetting("opening_message.flag", "Opening Msg Mode", val) menu.append(rs) @@ -2104,7 +2104,7 @@ def _get_backtrack_settings(self): val = RadioSettingValueList( self._BACKTRACK_STATUS, - self._BACKTRACK_STATUS[0 if bt.status == 1 else 1]) + current_index=0 if bt.status == 1 else 1) rs = RadioSetting( "%s.status" % bt_idx, prefix + "status", val) @@ -2253,14 +2253,14 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._VOL_MODE, - self._VOL_MODE[scan_settings.vol_mode]) + current_index=scan_settings.vol_mode) rs = RadioSetting("scan_settings.vol_mode", "Volume Mode", val) menu.append(rs) vfoa = self._memobj.vfo_info[0] val = RadioSettingValueList( self._VOLUME, - self._VOLUME[vfoa.volume]) + current_index=vfoa.volume) rs = RadioSetting("vfo_info[0].volume", "VFO A Volume", val) rs.set_apply_callback(self.apply_volume, 0) menu.append(rs) @@ -2268,7 +2268,7 @@ def _get_scan_settings(self): vfob = self._memobj.vfo_info[1] val = RadioSettingValueList( self._VOLUME, - self._VOLUME[vfob.volume]) + current_index=vfob.volume) rs = RadioSetting("vfo_info[1].volume", "VFO B Volume", val) rs.set_apply_callback(self.apply_volume, 1) menu.append(rs) @@ -2276,43 +2276,43 @@ def _get_scan_settings(self): squelch = self._memobj.squelch val = RadioSettingValueList( self._SQUELCH, - self._SQUELCH[squelch.vfo_a]) + current_index=squelch.vfo_a) rs = RadioSetting("squelch.vfo_a", "VFO A Squelch", val) menu.append(rs) val = RadioSettingValueList( self._SQUELCH, - self._SQUELCH[squelch.vfo_b]) + current_index=squelch.vfo_b) rs = RadioSetting("squelch.vfo_b", "VFO B Squelch", val) menu.append(rs) val = RadioSettingValueList( self._SCAN_RESTART, - self._SCAN_RESTART[scan_settings.scan_restart]) + current_index=scan_settings.scan_restart) rs = RadioSetting("scan_settings.scan_restart", "Scan Restart", val) menu.append(rs) val = RadioSettingValueList( self._SCAN_RESUME, - self._SCAN_RESUME[scan_settings.scan_resume]) + current_index=scan_settings.scan_resume) rs = RadioSetting("scan_settings.scan_resume", "Scan Resume", val) menu.append(rs) val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.busy_led]) + current_index=scan_settings.busy_led) rs = RadioSetting("scan_settings.busy_led", "Busy LED", val) menu.append(rs) val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.scan_lamp]) + current_index=scan_settings.scan_lamp) rs = RadioSetting("scan_settings.scan_lamp", "Scan Lamp", val) menu.append(rs) val = RadioSettingValueList( self._TOT_TIME, - self._TOT_TIME[scan_settings.tot]) + current_index=scan_settings.tot) rs = RadioSetting("scan_settings.tot", "Transmit Timeout (TOT)", val) menu.append(rs) diff --git a/chirp/drivers/ft450d.py b/chirp/drivers/ft450d.py index ace1cc5e..6d9661b1 100644 --- a/chirp/drivers/ft450d.py +++ b/chirp/drivers/ft450d.py @@ -1456,7 +1456,7 @@ def _do_panel_buttons(self, pnlcfg): # - - - Current Panel Config rs = RadioSetting("pnl_cs", "C.S. Function", RadioSettingValueList(self.FUNC_LIST, - self.FUNC_LIST[_settings.pnl_cs])) + current_index=_settings.pnl_cs)) pnlcfg.append(rs) rs = RadioSetting("nb", "Noise blanker", @@ -1565,17 +1565,17 @@ def _do_mic_settings(self, mic): # - - MIC Settings rs = RadioSetting("pm_dwn", "Mic Down button function", RadioSettingValueList(self.FUNC_LIST, - self.FUNC_LIST[_settings.pm_dwn])) + current_index=_settings.pm_dwn)) mic.append(rs) rs = RadioSetting("pm_fst", "Mic Fast button function", RadioSettingValueList(self.FUNC_LIST, - self.FUNC_LIST[_settings.pm_fst])) + current_index=_settings.pm_fst)) mic.append(rs) rs = RadioSetting("pm_up", "Mic Up button function", RadioSettingValueList(self.FUNC_LIST, - self.FUNC_LIST[_settings.pm_up])) + current_index=_settings.pm_up)) mic.append(rs) # End _do_mic_settings diff --git a/chirp/drivers/ft70.py b/chirp/drivers/ft70.py index 45adf6a1..b1b54d0a 100644 --- a/chirp/drivers/ft70.py +++ b/chirp/drivers/ft70.py @@ -730,20 +730,20 @@ def _get_dtmf_settings(self): val = RadioSettingValueList( self._DTMF_MODE, - self._DTMF_MODE[dtmf.dtmf_mode]) + current_index=dtmf.dtmf_mode) rs = RadioSetting("scan_settings.dtmf_mode", "DTMF Mode", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_DELAY, - self._DTMF_DELAY[dtmf.dtmf_delay]) + current_index=dtmf.dtmf_delay) rs = RadioSetting( "scan_settings.dtmf_delay", "DTMF Delay", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_SPEED, - self._DTMF_SPEED[dtmf.dtmf_speed]) + current_index=dtmf.dtmf_speed) rs = RadioSetting( "scan_settings.dtmf_speed", "DTMF Speed", val) menu.append(rs) @@ -776,20 +776,20 @@ def _get_display_settings(self): val = RadioSettingValueList( self._LAMP_KEY, - self._LAMP_KEY[scan_settings.lamp]) + current_index=scan_settings.lamp) rs = RadioSetting("scan_settings.lamp", "Lamp", val) menu.append(rs) val = RadioSettingValueList( self._LCD_DIMMER, - self._LCD_DIMMER[scan_settings.lcd_dimmer]) + current_index=scan_settings.lcd_dimmer) rs = RadioSetting("scan_settings.lcd_dimmer", "LCD Dimmer", val) menu.append(rs) opening_message = self._memobj.opening_message val = RadioSettingValueList( self._OPENING_MESSAGE, - self._OPENING_MESSAGE[opening_message.flag]) + current_index=opening_message.flag) rs = RadioSetting("opening_message.flag", "Opening Msg Mode", val) menu.append(rs) @@ -804,7 +804,7 @@ def _get_config_settings(self): first_settings = self._memobj.first_settings val = RadioSettingValueList( self._APO_SELECT, - self._APO_SELECT[first_settings.apo]) + current_index=first_settings.apo) rs = RadioSetting("first_settings.apo", "APO", val) menu.append(rs) @@ -812,7 +812,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.bclo]) + current_index=scan_settings.bclo) rs = RadioSetting("scan_settings.bclo", "Busy Channel Lockout", val) menu.append(rs) @@ -821,7 +821,7 @@ def _get_config_settings(self): beep_settings = self._memobj.beep_settings val = RadioSettingValueList( self._BEEP_SELECT, - self._BEEP_SELECT[beep_settings.beep_select]) + current_index=beep_settings.beep_select) rs = RadioSetting("beep_settings.beep_select", "Beep", val) menu.append(rs) @@ -829,7 +829,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._BEEP_LEVEL, - self._BEEP_LEVEL[beep_settings.beep_level]) + current_index=beep_settings.beep_level) rs = RadioSetting("beep_settings", "Beep Level", val) menu.append(rs) @@ -837,7 +837,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.beep_edge]) + current_index=scan_settings.beep_edge) rs = RadioSetting("scan_settings.beep_edge", "Beep Band Edge", val) menu.append(rs) @@ -845,7 +845,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._ON_OFF, - self._ON_OFF[scan_settings.busy_led]) + current_index=scan_settings.busy_led) rs = RadioSetting("scan_settings.busy_led", "Busy LED", val) menu.append(rs) @@ -853,7 +853,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._HOME_REV, - self._HOME_REV[scan_settings.home_rev]) + current_index=scan_settings.home_rev) rs = RadioSetting("scan_settings.home_rev", "HOME/REV", val) menu.append(rs) @@ -861,7 +861,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.home_vfo]) + current_index=scan_settings.home_vfo) rs = RadioSetting("scan_settings.home_vfo", "Home->VFO", val) menu.append(rs) @@ -869,7 +869,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._LOCK, - self._LOCK[scan_settings.lock]) + current_index=scan_settings.lock) rs = RadioSetting("scan_settings.lock", "Lock Mode", val) menu.append(rs) @@ -877,7 +877,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._MONI_TCALL, - self._MONI_TCALL[scan_settings.moni]) + current_index=scan_settings.moni) rs = RadioSetting("scan_settings.moni", "MONI/T-CALL", val) menu.append(rs) @@ -885,7 +885,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._PTT_DELAY, - self._PTT_DELAY[scan_settings.ptt_delay]) + current_index=scan_settings.ptt_delay) rs = RadioSetting("scan_settings.ptt_delay", "PTT Delay", val) menu.append(rs) @@ -893,7 +893,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.ars]) + current_index=scan_settings.ars) rs = RadioSetting("scan_settings.ars", "ARS", val) menu.append(rs) @@ -901,7 +901,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._RX_SAVE, - self._RX_SAVE[scan_settings.rx_save]) + current_index=scan_settings.rx_save) rs = RadioSetting("scan_settings.rx_save", "RX SAVE", val) menu.append(rs) @@ -909,7 +909,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._VFO_MODE, - self._VFO_MODE[scan_settings.vfo_mode]) + current_index=scan_settings.vfo_mode) rs = RadioSetting("scan_settings.vfo_mode", "VFO MODE", val) menu.append(rs) @@ -917,7 +917,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._TOT_TIME, - self._TOT_TIME[scan_settings.tot]) + current_index=scan_settings.tot) rs = RadioSetting("scan_settings.tot", "Transmit Timeout (TOT)", val) menu.append(rs) @@ -925,7 +925,7 @@ def _get_config_settings(self): val = RadioSettingValueList( self._MIC_GAIN, - self._MIC_GAIN[scan_settings.mic_gain]) + current_index=scan_settings.mic_gain) rs = RadioSetting("scan_settings.mic_gain", "Mic Gain", val) menu.append(rs) @@ -934,7 +934,7 @@ def _get_config_settings(self): scan_settings_2 = self._memobj.scan_settings_2 val = RadioSettingValueList( self._VOLUME, - self._VOLUME[scan_settings_2.volume]) + current_index=scan_settings_2.volume) rs = RadioSetting("scan_settings_2.volume", "Volume", val) menu.append(rs) @@ -943,7 +943,7 @@ def _get_config_settings(self): squelch_settings = self._memobj.squelch_settings val = RadioSettingValueList( self._SQUELCH, - self._SQUELCH[squelch_settings.squelch]) + current_index=squelch_settings.squelch) rs = RadioSetting("squelch_settings.squelch", "Squelch", val) menu.append(rs) @@ -966,7 +966,7 @@ def _get_digital_settings(self): digital_settings = self._memobj.digital_settings val = RadioSettingValueList( self._AMS_TX_MODE, - self._AMS_TX_MODE[digital_settings.ams_tx_mode]) + current_index=digital_settings.ams_tx_mode) rs = RadioSetting("digital_settings.ams_tx_mode", "AMS TX Mode", val) menu.append(rs) @@ -974,7 +974,7 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._VW_MODE, - self._VW_MODE[digital_settings.vw_mode]) + current_index=digital_settings.vw_mode) rs = RadioSetting("digital_settings.vw_mode", "VW Mode", val) menu.append(rs) @@ -982,7 +982,7 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._DG_ID, - self._DG_ID[digital_settings.tx_dg_id]) + current_index=digital_settings.tx_dg_id) rs = RadioSetting("digital_settings.tx_dg_id", "TX DG-ID", val) menu.append(rs) @@ -990,7 +990,7 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._DG_ID, - self._DG_ID[digital_settings.rx_dg_id]) + current_index=digital_settings.rx_dg_id) rs = RadioSetting("digital_settings.rx_dg_id", "RX DG-ID", val) menu.append(rs) @@ -1011,8 +1011,7 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._DIG_POP_UP, - self._DIG_POP_UP[ - 0 if digital_settings_more.digital_popup == 0 else digital_settings_more.digital_popup - 9]) + current_index=0 if digital_settings_more.digital_popup == 0 else digital_settings_more.digital_popup - 9) rs = RadioSetting("digital_settings_more.digital_popup", "Digital Popup", val) rs.set_apply_callback(self.apply_digital_popup, digital_settings_more) @@ -1022,7 +1021,7 @@ def _get_digital_settings(self): val = RadioSettingValueList( self._STANDBY_BEEP, - self._STANDBY_BEEP[digital_settings.standby_beep]) + current_index=digital_settings.standby_beep) rs = RadioSetting("digital_settings.standby_beep", "Standby Beep", val) menu.append(rs) @@ -1036,7 +1035,7 @@ def _get_gm_settings(self): first_settings = self._memobj.first_settings val = RadioSettingValueList( self._GM_RING, - self._GM_RING[first_settings.gm_ring]) + current_index=first_settings.gm_ring) rs = RadioSetting("first_settings.gm_ring", "GM Ring", val) menu.append(rs) @@ -1045,7 +1044,7 @@ def _get_gm_settings(self): scan_settings = self._memobj.scan_settings val = RadioSettingValueList( self._GM_INTERVAL, - self._GM_INTERVAL[scan_settings.gm_interval]) + current_index=scan_settings.gm_interval) rs = RadioSetting("scan_settings.gm_interval", "GM Interval", val) menu.append(rs) @@ -1059,7 +1058,7 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.dw_rt]) + current_index=scan_settings.dw_rt) rs = RadioSetting("scan_settings.dw_rt", "Dual Watch Priority Channel Revert", val) menu.append(rs) @@ -1067,7 +1066,7 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._SCAN_RESTART, - self._SCAN_RESTART[scan_settings.dw_interval]) + current_index=scan_settings.dw_interval) rs = RadioSetting("scan_settings.dw_interval", "Dual Watch Interval", val) menu.append(rs) @@ -1076,7 +1075,7 @@ def _get_scan_settings(self): first_settings = self._memobj.first_settings val = RadioSettingValueList( self._SCAN_RESUME, - self._SCAN_RESUME[first_settings.dw_resume_interval]) + current_index=first_settings.dw_resume_interval) rs = RadioSetting("first_settings.dw_resume_interval", "Dual Watch Resume Interval", val) menu.append(rs) @@ -1084,7 +1083,7 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.scan_lamp]) + current_index=scan_settings.scan_lamp) rs = RadioSetting("scan_settings.scan_lamp", "Scan Lamp", val) menu.append(rs) @@ -1092,7 +1091,7 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._SCAN_RESTART, - self._SCAN_RESTART[scan_settings.scan_restart]) + current_index=scan_settings.scan_restart) rs = RadioSetting("scan_settings.scan_restart", "Scan Restart", val) menu.append(rs) @@ -1107,7 +1106,7 @@ def _get_scan_settings(self): first_settings = self._memobj.first_settings val = RadioSettingValueList( self._SCAN_RESUME, - self._SCAN_RESUME[first_settings.scan_resume]) + current_index=first_settings.scan_resume) rs = RadioSetting("first_settings.scan_resume", "Scan Resume", val) menu.append(rs) diff --git a/chirp/drivers/ft857.py b/chirp/drivers/ft857.py index 811fd7dd..e85bbf3a 100644 --- a/chirp/drivers/ft857.py +++ b/chirp/drivers/ft857.py @@ -890,33 +890,28 @@ def get_settings(self): extended.append(rs) rs = RadioSetting("pg_a", "Programmable key MFq:A", RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_a])) + current_index=_settings.pg_a)) extended.append(rs) rs = RadioSetting("pg_b", "Programmable key MFq:B", RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_b])) + current_index=_settings.pg_b)) extended.append(rs) rs = RadioSetting("pg_c", "Programmable key MFq:C", RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_c])) + current_index=_settings.pg_c)) extended.append(rs) rs = RadioSetting("pg_acc", "Programmable mic key ACC", - RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_acc])) + RadioSettingValueList( + self.PROGRAMMABLEOPTIONS, + current_index=_settings.pg_acc)) extended.append(rs) rs = RadioSetting("pg_p1", "Programmable mic key P1", RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_p1])) + current_index=_settings.pg_p1)) extended.append(rs) rs = RadioSetting("pg_p2", "Programmable mic key P2", RadioSettingValueList(self.PROGRAMMABLEOPTIONS, - self.PROGRAMMABLEOPTIONS[ - _settings.pg_p2])) + current_index=_settings.pg_p2)) extended.append(rs) rs = RadioSetting("pkt1200", "Packet 1200 gain level", RadioSettingValueInteger(0, 100, @@ -986,9 +981,9 @@ def get_settings(self): options, current_index=_settings.tuner_atas)) extended.append(rs) rs = RadioSetting("tx_if_filter", "Transmit IF filter", - RadioSettingValueList(self.FILTERS, - self.FILTERS[ - _settings.tx_if_filter])) + RadioSettingValueList( + self.FILTERS, + current_index=_settings.tx_if_filter)) basic.append(rs) rs = RadioSetting("vox_delay", "VOX delay (*100 ms)", RadioSettingValueInteger(1, 30, _settings.vox_delay)) diff --git a/chirp/drivers/gmrsuv1.py b/chirp/drivers/gmrsuv1.py index b5f99429..20f3f473 100644 --- a/chirp/drivers/gmrsuv1.py +++ b/chirp/drivers/gmrsuv1.py @@ -501,12 +501,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(self.PTTID_LIST, - self.PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("scode", "S-CODE", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[_mem.scode])) + current_index=_mem.scode)) mem.extra.append(rs) immutable = [] diff --git a/chirp/drivers/gmrsv2.py b/chirp/drivers/gmrsv2.py index dca2dc98..0e7b4863 100644 --- a/chirp/drivers/gmrsv2.py +++ b/chirp/drivers/gmrsv2.py @@ -478,12 +478,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(self.PTTID_LIST, - self.PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("scode", "S-CODE", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[_mem.scode])) + current_index=_mem.scode)) mem.extra.append(rs) immutable = [] diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py index 6dac954b..c5ef8771 100644 --- a/chirp/drivers/h777.py +++ b/chirp/drivers/h777.py @@ -510,8 +510,8 @@ def get_settings(self): rs = RadioSetting("settings2.scanmode", "Scan mode", RadioSettingValueList( self.SCANMODE_LIST, - self.SCANMODE_LIST[ - self._memobj.settings2.scanmode])) + current_index=( + self._memobj.settings2.scanmode))) basic.append(rs) rs = RadioSetting("vox", "VOX", @@ -539,7 +539,7 @@ def get_settings(self): rs = RadioSetting("alarm", "Alarm", RadioSettingValueList( self.ALARM_LIST, - self.ALARM_LIST[_settings.alarm])) + current_index=_settings.alarm)) else: rs = RadioSetting("alarm", "Alarm", RadioSettingValueBoolean(_settings.alarm)) @@ -571,8 +571,8 @@ def get_settings(self): rs = RadioSetting("settings2.sidekeyfunction", "Side key function", RadioSettingValueList( self.SIDEKEYFUNCTION_LIST, - self.SIDEKEYFUNCTION_LIST[ - self._memobj.settings2.sidekeyfunction])) + current_index=( + self._memobj.settings2.sidekeyfunction))) basic.append(rs) rs = RadioSetting( diff --git a/chirp/drivers/hf90.py b/chirp/drivers/hf90.py index c25bc2d9..c2c37a2c 100644 --- a/chirp/drivers/hf90.py +++ b/chirp/drivers/hf90.py @@ -347,7 +347,7 @@ def get_settings(self): rs = RadioSetting("type", "Type", RadioSettingValueList( self.HF90_TYPES, - self.HF90_TYPES[_settings.type])) + current_index=_settings.type)) rs.set_apply_callback(self.apply_type, _settings) grp.append(rs) @@ -381,7 +381,7 @@ def get_settings(self): hp = int(_settings.tx_power == 3) rs = RadioSetting("tx_power", "Tx Power", RadioSettingValueList(self.HF90_POWER_LEVELS, - self.HF90_POWER_LEVELS[hp])) + current_index=hp)) rs.set_apply_callback(self.apply_txpower, _settings) grp.append(rs) diff --git a/chirp/drivers/kguv9dplus.py b/chirp/drivers/kguv9dplus.py index 4b29bbc8..ff888692 100644 --- a/chirp/drivers/kguv9dplus.py +++ b/chirp/drivers/kguv9dplus.py @@ -2181,7 +2181,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): RadioSetting(prefix + ".step", "Frequency Step (Menu 3)", RadioSettingValueList( - self._step_list, self._step_list[c.step]))) + self._step_list, current_index=c.step))) af.append( RadioSetting(prefix + ".scan_mode", "Scan Mode (Menu 20)", @@ -2634,7 +2634,7 @@ def apply_scan_end(setting, scan_lo, scan_hi, obj): RadioSetting(prefix + ".step", "Frequency Step (Menu 3)", RadioSettingValueList( - self._step_list, self._step_list[c.step]))) + self._step_list, current_index=c.step))) af.append( RadioSetting(prefix + ".scan_mode", "Scan Mode (Menu 20)", diff --git a/chirp/drivers/mursv1.py b/chirp/drivers/mursv1.py index d89f175b..9fc8d433 100644 --- a/chirp/drivers/mursv1.py +++ b/chirp/drivers/mursv1.py @@ -451,12 +451,12 @@ def get_memory(self, number): rs = RadioSetting("pttid", "PTT ID", RadioSettingValueList(self.PTTID_LIST, - self.PTTID_LIST[_mem.pttid])) + current_index=_mem.pttid)) mem.extra.append(rs) rs = RadioSetting("scode", "S-CODE", RadioSettingValueList(self.SCODE_LIST, - self.SCODE_LIST[_mem.scode])) + current_index=_mem.scode)) mem.extra.append(rs) immutable = [] diff --git a/chirp/drivers/retevis_rb28.py b/chirp/drivers/retevis_rb28.py index 55bbe7bc..d9cb7607 100644 --- a/chirp/drivers/retevis_rb28.py +++ b/chirp/drivers/retevis_rb28.py @@ -664,12 +664,12 @@ def get_settings(self): basic.append(rset) rs = RadioSettingValueList(self.PFKEY_LIST, - self.PFKEY_LIST[_settings.pfkey_lt]) + current_index=_settings.pfkey_lt) rset = RadioSetting("pfkey_lt", "Key Set < Long", rs) basic.append(rset) rs = RadioSettingValueList(self.PFKEY_LIST, - self.PFKEY_LIST[_settings.pfkey_gt]) + current_index=_settings.pfkey_gt) rset = RadioSetting("pfkey_gt", "Key Set > Long", rs) basic.append(rset) diff --git a/chirp/drivers/thd72.py b/chirp/drivers/thd72.py index 0c85f134..65f06280 100644 --- a/chirp/drivers/thd72.py +++ b/chirp/drivers/thd72.py @@ -644,7 +644,7 @@ def _get_display_settings(self): val = RadioSettingValueList( self._LCD_CONTRAST, - self._LCD_CONTRAST[display_settings.contrast - 1]) + current_index=display_settings.contrast - 1) rs = RadioSetting("display.contrast", "LCD Contrast", val) rs.set_apply_callback(self.apply_lcd_contrast, display_settings) @@ -652,7 +652,7 @@ def _get_display_settings(self): val = RadioSettingValueList( self._LAMP_CONTROL, - self._LAMP_CONTROL[display_settings.lamp_control]) + current_index=display_settings.lamp_control) rs = RadioSetting("display.lamp_control", "Lamp Control", val) rs.set_apply_callback(self.apply_lamp_control, display_settings) @@ -660,7 +660,7 @@ def _get_display_settings(self): val = RadioSettingValueList( self._LAMP_TIMER, - self._LAMP_TIMER[display_settings.lamp_timer - 2]) + current_index=display_settings.lamp_timer - 2) rs = RadioSetting("display.lamp_timer", "Lamp Timer", val) rs.set_apply_callback(self.apply_lamp_timer, display_settings) @@ -684,7 +684,7 @@ def _get_battery_settings(self): val = RadioSettingValueList( self._BATTERY_SAVER, - self._BATTERY_SAVER[battery_settings.battery_saver]) + current_index=battery_settings.battery_saver) rs = RadioSetting("battery.battery_saver", "Battery Saver", val) rs.set_apply_callback(self.apply_battery_saver, battery_settings) @@ -692,7 +692,7 @@ def _get_battery_settings(self): val = RadioSettingValueList( self._APO, - self._APO[battery_settings.APO]) + current_index=battery_settings.APO) rs = RadioSetting("battery.APO", "Auto Power Off", val) rs.set_apply_callback(self.apply_APO, battery_settings) @@ -716,7 +716,7 @@ def _get_audio_settings(self): val = RadioSettingValueList( self._AUDIO_BALANCE, - self._AUDIO_BALANCE[audio_settings.balance]) + current_index=audio_settings.balance) rs = RadioSetting("audio.balance", "Balance", val) rs.set_apply_callback(self.apply_balance, audio_settings) @@ -724,7 +724,7 @@ def _get_audio_settings(self): val = RadioSettingValueList( self._KEY_BEEP, - self._KEY_BEEP[audio_settings.key_beep]) + current_index=audio_settings.key_beep) rs = RadioSetting("audio.key_beep", "Key Beep", val) rs.set_apply_callback(self.apply_key_beep, audio_settings) diff --git a/chirp/drivers/vx6.py b/chirp/drivers/vx6.py index 1d644ed9..af0ea03c 100644 --- a/chirp/drivers/vx6.py +++ b/chirp/drivers/vx6.py @@ -572,37 +572,37 @@ def _get_settings(self): # BASIC val = RadioSettingValueList( - self._APO, self._APO[_settings.auto_power_off]) + self._APO, current_index=_settings.auto_power_off) rs = RadioSetting("auto_power_off", "Auto Power Off", val) basic.append(rs) val = RadioSettingValueList( - self._BEEP_LEVEL, self._BEEP_LEVEL[_settings.beep_level]) + self._BEEP_LEVEL, current_index=_settings.beep_level) rs = RadioSetting("beep_level", "Beep Level", val) basic.append(rs) val = RadioSettingValueList( - self._DIM_LEVEL, self._DIM_LEVEL[_settings.lcd_dimmer]) + self._DIM_LEVEL, current_index=_settings.lcd_dimmer) rs = RadioSetting("lcd_dimmer", "Dimmer Level", val) basic.append(rs) val = RadioSettingValueList( - self._LAMP, self._LAMP[_settings.lamp]) + self._LAMP, current_index=_settings.lamp) rs = RadioSetting("lamp", "Keypad Lamp", val) basic.append(rs) val = RadioSettingValueList( - self._LOCK, self._LOCK[_settings.lock]) + self._LOCK, current_index=_settings.lock) rs = RadioSetting("lock", "Lock", val) basic.append(rs) val = RadioSettingValueList( - self._NUM_1_9, self._NUM_1_9[_settings.mic_gain]) + self._NUM_1_9, current_index=_settings.mic_gain) rs = RadioSetting("mic_gain", "Mic Gain", val) basic.append(rs) val = RadioSettingValueList( - self._OPEN_MSG, self._OPEN_MSG[_settings.open_message_mode]) + self._OPEN_MSG, current_index=_settings.open_message_mode) rs = RadioSetting("open_message_mode", "Open Message Mode", val) basic.append(rs) @@ -624,12 +624,12 @@ def _get_settings(self): basic.append(rs) val = RadioSettingValueList( - self._RESUME, self._RESUME[_settings.resume]) + self._RESUME, current_index=_settings.resume) rs = RadioSetting("resume", "Scan Resume", val) basic.append(rs) val = RadioSettingValueList( - self._MONI_TCALL, self._MONI_TCALL[_settings.moni_tcall]) + self._MONI_TCALL, current_index=_settings.moni_tcall) rs = RadioSetting("moni_tcall", "MONI/T-CALL switch", val) basic.append(rs) @@ -660,12 +660,12 @@ def _get_settings(self): # ARTS val = RadioSettingValueList( - self._ARTS_INT, self._ARTS_INT[_settings.arts_interval]) + self._ARTS_INT, current_index=_settings.arts_interval) rs = RadioSetting("arts_interval", "ARTS Interval", val) arts.append(rs) val = RadioSettingValueList( - self._ARTSBEEP, self._ARTSBEEP[_settings.arts_beep]) + self._ARTSBEEP, current_index=_settings.arts_beep) rs = RadioSetting("arts_beep", "ARTS Beep", val) arts.append(rs) @@ -683,12 +683,12 @@ def _get_settings(self): # DTMF val = RadioSettingValueList( - self._MAN_AUTO, self._MAN_AUTO[_settings.dtmf_autodial]) + self._MAN_AUTO, current_index=_settings.dtmf_autodial) rs = RadioSetting("dtmf_autodial", "DTMF Autodial", val) dtmf.append(rs) val = RadioSettingValueList( - self._NUM_0_9, self._NUM_0_9[_settings.last_dtmf]) + self._NUM_0_9, current_index=_settings.last_dtmf) rs = RadioSetting("last_dtmf", "Last DTMF Memory Set", val) dtmf.append(rs) @@ -706,23 +706,23 @@ def _get_settings(self): # WIRES val = RadioSettingValueList( - self._INT_CD, self._INT_CD[_settings.internet_code]) + self._INT_CD, current_index=_settings.internet_code) rs = RadioSetting("internet_code", "Internet Code", val) wires.append(rs) val = RadioSettingValueList( - self._INT_MD, self._INT_MD[_settings.internet_mode]) + self._INT_MD, current_index=_settings.internet_mode) rs = RadioSetting("internet_mode", "Internet Link Connection mode", val) wires.append(rs) val = RadioSettingValueList( - self._MAN_AUTO, self._MAN_AUTO[_settings.int_autodial]) + self._MAN_AUTO, current_index=_settings.int_autodial) rs = RadioSetting("int_autodial", "Internet Autodial", val) wires.append(rs) val = RadioSettingValueList( - self._NUM_0_63, self._NUM_0_63[_settings.last_internet_dtmf]) + self._NUM_0_63, current_index=_settings.last_internet_dtmf) rs = RadioSetting("last_internet_dtmf", "Last Internet DTMF Memory Set", val) wires.append(rs) @@ -741,23 +741,23 @@ def _get_settings(self): # MISC val = RadioSettingValueList( - self._BELL, self._BELL[_settings.bell]) + self._BELL, current_index=_settings.bell) rs = RadioSetting("bell", "CTCSS/DCS Bell", val) misc.append(rs) val = RadioSettingValueList( - self._CH_CNT, self._CH_CNT[_settings.channel_counter_width]) + self._CH_CNT, current_index=_settings.channel_counter_width) rs = RadioSetting("channel_counter_width", "Channel Counter Search Width", val) misc.append(rs) val = RadioSettingValueList( - self._EMERGENCY, self._EMERGENCY[_settings.emergency]) + self._EMERGENCY, current_index=_settings.emergency) rs = RadioSetting("emergency", "Emergency alarm", val) misc.append(rs) val = RadioSettingValueList( - self._ON_TIMER, self._ON_TIMER[_settings.on_timer]) + self._ON_TIMER, current_index=_settings.on_timer) rs = RadioSetting("on_timer", "On Timer", val) misc.append(rs) @@ -767,47 +767,47 @@ def _get_settings(self): misc.append(rs) val = RadioSettingValueList( - self._NUM_1_50, self._NUM_1_50[_settings.pager_rx_tone1]) + self._NUM_1_50, current_index=_settings.pager_rx_tone1) rs = RadioSetting("pager_rx_tone1", "Pager RX Tone 1", val) misc.append(rs) val = RadioSettingValueList( - self._NUM_1_50, self._NUM_1_50[_settings.pager_rx_tone2]) + self._NUM_1_50, current_index=_settings.pager_rx_tone2) rs = RadioSetting("pager_rx_tone2", "Pager RX Tone 2", val) misc.append(rs) val = RadioSettingValueList( - self._NUM_1_50, self._NUM_1_50[_settings.pager_tx_tone1]) + self._NUM_1_50, current_index=_settings.pager_tx_tone1) rs = RadioSetting("pager_tx_tone1", "Pager TX Tone 1", val) misc.append(rs) val = RadioSettingValueList( - self._NUM_1_50, self._NUM_1_50[_settings.pager_tx_tone2]) + self._NUM_1_50, current_index=_settings.pager_tx_tone2) rs = RadioSetting("pager_tx_tone2", "Pager TX Tone 2", val) misc.append(rs) val = RadioSettingValueList( - self._PTT_DELAY, self._PTT_DELAY[_settings.ptt_delay]) + self._PTT_DELAY, current_index=_settings.ptt_delay) rs = RadioSetting("ptt_delay", "PTT Delay", val) misc.append(rs) val = RadioSettingValueList( - self._RF_SQL, self._RF_SQL[_settings.rf_squelch]) + self._RF_SQL, current_index=_settings.rf_squelch) rs = RadioSetting("rf_squelch", "RF Squelch", val) misc.append(rs) val = RadioSettingValueList( - self._RX_SAVE, self._RX_SAVE[_settings.rx_save]) + self._RX_SAVE, current_index=_settings.rx_save) rs = RadioSetting("rx_save", "RX Save", val) misc.append(rs) val = RadioSettingValueList( - self._TOT, self._TOT[_settings.tx_timeout]) + self._TOT, current_index=_settings.tx_timeout) rs = RadioSetting("tx_timeout", "TOT", val) misc.append(rs) val = RadioSettingValueList( - self._WAKEUP, self._WAKEUP[_settings.wakeup]) + self._WAKEUP, current_index=_settings.wakeup) rs = RadioSetting("wakeup", "Wakeup", val) misc.append(rs) @@ -816,7 +816,7 @@ def _get_settings(self): misc.append(rs) val = RadioSettingValueList( - self._VFO_MODE, self._VFO_MODE[_settings.vfo_mode]) + self._VFO_MODE, current_index=_settings.vfo_mode) rs = RadioSetting("vfo_mode", "VFO Band Edge Limiting", val) misc.append(rs) @@ -825,7 +825,7 @@ def _get_settings(self): misc.append(rs) val = RadioSettingValueList( - self._TS_SPEED, self._TS_SPEED[_settings.ts_speed]) + self._TS_SPEED, current_index=_settings.ts_speed) rs = RadioSetting("ts_speed", "Tone Search Speed", val) misc.append(rs) @@ -838,17 +838,17 @@ def _get_settings(self): misc.append(rs) val = RadioSettingValueList( - self._SMART_SEARCH, self._SMART_SEARCH[_settings.smart_search]) + self._SMART_SEARCH, current_index=_settings.smart_search) rs = RadioSetting("smart_search", "Smart Search", val) misc.append(rs) val = RadioSettingValueList( - self._HOME_REV, self._HOME_REV[_settings.home_rev]) + self._HOME_REV, current_index=_settings.home_rev) rs = RadioSetting("home_rev", "HM/RV(EMG)R/H key", val) misc.append(rs) val = RadioSettingValueList( - self._MEM_W_MD, self._MEM_W_MD[_settings.memory_method]) + self._MEM_W_MD, current_index=_settings.memory_method) rs = RadioSetting("memory_method", "Memory Write Method", val) misc.append(rs) diff --git a/chirp/drivers/vx8.py b/chirp/drivers/vx8.py index 55a4aefc..b3e03063 100644 --- a/chirp/drivers/vx8.py +++ b/chirp/drivers/vx8.py @@ -813,12 +813,12 @@ def _get_aprs_general_settings(self): val = RadioSettingValueList( chirp_common.APRS_SSID, - chirp_common.APRS_SSID[aprs.my_callsign.ssid]) + current_index=aprs.my_callsign.ssid) rs = RadioSetting("aprs.my_callsign.ssid", "My SSID", val) menu.append(rs) val = RadioSettingValueList(self._MY_SYMBOL, - self._MY_SYMBOL[aprs2.selected_my_symbol]) + current_index=aprs2.selected_my_symbol) rs = RadioSetting("aprs2.selected_my_symbol", "My Symbol", val) menu.append(rs) @@ -835,7 +835,7 @@ def _get_aprs_general_settings(self): val = RadioSettingValueList( chirp_common.APRS_POSITION_COMMENT, - chirp_common.APRS_POSITION_COMMENT[aprs.selected_position_comment]) + current_index=aprs.selected_position_comment) rs = RadioSetting("aprs.selected_position_comment", "Position Comment", val) menu.append(rs) @@ -873,70 +873,70 @@ def _get_aprs_general_settings(self): menu.append(rs) val = RadioSettingValueList( - self._TIME_SOURCE, self._TIME_SOURCE[aprs.set_time_manually]) + self._TIME_SOURCE, current_index=aprs.set_time_manually) rs = RadioSetting("aprs.set_time_manually", "Time Source", val) menu.append(rs) - val = RadioSettingValueList(self._TZ, self._TZ[aprs.timezone]) + val = RadioSettingValueList(self._TZ, current_index=aprs.timezone) rs = RadioSetting("aprs.timezone", "Timezone", val) menu.append(rs) val = RadioSettingValueList( - self._SPEED_UNITS, self._SPEED_UNITS[aprs.aprs_units_speed]) + self._SPEED_UNITS, current_index=aprs.aprs_units_speed) rs = RadioSetting("aprs.aprs_units_speed", "APRS Speed Units", val) menu.append(rs) val = RadioSettingValueList( - self._SPEED_UNITS, self._SPEED_UNITS[aprs.gps_units_speed]) + self._SPEED_UNITS, current_index=aprs.gps_units_speed) rs = RadioSetting("aprs.gps_units_speed", "GPS Speed Units", val) menu.append(rs) val = RadioSettingValueList( - self._ALT_UNITS, self._ALT_UNITS[aprs.aprs_units_altitude_ft]) + self._ALT_UNITS, current_index=aprs.aprs_units_altitude_ft) rs = RadioSetting("aprs.aprs_units_altitude_ft", "APRS Altitude Units", val) menu.append(rs) val = RadioSettingValueList( - self._ALT_UNITS, self._ALT_UNITS[aprs.gps_units_altitude_ft]) + self._ALT_UNITS, current_index=aprs.gps_units_altitude_ft) rs = RadioSetting("aprs.gps_units_altitude_ft", "GPS Altitude Units", val) menu.append(rs) val = RadioSettingValueList( self._POS_UNITS, - self._POS_UNITS[aprs.aprs_units_position_mmss]) + current_index=aprs.aprs_units_position_mmss) rs = RadioSetting("aprs.aprs_units_position_mmss", "APRS Position Format", val) menu.append(rs) val = RadioSettingValueList( - self._POS_UNITS, self._POS_UNITS[aprs.gps_units_position_sss]) + self._POS_UNITS, current_index=aprs.gps_units_position_sss) rs = RadioSetting("aprs.gps_units_position_sss", "GPS Position Format", val) menu.append(rs) val = RadioSettingValueList( self._DIST_UNITS, - self._DIST_UNITS[aprs.aprs_units_distance_m]) + current_index=aprs.aprs_units_distance_m) rs = RadioSetting("aprs.aprs_units_distance_m", "APRS Distance Units", val) menu.append(rs) val = RadioSettingValueList( - self._WIND_UNITS, self._WIND_UNITS[aprs.aprs_units_wind_mph]) + self._WIND_UNITS, current_index=aprs.aprs_units_wind_mph) rs = RadioSetting("aprs.aprs_units_wind_mph", "APRS Wind Speed Units", val) menu.append(rs) val = RadioSettingValueList( - self._RAIN_UNITS, self._RAIN_UNITS[aprs.aprs_units_rain_inch]) + self._RAIN_UNITS, current_index=aprs.aprs_units_rain_inch) rs = RadioSetting("aprs.aprs_units_rain_inch", "APRS Rain Units", val) menu.append(rs) val = RadioSettingValueList( self._TEMP_UNITS, - self._TEMP_UNITS[aprs.aprs_units_temperature_f]) + current_index=aprs.aprs_units_temperature_f) rs = RadioSetting("aprs.aprs_units_temperature_f", "APRS Temperature Units", val) menu.append(rs) @@ -948,7 +948,7 @@ def _get_aprs_rx_settings(self): aprs = self._memobj.aprs aprs2 = self._memobj.aprs2 - val = RadioSettingValueList(self._RX_BAUD, self._RX_BAUD[aprs.rx_baud]) + val = RadioSettingValueList(self._RX_BAUD, current_index=aprs.rx_baud) rs = RadioSetting("aprs.rx_baud", "Modem RX", val) menu.append(rs) @@ -970,37 +970,37 @@ def _get_aprs_rx_settings(self): menu.append(rs) val = RadioSettingValueList(self._FLASH, - self._FLASH[aprs2.flash_msg]) + current_index=aprs2.flash_msg) rs = RadioSetting("aprs2.flash_msg", "Flash on personal message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH, - self._FLASH[aprs2.vibrate_msg]) + current_index=aprs2.vibrate_msg) rs = RadioSetting("aprs2.vibrate_msg", "Vibrate on personal message", val) menu.append(rs) val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs2.flash_bln]) + current_index=aprs2.flash_bln) rs = RadioSetting("aprs2.flash_bln", "Flash on bulletin message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs2.vibrate_bln]) + current_index=aprs2.vibrate_bln) rs = RadioSetting("aprs2.vibrate_bln", "Vibrate on bulletin message", val) menu.append(rs) val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs2.flash_grp]) + current_index=aprs2.flash_grp) rs = RadioSetting("aprs2.flash_grp", "Flash on group message", val) menu.append(rs) if self._has_vibrate: val = RadioSettingValueList(self._FLASH[:10], - self._FLASH[aprs2.vibrate_grp]) + current_index=aprs2.vibrate_grp) rs = RadioSetting("aprs2.vibrate_grp", "Vibrate on group message", val) menu.append(rs) @@ -1017,7 +1017,7 @@ def _get_aprs_rx_settings(self): # TODO: Use filter_val as the list entries and update it on edit. val = RadioSettingValueList( self._MSG_GROUP_NAMES, - self._MSG_GROUP_NAMES[aprs2.selected_msg_group]) + current_index=aprs2.selected_msg_group) rs = RadioSetting("aprs2.selected_msg_group", "Selected Message Group", val) menu.append(rs) @@ -1061,18 +1061,18 @@ def _get_aprs_tx_settings(self): beacon_type = (aprs.tx_smartbeacon << 1) | aprs.tx_interval_beacon val = RadioSettingValueList( - self._BEACON_TYPE, self._BEACON_TYPE[beacon_type]) + self._BEACON_TYPE, current_index=beacon_type) rs = RadioSetting("aprs.transmit", "TX Beacons", val) rs.set_apply_callback(self.apply_beacon_type, aprs) menu.append(rs) val = RadioSettingValueList( - self._TX_DELAY, self._TX_DELAY[aprs.tx_delay]) + self._TX_DELAY, current_index=aprs.tx_delay) rs = RadioSetting("aprs.tx_delay", "TX Delay", val) menu.append(rs) val = RadioSettingValueList( - self._BEACON_INT, self._BEACON_INT[aprs.beacon_interval]) + self._BEACON_INT, current_index=aprs.beacon_interval) rs = RadioSetting("aprs.beacon_interval", "Beacon Interval", val) menu.append(rs) @@ -1134,20 +1134,20 @@ def _get_dtmf_settings(self): val = RadioSettingValueList( self._DTMF_MODE, - self._DTMF_MODE[dtmf.dtmf_mode]) + current_index=dtmf.dtmf_mode) rs = RadioSetting("scan_settings.dtmf_mode", "DTMF Mode", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_SPEED, - self._DTMF_SPEED[dtmf.dtmf_speed]) + current_index=dtmf.dtmf_speed) rs = RadioSetting("scan_settings.dtmf_speed", "DTMF AutoDial Speed", val) menu.append(rs) val = RadioSettingValueList( self._DTMF_DELAY, - self._DTMF_DELAY[dtmf.dtmf_delay]) + current_index=dtmf.dtmf_delay) rs = RadioSetting("scan_settings.dtmf_delay", "DTMF AutoDial Delay", val) menu.append(rs) @@ -1175,13 +1175,13 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._LCD_DIMMER, - self._LCD_DIMMER[scan_settings.lcd_dimmer]) + current_index=scan_settings.lcd_dimmer) rs = RadioSetting("scan_settings.lcd_dimmer", "LCD Dimmer", val) menu.append(rs) val = RadioSettingValueList( self._LCD_CONTRAST, - self._LCD_CONTRAST[scan_settings.lcd_contrast - 1]) + current_index=scan_settings.lcd_contrast - 1) rs = RadioSetting("scan_settings.lcd_contrast", "LCD Contrast", val) rs.set_apply_callback(self.apply_lcd_contrast, scan_settings) @@ -1189,7 +1189,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._LAMP_KEY, - self._LAMP_KEY[scan_settings.lamp]) + current_index=scan_settings.lamp) rs = RadioSetting("scan_settings.lamp", "Lamp", val) menu.append(rs) @@ -1197,7 +1197,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._BEEP_SELECT, - self._BEEP_SELECT[beep_select.beep]) + current_index=beep_select.beep) rs = RadioSetting("beep_select.beep", "Beep Select", val) menu.append(rs) @@ -1205,7 +1205,7 @@ def _get_misc_settings(self): val = RadioSettingValueList( self._OPENING_MESSAGE, - self._OPENING_MESSAGE[opening_message.flag]) + current_index=opening_message.flag) rs = RadioSetting("opening_message.flag", "Opening Msg Mode", val) menu.append(rs) @@ -1230,14 +1230,14 @@ def _get_scan_settings(self): val = RadioSettingValueList( self._VOL_MODE, - self._VOL_MODE[scan_settings.vol_mode]) + current_index=scan_settings.vol_mode) rs = RadioSetting("scan_settings.vol_mode", "Volume Mode", val) menu.append(rs) vfoa = self._memobj.vfo_info[0] val = RadioSettingValueList( self._VOLUME, - self._VOLUME[vfoa.volume]) + current_index=vfoa.volume) rs = RadioSetting("vfo_info[0].volume", "VFO A Volume", val) rs.set_apply_callback(self.apply_volume, 0) menu.append(rs) @@ -1245,7 +1245,7 @@ def _get_scan_settings(self): vfob = self._memobj.vfo_info[1] val = RadioSettingValueList( self._VOLUME, - self._VOLUME[vfob.volume]) + current_index=vfob.volume) rs = RadioSetting("vfo_info[1].volume", "VFO B Volume", val) rs.set_apply_callback(self.apply_volume, 1) menu.append(rs) @@ -1253,43 +1253,43 @@ def _get_scan_settings(self): squelch = self._memobj.squelch val = RadioSettingValueList( self._SQUELCH, - self._SQUELCH[squelch.vfo_a]) + current_index=squelch.vfo_a) rs = RadioSetting("squelch.vfo_a", "VFO A Squelch", val) menu.append(rs) val = RadioSettingValueList( self._SQUELCH, - self._SQUELCH[squelch.vfo_b]) + current_index=squelch.vfo_b) rs = RadioSetting("squelch.vfo_b", "VFO B Squelch", val) menu.append(rs) val = RadioSettingValueList( self._SCAN_RESTART, - self._SCAN_RESTART[scan_settings.scan_restart]) + current_index=scan_settings.scan_restart) rs = RadioSetting("scan_settings.scan_restart", "Scan Restart", val) menu.append(rs) val = RadioSettingValueList( self._SCAN_RESUME, - self._SCAN_RESUME[scan_settings.scan_resume]) + current_index=scan_settings.scan_resume) rs = RadioSetting("scan_settings.scan_resume", "Scan Resume", val) menu.append(rs) val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.busy_led]) + current_index=scan_settings.busy_led) rs = RadioSetting("scan_settings.busy_led", "Busy LED", val) menu.append(rs) val = RadioSettingValueList( self._OFF_ON, - self._OFF_ON[scan_settings.scan_lamp]) + current_index=scan_settings.scan_lamp) rs = RadioSetting("scan_settings.scan_lamp", "Scan Lamp", val) menu.append(rs) val = RadioSettingValueList( self._TOT_TIME, - self._TOT_TIME[scan_settings.tot]) + current_index=scan_settings.tot) rs = RadioSetting("scan_settings.tot", "Transmit Timeout (TOT)", val) menu.append(rs) @@ -1499,18 +1499,18 @@ def _get_aprs_tx_settings(self): beacon_type = (aprs.tx_smartbeacon << 1) | aprs.tx_interval_beacon val = RadioSettingValueList( - self._BEACON_TYPE, self._BEACON_TYPE[beacon_type]) + self._BEACON_TYPE, current_index=beacon_type) rs = RadioSetting("aprs.transmit", "TX Beacons", val) rs.set_apply_callback(self.apply_beacon_type, aprs) menu.append(rs) val = RadioSettingValueList( - self._TX_DELAY, self._TX_DELAY[aprs.tx_delay]) + self._TX_DELAY, current_index=aprs.tx_delay) rs = RadioSetting("aprs.tx_delay", "TX Delay", val) menu.append(rs) val = RadioSettingValueList( - self._BEACON_INT, self._BEACON_INT[aprs.beacon_interval]) + self._BEACON_INT, current_index=aprs.beacon_interval) rs = RadioSetting("aprs.beacon_interval", "Beacon Interval", val) menu.append(rs) @@ -1598,7 +1598,7 @@ def _get_aprs_smartbeacon(self): val = RadioSettingValueList( self._SMARTBEACON_PROFILE, - self._SMARTBEACON_PROFILE[aprs2.active_smartbeaconing]) + current_index=aprs2.active_smartbeaconing) rs = RadioSetting("aprs2.active_smartbeaconing", "SmartBeacon profile", val) menu.append(rs) From 674744c213ae0fddabc6c28f9512b526beb45d62 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 8 Sep 2024 17:53:08 -0700 Subject: [PATCH 4/6] Hand-fix some settings list indexes with variables --- chirp/drivers/ga510.py | 6 ++---- chirp/drivers/uvk5.py | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py index e19252ca..4e60940e 100644 --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -483,14 +483,12 @@ def _get_extra(self, _mem): # pttid, signal - cur = PTTID[int(_mem.pttid)] s = RadioSetting('pttid', 'PTTID', - RadioSettingValueList(PTTID, cur)) + RadioSettingValueList(PTTID, int(_mem.pttid))) group.append(s) - cur = SIGNAL[int(_mem.signal)] s = RadioSetting('signal', 'Signal', - RadioSettingValueList(SIGNAL, cur)) + RadioSettingValueList(SIGNAL, int(_mem.signal))) group.append(s) return group diff --git a/chirp/drivers/uvk5.py b/chirp/drivers/uvk5.py index 72fac52d..ed4e9160 100644 --- a/chirp/drivers/uvk5.py +++ b/chirp/drivers/uvk5.py @@ -872,12 +872,8 @@ def _get_mem_extra(self, mem, _mem): mem.extra.append(rs) # PTTID - try: - pttid = self._pttid_list[_mem.dtmf_pttid] - except IndexError: - pttid = 0 rs = RadioSetting("pttid", "PTTID", RadioSettingValueList( - self._pttid_list, pttid)) + self._pttid_list, current_index=_mem.dtmf_pttid)) mem.extra.append(rs) # DTMF DECODE @@ -2009,7 +2005,10 @@ def set_memory(self, mem): _mem.bclo = svalue and 1 or 0 if sname == "pttid": - _mem.dtmf_pttid = self._pttid_list.index(svalue) + try: + _mem.dtmf_pttid = self._pttid_list.index(svalue) + except ValueError: + _mem.dtmf_pttid = 0 if sname == "frev": _mem.freq_reverse = svalue and 1 or 0 From d2143e4b0eb325f769ece5480855c37f674052c2 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 9 Sep 2024 14:37:38 -0700 Subject: [PATCH 5/6] Add Baofeng AR-5RM to model alias map Fixes #11525 --- chirp/share/model_alias_map.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chirp/share/model_alias_map.yaml b/chirp/share/model_alias_map.yaml index cde22e1d..885d744d 100644 --- a/chirp/share/model_alias_map.yaml +++ b/chirp/share/model_alias_map.yaml @@ -13,6 +13,8 @@ Baiston: - alt: Baofeng BF-888 model: BST-2100 Baofeng/Pofung: +- alt: 5RM + model: Baofeng AR-5RM - alt: BF-1901 model: Baofeng BF-1902 - alt: BF-1901 From 33d0076f3d85eed19985b2cb4b5171406a999160 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 9 Sep 2024 14:37:48 -0700 Subject: [PATCH 6/6] Limit bugreport subject field A user might think this is their only opportunity to put in details and stuff a tome into this field. --- chirp/locale/bg_BG.po | 91 ++++++++++++++++++++-------------------- chirp/locale/de.po | 91 ++++++++++++++++++++-------------------- chirp/locale/el.po | 91 ++++++++++++++++++++-------------------- chirp/locale/en_US.po | 91 ++++++++++++++++++++-------------------- chirp/locale/es.po | 92 +++++++++++++++++++++-------------------- chirp/locale/fr.po | 91 ++++++++++++++++++++-------------------- chirp/locale/hu.po | 91 ++++++++++++++++++++-------------------- chirp/locale/it.po | 92 +++++++++++++++++++++-------------------- chirp/locale/ja_JP.po | 91 ++++++++++++++++++++-------------------- chirp/locale/nl.po | 91 ++++++++++++++++++++-------------------- chirp/locale/pl.po | 91 ++++++++++++++++++++-------------------- chirp/locale/pt_BR.po | 91 ++++++++++++++++++++-------------------- chirp/locale/ru.po | 91 ++++++++++++++++++++-------------------- chirp/locale/tr_TR.po | 92 +++++++++++++++++++++-------------------- chirp/locale/uk_UA.po | 91 ++++++++++++++++++++-------------------- chirp/locale/zh_CN.po | 91 ++++++++++++++++++++-------------------- chirp/wxui/bugreport.py | 4 +- 17 files changed, 742 insertions(+), 721 deletions(-) diff --git a/chirp/locale/bg_BG.po b/chirp/locale/bg_BG.po index 3d532d23..96bc9fd4 100644 --- a/chirp/locale/bg_BG.po +++ b/chirp/locale/bg_BG.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-09-05 02:01-0700\n" "Last-Translator: Стоян \n" "Language-Team: Bulgarian \n" @@ -71,19 +71,19 @@ msgstr "" "\n" "Да бъдат ли запазени преди затваряне?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "(Опишете какво се случи вместо това)" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "(Опишете какво очаквахте да се случи)" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "(Опишете какво направихте)" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -117,7 +117,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -125,7 +125,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -138,7 +138,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -146,7 +146,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -241,7 +241,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -254,7 +254,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -666,7 +666,7 @@ msgstr "" "Налично е ново издание на CHIRP. За да го изтеглите възможно най-бързо " "посетете страницата!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -694,7 +694,7 @@ msgstr "Всички поддържани формати|" msgid "Amateur" msgstr "Любителски" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Възникна грешка" @@ -731,15 +731,15 @@ msgstr "Bin" msgid "Browser" msgstr "Разглеждане" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "Доклад за дефект с този номер не е намерен" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "Доклад за дефект номер:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "Доклад относно:" @@ -914,7 +914,7 @@ msgid "" "Polarity" msgstr "Полярност на DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "Декодиране на DTMF" @@ -934,7 +934,7 @@ msgstr "Dec" msgid "Delete" msgstr "Премахване" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 msgid "Detailed information" msgstr "Подробна информация" @@ -1005,7 +1005,7 @@ msgstr "Инструкции за изтегляне" msgid "Driver" msgstr "Управляващ софтуер" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "Сведения за управляващия софтуер" @@ -1062,7 +1062,7 @@ msgstr "Въведете ново име за банка %s:" msgid "Enter custom port:" msgstr "Въведете порт по избор:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1071,14 +1071,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1125,7 +1126,7 @@ msgstr "Изнасяне в CSV…" msgid "Extra" msgstr "Допълнителни" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "Радио ЧМ" @@ -1146,7 +1147,7 @@ msgstr "Грешка при попълване на екрана за разгл msgid "Failed to parse result" msgstr "Грешка при разбора на резултата" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "Грешка при изпращане на доклад за дефект:" @@ -1168,7 +1169,7 @@ msgstr "Файлът „%s“ не съществува" msgid "Files" msgstr "файлове" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 msgid "Files:" msgstr "Файлове:" @@ -1410,15 +1411,15 @@ msgstr "Честотата %s е извън поддържания обхват" msgid "Frequency granularity in kHz" msgstr "Стъпка на честотата в кХз" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1630,11 +1631,11 @@ msgstr "Зареждане на настройки" msgid "Login failed: Check your username and password" msgstr "Грешка при вход: проверете потребителското име и паролата" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "Логотип низ 1 (12 знака)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "Логотип низ 2 (12 знака)" @@ -1647,7 +1648,7 @@ msgstr "Географска дължина" msgid "Memories" msgstr "Записи" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" "Записите не могат да бъдат променяни поради неподдържана версия на " @@ -1968,7 +1969,7 @@ msgstr "Станцията не е приела блок %i" msgid "Radio information" msgstr "Сведения за станцията" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "Модел на станция:" @@ -2037,7 +2038,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "Доклад или промняна на дефект…" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, python-format msgid "Reporting a new bug: %r" msgstr "Доклад на нов дефект: %r" @@ -2096,11 +2097,11 @@ msgstr "Запазени настройки" msgid "Scan control (skip, include, priority, etc)" msgstr "Управление на сканиране (прескачане, включване, приоритет и т.н.)" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "Списъци за сканиране" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "Шифроване" @@ -2136,7 +2137,7 @@ msgstr "Услуга" msgid "Settings" msgstr "Настройки" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" "Настройките не могат да бъдат променяни поради неподдържана версия на " @@ -2215,7 +2216,7 @@ msgstr "Щат или провинция" msgid "Success" msgstr "Успех" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "Докладът за дефект е изпратен:" @@ -2283,7 +2284,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "Следните сведения ще бъдат изпратени:" @@ -2317,8 +2318,8 @@ msgstr "" "за грешка с дневник за отстраняване на грешки, за да можем да добавим " "поддръжка за другите ревизии." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" "Управляващият софтуер е в процес на разработка и трябва да бъде считан за " @@ -2375,7 +2376,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2406,7 +2407,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2549,7 +2550,7 @@ msgstr "Моделът %r не е поддържан" msgid "Update an existing bug" msgstr "Промяна на съществуващ дефект" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "Промяна на дефект %s" @@ -2558,7 +2559,7 @@ msgstr "Промяна на дефект %s" msgid "Upload instructions" msgstr "Инструкции за изпращане" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" "Не може да бъде изпращано към станцията поради неподдържана версия на " diff --git a/chirp/locale/de.po b/chirp/locale/de.po index 0c8297da..95677a45 100644 --- a/chirp/locale/de.po +++ b/chirp/locale/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2012-10-02 22:11+0100\n" "Last-Translator: Benjamin, HB9EUK \n" "Language-Team: German\n" @@ -61,19 +61,19 @@ msgstr[1] "Löschen (und nach oben verschieben)" msgid "%s has not been saved. Save before closing?" msgstr "Datei wurde geändert, speichern Sie die Änderungen vor dem Schliessen?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -105,7 +105,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -113,7 +113,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -126,7 +126,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -134,7 +134,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -229,7 +229,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -242,7 +242,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -652,7 +652,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -681,7 +681,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Ein Fehler ist aufgetreten" @@ -719,15 +719,15 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -903,7 +903,7 @@ msgid "" "Polarity" msgstr "DTCS Pol" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -924,7 +924,7 @@ msgstr "Erkennung" msgid "Delete" msgstr "Löschen" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Abrufen der Speicherbank" @@ -1002,7 +1002,7 @@ msgstr "Download vom Gerät" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1059,7 +1059,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1068,14 +1068,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1126,7 +1127,7 @@ msgstr "In Datei exportieren" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1145,7 +1146,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1168,7 +1169,7 @@ msgstr "" msgid "Files" msgstr "_Datei" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_Datei" @@ -1394,15 +1395,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1616,11 +1617,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1633,7 +1634,7 @@ msgstr "" msgid "Memories" msgstr "Speicher" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1960,7 +1961,7 @@ msgstr "" msgid "Radio information" msgstr "Abrufen der Speicherbank" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2023,7 +2024,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Report ist deaktiviert" @@ -2080,11 +2081,11 @@ msgstr "Einstellungen" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2124,7 +2125,7 @@ msgstr "" msgid "Settings" msgstr "Einstellungen" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2205,7 +2206,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2264,7 +2265,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2290,8 +2291,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2344,7 +2345,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2377,7 +2378,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2517,7 +2518,7 @@ msgstr "Nicht unterstuetzter Dateityp" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Updating URCALL Liste" @@ -2526,7 +2527,7 @@ msgstr "Updating URCALL Liste" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/el.po b/chirp/locale/el.po index 09fad539..99e7544e 100644 --- a/chirp/locale/el.po +++ b/chirp/locale/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2023-02-11 15:12+0200\n" "Last-Translator: Sokratis Alichanidis \n" "Language-Team: Greek\n" @@ -63,19 +63,19 @@ msgstr[1] "Διαγραφή %i μνημών και μετακίνηση ομάδ msgid "%s has not been saved. Save before closing?" msgstr "" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -107,7 +107,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -115,7 +115,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -128,7 +128,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -136,7 +136,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -231,7 +231,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -244,7 +244,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -656,7 +656,7 @@ msgstr "" "Μία νέα έκδοση του CHIRP είναι διαθέσιμη. Παρακαλούμε επισκεφθείτε την " "ιστοσελίδα το συντομότερο δυνατό για να την κατεβάσετε!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -684,7 +684,7 @@ msgstr "Όλοι οι τύποι αρχείων|" msgid "Amateur" msgstr "Ραδιοερασιτέχνη" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Παρουσιάστηκε ένα σφάλμα" @@ -721,17 +721,17 @@ msgstr "Bin" msgid "Browser" msgstr "Περιηγητής" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 #, fuzzy msgid "Bug number not found" msgstr "Αριθμός" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 #, fuzzy msgid "Bug number:" msgstr "Αριθμός" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -906,7 +906,7 @@ msgstr "" "Πολικότητα\n" "DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -926,7 +926,7 @@ msgstr "Dec" msgid "Delete" msgstr "Διαγραφή" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Πληροφορίες πομποδέκτη" @@ -1003,7 +1003,7 @@ msgstr "Οδηγίες λήψης" msgid "Driver" msgstr "Επαναφόρτωση Οδηγού" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1059,7 +1059,7 @@ msgstr "Εισάγετε ένα νέο όνομα για την ομάδα μν msgid "Enter custom port:" msgstr "Εισάγετε προσαρμοσμένη θύρα:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1068,14 +1068,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1123,7 +1124,7 @@ msgstr "Εξαγωγή σε αρχείο μορφής .CSV" msgid "Extra" msgstr "Περισσότερα" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1143,7 +1144,7 @@ msgstr "Αδυναμία φόρτωσης περιηγητή πομποδεκτ msgid "Failed to parse result" msgstr "Αδυναμία φόρτωσης περιηγητή πομποδεκτών" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 #, fuzzy msgid "Failed to send bug report:" msgstr "Αδυναμία φόρτωσης περιηγητή πομποδεκτών" @@ -1166,7 +1167,7 @@ msgstr "Το αρχείο δεν υπάρχει: %s" msgid "Files" msgstr "Αρχεία" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "Αρχεία" @@ -1390,15 +1391,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1613,11 +1614,11 @@ msgstr "Φόρτωση ρυθμίσεων" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1630,7 +1631,7 @@ msgstr "Γεωγραφικό μήκος" msgid "Memories" msgstr "Μνήμες" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1948,7 +1949,7 @@ msgstr "Ο πομποδέκτης δεν επιβεβαίωσε το μπλοκ msgid "Radio information" msgstr "Πληροφορίες πομποδέκτη" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2011,7 +2012,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Αναφορές ενεργοποιημένες" @@ -2068,11 +2069,11 @@ msgstr "Ρυθμίσεις αποθηκεύθηκαν" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2110,7 +2111,7 @@ msgstr "Υπηρεσία" msgid "Settings" msgstr "Ρυθμίσεις" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2190,7 +2191,7 @@ msgstr "Πολιτεία / Επαρχία" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2249,7 +2250,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2275,8 +2276,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2336,7 +2337,7 @@ msgstr "" "δυνατοτήτων!\n" "Σας προειδοποιήσαμε. Προχωράτε με δική σας ευθύνη!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2369,7 +2370,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2506,7 +2507,7 @@ msgstr "" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "" @@ -2515,7 +2516,7 @@ msgstr "" msgid "Upload instructions" msgstr "Οδηγίες αποστολής" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/en_US.po b/chirp/locale/en_US.po index f93554fb..3b76df40 100644 --- a/chirp/locale/en_US.po +++ b/chirp/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2011-11-29 16:07-0800\n" "Last-Translator: Dan Smith \n" "Language-Team: English\n" @@ -59,19 +59,19 @@ msgstr[1] "_Delete" msgid "%s has not been saved. Save before closing?" msgstr "File is modified, save changes before closing?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -103,7 +103,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -111,7 +111,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -124,7 +124,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -132,7 +132,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -227,7 +227,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -240,7 +240,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -650,7 +650,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -679,7 +679,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "" @@ -717,15 +717,15 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -898,7 +898,7 @@ msgid "" "Polarity" msgstr "" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -919,7 +919,7 @@ msgstr "" msgid "Delete" msgstr "_Delete" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 msgid "Detailed information" msgstr "" @@ -995,7 +995,7 @@ msgstr "Download From Radio" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1050,7 +1050,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1059,14 +1059,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1115,7 +1116,7 @@ msgstr "Import from RFinder" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1134,7 +1135,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1157,7 +1158,7 @@ msgstr "" msgid "Files" msgstr "_File" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_File" @@ -1380,15 +1381,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1596,11 +1597,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1614,7 +1615,7 @@ msgstr "" msgid "Memories" msgstr "Diff raw memories" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1931,7 +1932,7 @@ msgstr "" msgid "Radio information" msgstr "" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -1992,7 +1993,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Reporting is disabled" @@ -2048,11 +2049,11 @@ msgstr "" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2092,7 +2093,7 @@ msgstr "" msgid "Settings" msgstr "" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2171,7 +2172,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2230,7 +2231,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2256,8 +2257,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2310,7 +2311,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2343,7 +2344,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2477,7 +2478,7 @@ msgstr "" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "" @@ -2486,7 +2487,7 @@ msgstr "" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/es.po b/chirp/locale/es.po index bf772132..60bcc6ff 100644 --- a/chirp/locale/es.po +++ b/chirp/locale/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-09-04 23:19-0400\n" "Last-Translator: MELERIX\n" "Language-Team: \n" @@ -69,19 +69,19 @@ msgstr[1] "%i Memorias y desplazar bloque hacia arriba" msgid "%s has not been saved. Save before closing?" msgstr "%s no ha sido guardado. ¿Guardar antes de cerrar?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "(Describe lo que ocurrió en cambio)" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "(Describe lo que esperabas que ocurriera)" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "(Describe lo que estabas haciendo)" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -125,7 +125,7 @@ msgstr "" " (gira el dial mientras mantienes presionado MONI para cambiar)\n" "7. Cliquea Aceptar\n" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -138,7 +138,7 @@ msgstr "" "4. Después de cliquear Aceptar, presiona \"SET MHz\" para enviar " "imagen.\n" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -161,7 +161,7 @@ msgstr "" "desbloquear\n" " la radio, entonces vuelve a iniciar en el paso 1.\n" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -175,7 +175,7 @@ msgstr "" "4. Después de cliquear Aceptar, presiona \"TONE\" para enviar la " "imagen.\n" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -333,7 +333,7 @@ msgstr "" "4. Después de cliquear Aceptar,\n" " presiona la tecla [C](SEND) para enviar la imagen.\n" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -356,7 +356,7 @@ msgstr "" "para\n" " enviar la imagen.\n" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -1028,7 +1028,7 @@ msgstr "" "Una nueva versión de CHIRP está disponible, ¡Por favor visita el sitio web " "tan pronto como sea posible para descargarla!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "El modo AM no permite dúplex o tono" @@ -1056,7 +1056,7 @@ msgstr "Todos los formatos soportados|" msgid "Amateur" msgstr "Aficionado" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Ha ocurrido un error" @@ -1093,15 +1093,15 @@ msgstr "Binario" msgid "Browser" msgstr "Navegador" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "Número de error no encontrado" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "Número de error:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "Asunto del error:" @@ -1287,7 +1287,7 @@ msgstr "" "Polaridad\n" "DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "Decodificación DTMF" @@ -1307,7 +1307,7 @@ msgstr "Decimal" msgid "Delete" msgstr "Borrar" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 msgid "Detailed information" msgstr "Información detallada" @@ -1380,7 +1380,7 @@ msgstr "Descargar instrucciones" msgid "Driver" msgstr "Controlador" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "Información del controlador" @@ -1437,7 +1437,7 @@ msgstr "Ingresa un nuevo nombre para el banco %s:" msgid "Enter custom port:" msgstr "Ingresar puerto personalizado:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1446,19 +1446,21 @@ msgstr "" "estabas haciendo, lo que esperabas que ocurriera, y lo que realmente ocurrió." #: ../wxui/bugreport.py:310 +#, fuzzy msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" "Ingresa información sobre el error incluyendo un asunto breve pero " "significativo e información sobre el modelo de radio (si es aplicable) en " "cuestión." -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "Ingresa la información para agregar al error aquí" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "Ingresa el numero de error que debe ser actualizado" @@ -1507,7 +1509,7 @@ msgstr "Exportar a CSV..." msgid "Extra" msgstr "Extra" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "Radio FM" @@ -1529,7 +1531,7 @@ msgstr "Fallo al cargar navegador de radio" msgid "Failed to parse result" msgstr "Fallo al analizar el resultado" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "Fallo al enviar el reporte de error:" @@ -1551,7 +1553,7 @@ msgstr "El archivo no existe: %s" msgid "Files" msgstr "Archivos" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 msgid "Files:" msgstr "Archivos:" @@ -1868,15 +1870,15 @@ msgstr "La frecuencia %s está fuera del rango soportado" msgid "Frequency granularity in kHz" msgstr "Granularidad de frecuencia en kHz" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "La frecuencia en este rango no debe ser modo AM" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "La frecuencia en este rango requiere modo AM" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "La frecuencia fuera de las bandas TX debe ser dúplex=off" @@ -2089,11 +2091,11 @@ msgstr "Cargando ajustes" msgid "Login failed: Check your username and password" msgstr "Inicio de sesión fallido: Comprueba tu nombre de usuario y contraseña" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "Cadena del logotipo 1 (12 caracteres)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "Cadena del logotipo 2 (12 caracteres)" @@ -2106,7 +2108,7 @@ msgstr "Longitud" msgid "Memories" msgstr "Memorias" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" "Las memorias son de sólo lectura debido a una versión de firmware no " @@ -2448,7 +2450,7 @@ msgstr "La radio no reconoció el bloque %i" msgid "Radio information" msgstr "Información de radio" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "Modelo de radio:" @@ -2519,7 +2521,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "Reportar o actualizar un error..." -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, python-format msgid "Reporting a new bug: %r" msgstr "Reportando un nuevo error: %r" @@ -2577,11 +2579,11 @@ msgstr "Ajustes guardados" msgid "Scan control (skip, include, priority, etc)" msgstr "Control de escáner (omitir, incluir, prioridad, etc)" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "Listas de escaneo" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "Codificador" @@ -2617,7 +2619,7 @@ msgstr "Servicio" msgid "Settings" msgstr "Ajustes" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" "Los ajustes son de sólo lectura debido a una versión de firmware no soportada" @@ -2697,7 +2699,7 @@ msgstr "Estado/Provincia" msgid "Success" msgstr "Éxito" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "Reporte de error enviado exitosamente:" @@ -2785,7 +2787,7 @@ msgstr "" "herramienta no cargará lo que esperas. Se recomienda que salgas ahora y " "ejecutes CHIRP de forma no interactiva (o con stdin redirigido a /dev/null)" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "La siguiente información será enviada:" @@ -2820,8 +2822,8 @@ msgstr "" "un registro de depuración para que podamos agregar soporte para las otras " "revisiones." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" "Este controlador está en desarrollo y debe ser considerado como experimental." @@ -2899,7 +2901,7 @@ msgstr "" "¡También por favor envía en solicitudes de errores y mejoras!\n" "Has sido advertido. ¡Procede bajo tu propio riesgo!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2943,7 +2945,7 @@ msgstr "" "veces.\n" "Si puede ingresar, por favor comprueba la radio y el cable.\n" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -3096,7 +3098,7 @@ msgstr "Modelo no soportado %r" msgid "Update an existing bug" msgstr "Actualizar un error existente" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "Actualizando error %s" @@ -3105,7 +3107,7 @@ msgstr "Actualizando error %s" msgid "Upload instructions" msgstr "Cargar instrucciones" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" "La carga está deshabilitada debido a una versión de firmware no soportada" diff --git a/chirp/locale/fr.po b/chirp/locale/fr.po index fc855c49..f5390c14 100644 --- a/chirp/locale/fr.po +++ b/chirp/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-05-22 16:39-0400\n" "Last-Translator: Alexandre J. Raymond \n" "Language-Team: French\n" @@ -67,19 +67,19 @@ msgstr[1] "%i Mémoires et décaler le bloc vers le haut" msgid "%s has not been saved. Save before closing?" msgstr "%s n'a pas été enregistré. Enregistrer avant de fermer ?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -120,7 +120,7 @@ msgstr "" " (tournez le rotacteur en maintenant appuyée la touche MONI\n" "7. Cliquez sur OK\n" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -133,7 +133,7 @@ msgstr "" "4. Après avoir cliqué sur OK, appuyez sur \"SET MHz\" pour envoyer " "l'image.\n" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -157,7 +157,7 @@ msgstr "" "déverrouiller\n" " la radio, retournez ensuite à l'étape 1.\n" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -171,7 +171,7 @@ msgstr "" "4. Après avoir cliqué sur OK, appuyez sur \"TONE\" pour envoyer " "l'image.\n" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -332,7 +332,7 @@ msgstr "" "4. Après avoir cliqué sur OK,\n" " appuyez sur la touche [C](SEND) pour envoyer l'image.\n" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -354,7 +354,7 @@ msgstr "" "6. Après avoir cliqué sur OK, appuyez la touche [V/M] à gauche\n" " pour envoyer l'image.\n" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -1025,7 +1025,7 @@ msgstr "" "Une nouvelle version de CHIRP est disponible. Visitez le site internet dès " "que possible pour la télécharger!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -1053,7 +1053,7 @@ msgstr "Tous les formats supportés|" msgid "Amateur" msgstr "Amateur" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Une erreur s'est produite" @@ -1090,17 +1090,17 @@ msgstr "Corbeille" msgid "Browser" msgstr "Navigateur" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 #, fuzzy msgid "Bug number not found" msgstr "Problème numero:" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 #, fuzzy msgid "Bug number:" msgstr "Problème numero:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -1286,7 +1286,7 @@ msgstr "" "Polarité\n" "DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "Décodage DTMF" @@ -1306,7 +1306,7 @@ msgstr "Dec" msgid "Delete" msgstr "Supprimer" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Informations sur les pilotes" @@ -1380,7 +1380,7 @@ msgstr "Instructions de téléchargement" msgid "Driver" msgstr "Pilote" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "Informations sur les pilotes" @@ -1437,7 +1437,7 @@ msgstr "Saisir un nouveau nom pour la banque %s:" msgid "Enter custom port:" msgstr "Saisir un port personnalisé:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1446,14 +1446,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1500,7 +1501,7 @@ msgstr "Exporter vers un fichier CSV..." msgid "Extra" msgstr "Extra" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "Radio FM" @@ -1522,7 +1523,7 @@ msgstr "Échec du chargement du navigateur de la radio" msgid "Failed to parse result" msgstr "Échec d'analyse des résultats" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 #, fuzzy msgid "Failed to send bug report:" msgstr "Échec d'analyse des résultats" @@ -1545,7 +1546,7 @@ msgstr "Fichier inexistant: %s" msgid "Files" msgstr "Fichiers" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "Fichiers" @@ -1867,15 +1868,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "Granularité fréquence en kHz" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -2089,11 +2090,11 @@ msgstr "Chargement des préférences" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "Texte logo 1 (12 caractères)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "Texte logo 2 (12 caractères)" @@ -2106,7 +2107,7 @@ msgstr "Longitude" msgid "Memories" msgstr "Mémoires" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -2444,7 +2445,7 @@ msgstr "La radio n'a pas accusé reception du bloc %i" msgid "Radio information" msgstr "Informations de la radio" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2513,7 +2514,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Rapport d'utilisation activé" @@ -2572,11 +2573,11 @@ msgstr "Préférences enregistrées" msgid "Scan control (skip, include, priority, etc)" msgstr "Contrôles de scan (sauter, inclure, priorité, etc)" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "Lists de scan" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "Brouilleur" @@ -2612,7 +2613,7 @@ msgstr "Service" msgid "Settings" msgstr "Préférences" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2689,7 +2690,7 @@ msgstr "État/Province" msgid "Success" msgstr "Réussi" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2772,7 +2773,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2807,8 +2808,8 @@ msgstr "" "débogage pour que nous puissions ajouter du support pour les autres " "révisions." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" "Ce pilote est en développement et devrait être considéré comme expérimental." @@ -2889,7 +2890,7 @@ msgstr "" "Envoyez aussi vos demandes d'améliorations ou rapports de bogues!\n" "Vous avez été prévenu. Procedez à vos risques et périls!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2932,7 +2933,7 @@ msgstr "" "quelques fois.\n" "Si vous ne parvenez pas à entrer, vérifiez la radio et le câble.\n" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -3078,7 +3079,7 @@ msgstr "Modèle non supporté %r" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Mise à jour de la liste URCALL" @@ -3087,7 +3088,7 @@ msgstr "Mise à jour de la liste URCALL" msgid "Upload instructions" msgstr "Instruction de téléchargement" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/hu.po b/chirp/locale/hu.po index 6c902cd9..ca83065c 100644 --- a/chirp/locale/hu.po +++ b/chirp/locale/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2015-01-28 13:47+0100\n" "Last-Translator: Attila Joubert \n" "Language-Team: English\n" @@ -60,19 +60,19 @@ msgstr[1] "... és a tömböt felfelé lépteti" msgid "%s has not been saved. Save before closing?" msgstr "A fájl megváltozott! Menti bezárás előtt?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -104,7 +104,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -112,7 +112,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -125,7 +125,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -133,7 +133,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -228,7 +228,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -241,7 +241,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -651,7 +651,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -680,7 +680,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Hiba történt" @@ -718,15 +718,15 @@ msgstr "" msgid "Browser" msgstr "Böngésző" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -902,7 +902,7 @@ msgid "" "Polarity" msgstr "DTCS pol." -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -924,7 +924,7 @@ msgstr "Érzékelés" msgid "Delete" msgstr "Törlés" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "%s információk lekérése" @@ -1002,7 +1002,7 @@ msgstr "{name} Utasítások" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1059,7 +1059,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1068,14 +1068,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1126,7 +1127,7 @@ msgstr "Export fájlba" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1145,7 +1146,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1168,7 +1169,7 @@ msgstr "" msgid "Files" msgstr "_Fájl" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_Fájl" @@ -1394,15 +1395,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1619,11 +1620,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1636,7 +1637,7 @@ msgstr "" msgid "Memories" msgstr "Memória" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1964,7 +1965,7 @@ msgstr "" msgid "Radio information" msgstr "%s információk lekérése" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2027,7 +2028,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Listázás letiltva" @@ -2084,11 +2085,11 @@ msgstr "Beállítás" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2128,7 +2129,7 @@ msgstr "" msgid "Settings" msgstr "Beállítás" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2210,7 +2211,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2269,7 +2270,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2295,8 +2296,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2349,7 +2350,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2382,7 +2383,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2522,7 +2523,7 @@ msgstr "Nem támogatott fájltípus" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "URCALL lista frissítése." @@ -2532,7 +2533,7 @@ msgstr "URCALL lista frissítése." msgid "Upload instructions" msgstr "{instructions}" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/it.po b/chirp/locale/it.po index 68ebeed8..6057ef74 100644 --- a/chirp/locale/it.po +++ b/chirp/locale/it.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-06-27 19:05+0200\n" "Last-Translator: Giovanni Scafora IK5TWZ \n" "Language-Team: CHIRP Italian Translation\n" @@ -69,19 +69,19 @@ msgstr[1] "%i memorie e sposta il blocco su" msgid "%s has not been saved. Save before closing?" msgstr "%s non è stato salvato. Salvarlo prima di chiudere?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "(Descrivi ciò che è realmente accaduto)" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "(Descrivi cosa ti aspettavi che accadesse)" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "(Descrivi cosa stavi facendo)" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -122,7 +122,7 @@ msgstr "" " (per cambiare, ruotare il selettore, tenendo premuto MONI)\n" "7. Fare clic su OK\n" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -135,7 +135,7 @@ msgstr "" "4. Dopo aver fatto clic su OK, premere \"SET MHz\" per inviare " "l'immagine.\n" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -159,7 +159,7 @@ msgstr "" " provare a spegnere la radio, tenendo premuto il pulsante\n" " rosso \"*L\" per sbloccarla, quindi ricominciare dal punto 1.\n" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -172,7 +172,7 @@ msgstr "" "4. Dopo aver fatto clic su OK, premere \"TONE\" per inviare " "l'immagine.\n" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -329,7 +329,7 @@ msgstr "" "4. Dopo aver fatto clic su OK,\n" " premere il tasto [C](SEND) per inviare l'immagine.\n" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -353,7 +353,7 @@ msgstr "" "per\n" " inviare l'immagine.\n" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -1034,7 +1034,7 @@ msgid "" msgstr "" "È disponibile una nuova versione di CHIRP. Visita il sito per scaricarla!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -1062,7 +1062,7 @@ msgstr "Tutti i formati supportati|" msgid "Amateur" msgstr "Radioamatore" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Si è verificato un errore" @@ -1099,15 +1099,15 @@ msgstr "Bin" msgid "Browser" msgstr "Browser" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "Il numero del bug non esiste" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "Numero del bug:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "Oggetto del bug:" @@ -1293,7 +1293,7 @@ msgstr "" "DTCS\n" "Polarità" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "Decodifica DTMF" @@ -1313,7 +1313,7 @@ msgstr "Dec" msgid "Delete" msgstr "Elimina" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 msgid "Detailed information" msgstr "Informazioni dettagliate" @@ -1386,7 +1386,7 @@ msgstr "Istruzioni per il download" msgid "Driver" msgstr "Driver" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "Informazioni sul driver" @@ -1443,7 +1443,7 @@ msgstr "Inserire un nuovo nome per il banco %s:" msgid "Enter custom port:" msgstr "Inserire la porta personalizzata:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1453,18 +1453,20 @@ msgstr "" "effettivamente accaduto." #: ../wxui/bugreport.py:310 +#, fuzzy msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" "Immetti le informazioni sul bug, compreso un oggetto breve ma significativo " "e le informazioni sul modello della radio (se applicabile) in questione." -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "Inserisci qui le informazioni da aggiungere al bug" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "Digita il numero del bug da aggiornare" @@ -1513,7 +1515,7 @@ msgstr "Esporta in CSV..." msgid "Extra" msgstr "Extra" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "Radio FM" @@ -1535,7 +1537,7 @@ msgstr "Impossibile caricare il browser della radio" msgid "Failed to parse result" msgstr "Impossibile elaborare il risultato" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "Impossibile inviare la segnalazione del bug:" @@ -1557,7 +1559,7 @@ msgstr "Il file non esiste: %s" msgid "Files" msgstr "File" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 msgid "Files:" msgstr "File:" @@ -1875,15 +1877,15 @@ msgstr "La frequenza %s non rientra nel range supportato" msgid "Frequency granularity in kHz" msgstr "Granularità della frequenza in kHz" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -2096,11 +2098,11 @@ msgstr "Caricamento delle impostazioni" msgid "Login failed: Check your username and password" msgstr "Accesso non riuscito: controlla il nome utente e la password" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "Stringa del logo 1 (12 caratteri)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "Stringa del logo 2 (12 caratteri)" @@ -2113,7 +2115,7 @@ msgstr "Longitudine" msgid "Memories" msgstr "Memorie" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -2453,7 +2455,7 @@ msgstr "La radio non ha accettato il blocco %i" msgid "Radio information" msgstr "Informazioni sulla radio" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "Modello della radio:" @@ -2524,7 +2526,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "Segnala o aggiorna un bug..." -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, python-format msgid "Reporting a new bug: %r" msgstr "Segnalazione di un nuovo bug: %r" @@ -2582,11 +2584,11 @@ msgstr "Impostazioni salvate" msgid "Scan control (skip, include, priority, etc)" msgstr "Controllo della scansione (salto, inclusione, priorità, ecc.)" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "Elenco delle scansioni" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "Scrambler" @@ -2622,7 +2624,7 @@ msgstr "Servizio" msgid "Settings" msgstr "Impostazioni" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2699,7 +2701,7 @@ msgstr "Stato/Provincia" msgid "Success" msgstr "Successo" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "Segnalazione del bug inviata con successo:" @@ -2784,7 +2786,7 @@ msgstr "" "caricherà ciò che ci si aspetta. Si consiglia di uscire ora ed eseguire " "CHIRP in modo non interattivo (o con lo stdin reindirizzato a /dev/null)." -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "Saranno trasmesse le seguenti informazioni:" @@ -2819,8 +2821,8 @@ msgstr "" "segnalazione di bug con un log di debug, in modo da poter aggiungere il " "supporto per le altre revisioni." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" "Questo driver è in fase di sviluppo e deve essere considerato sperimentale." @@ -2900,7 +2902,7 @@ msgstr "" "Si prega, inoltre, di inviare richieste di bug e miglioramenti!\n" "Siete stati avvertiti. Procedete a vostro rischio e pericolo!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2943,7 +2945,7 @@ msgstr "" "può richiedere alcuni secondi, se non funziona, riprovare più volte.\n" "Se riuscite a entrare, controllate la radio ed il cavo.\n" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -3098,7 +3100,7 @@ msgstr "Modello non supportato %r" msgid "Update an existing bug" msgstr "Aggiorna un bug esistente" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "Aggiornamento del bug %s" @@ -3107,7 +3109,7 @@ msgstr "Aggiornamento del bug %s" msgid "Upload instructions" msgstr "Istruzioni per il caricamento" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/ja_JP.po b/chirp/locale/ja_JP.po index b2220dfb..efb1f2ab 100644 --- a/chirp/locale/ja_JP.po +++ b/chirp/locale/ja_JP.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2023-12-03 11:04+0900\n" "Last-Translator: weboo \n" "Language-Team: Japanese \n" @@ -59,19 +59,19 @@ msgstr[1] "%i 件削除してグループを上方向にシフト" msgid "%s has not been saved. Save before closing?" msgstr "%s は保存されていません。保存しますか?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -103,7 +103,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -111,7 +111,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -124,7 +124,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -132,7 +132,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -227,7 +227,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -240,7 +240,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -664,7 +664,7 @@ msgstr "" "新しいバージョンのCHIRPが利用可能です。できるだけ早く更新されることをお勧めし" "ます。今すぐ更新しますか?" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -692,7 +692,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "" @@ -729,17 +729,17 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 #, fuzzy msgid "Bug number not found" msgstr "行" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 #, fuzzy msgid "Bug number:" msgstr "行" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -909,7 +909,7 @@ msgid "" "Polarity" msgstr "DTCS極性" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "DTMF デコード" @@ -929,7 +929,7 @@ msgstr "" msgid "Delete" msgstr "削除" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "ドライバー情報" @@ -1001,7 +1001,7 @@ msgstr "ダウンロード手順" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "ドライバー情報" @@ -1056,7 +1056,7 @@ msgstr "" msgid "Enter custom port:" msgstr "ポートを入力:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1065,14 +1065,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1119,7 +1120,7 @@ msgstr "CSVにエクスポート..." msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "FMラジオ" @@ -1138,7 +1139,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1160,7 +1161,7 @@ msgstr "" msgid "Files" msgstr "" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 msgid "Files:" msgstr "" @@ -1382,15 +1383,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1594,11 +1595,11 @@ msgstr "設定をロードしています" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "起動メッセージ1(半角12文字)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "起動メッセージ2(半角12文字)" @@ -1611,7 +1612,7 @@ msgstr "軽度" msgid "Memories" msgstr "メモリー" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1922,7 +1923,7 @@ msgstr "" msgid "Radio information" msgstr "" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -1984,7 +1985,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "診断レポート送信" @@ -2042,11 +2043,11 @@ msgstr "設定を保存" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "スキャンリスト" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "スクランブル" @@ -2083,7 +2084,7 @@ msgstr "サービス" msgid "Settings" msgstr "設定" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2160,7 +2161,7 @@ msgstr "" msgid "Success" msgstr "成功" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2219,7 +2220,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2249,8 +2250,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2314,7 +2315,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2345,7 +2346,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2482,7 +2483,7 @@ msgstr "" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "" @@ -2491,7 +2492,7 @@ msgstr "" msgid "Upload instructions" msgstr "アップロード手順" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/nl.po b/chirp/locale/nl.po index 7989f59b..663aa46c 100644 --- a/chirp/locale/nl.po +++ b/chirp/locale/nl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2012-03-18 12:01+0100\n" "Last-Translator: Michael Tel \n" "Language-Team: Dutch\n" @@ -60,19 +60,19 @@ msgstr[1] "Verwijderen (en naar boven verplaatsen)" msgid "%s has not been saved. Save before closing?" msgstr "Het bestand is aangepast. Wilt u de wijzigingen opslaan?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -104,7 +104,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -112,7 +112,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -125,7 +125,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -133,7 +133,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -228,7 +228,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -241,7 +241,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -651,7 +651,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -680,7 +680,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Er is een fout opgetreden" @@ -718,15 +718,15 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -902,7 +902,7 @@ msgid "" "Polarity" msgstr "DTCS Pol" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -923,7 +923,7 @@ msgstr "Detecteren" msgid "Delete" msgstr "Verwijderen" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Informatie van de bank ophalen" @@ -1000,7 +1000,7 @@ msgstr "Download van radio" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1056,7 +1056,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1065,14 +1065,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1122,7 +1123,7 @@ msgstr "Exporteren naar bestand" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1141,7 +1142,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1164,7 +1165,7 @@ msgstr "" msgid "Files" msgstr "_Bestanden" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_Bestanden" @@ -1387,15 +1388,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1610,11 +1611,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1627,7 +1628,7 @@ msgstr "" msgid "Memories" msgstr "Kanalen" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1950,7 +1951,7 @@ msgstr "" msgid "Radio information" msgstr "Informatie van de bank ophalen" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2013,7 +2014,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Rapportering is uitgeschakeld" @@ -2069,11 +2070,11 @@ msgstr "" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2113,7 +2114,7 @@ msgstr "" msgid "Settings" msgstr "" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2192,7 +2193,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2251,7 +2252,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2277,8 +2278,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2331,7 +2332,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2364,7 +2365,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2504,7 +2505,7 @@ msgstr "Niet-ondersteunende bestandstype" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Bijwerken URCALL lijst" @@ -2513,7 +2514,7 @@ msgstr "Bijwerken URCALL lijst" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/pl.po b/chirp/locale/pl.po index 25abc51f..788b7ecd 100644 --- a/chirp/locale/pl.po +++ b/chirp/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2023-07-12 21:21+0200\n" "Last-Translator: szporwolik\n" "Language-Team: Polish\n" @@ -64,19 +64,19 @@ msgstr[2] "%i pamięci oraz przesuń blok do góry" msgid "%s has not been saved. Save before closing?" msgstr "%s nie został zapisany. Zapisać przed zamknięciem?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -108,7 +108,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -116,7 +116,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -129,7 +129,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -137,7 +137,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -232,7 +232,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -245,7 +245,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -669,7 +669,7 @@ msgstr "" "Nowa wersja programu CHIRP jest dostępna. Odwiedź stronę internetową " "projektu i pobierz ją!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -697,7 +697,7 @@ msgstr "Wszystkie wspierane formaty|" msgid "Amateur" msgstr "Amatorska" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Wystąpił błąd" @@ -735,17 +735,17 @@ msgstr "Bin" msgid "Browser" msgstr "Przeglądarka" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 #, fuzzy msgid "Bug number not found" msgstr "Numer zgłoszenia:" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 #, fuzzy msgid "Bug number:" msgstr "Numer zgłoszenia:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -925,7 +925,7 @@ msgstr "" "Polaryzacja\n" "DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -945,7 +945,7 @@ msgstr "Dec" msgid "Delete" msgstr "Usuń" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Informacje o radiostacji" @@ -1022,7 +1022,7 @@ msgstr "Instrukcje pobierania" msgid "Driver" msgstr "Przeładuj sterownik" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1077,7 +1077,7 @@ msgstr "Wprowadź nową nazwę dla banku %s:" msgid "Enter custom port:" msgstr "Wprowadź port:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1086,14 +1086,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1141,7 +1142,7 @@ msgstr "Eksportuj do pliku CSV" msgid "Extra" msgstr "Dodatkowa" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1163,7 +1164,7 @@ msgstr "Nie udało się załadować przeglądarki radiostacji" msgid "Failed to parse result" msgstr "Parsowanie wyniku nie udało się" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 #, fuzzy msgid "Failed to send bug report:" msgstr "Parsowanie wyniku nie udało się" @@ -1186,7 +1187,7 @@ msgstr "Plik nie istnieje: %s" msgid "Files" msgstr "Pliki" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "Pliki" @@ -1410,15 +1411,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1634,11 +1635,11 @@ msgstr "Ładowanie ustawień" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1651,7 +1652,7 @@ msgstr "Długość geograficzna" msgid "Memories" msgstr "Pamięci" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1966,7 +1967,7 @@ msgstr "Radiostacja nie potwierdziła (ack) bloku %i" msgid "Radio information" msgstr "Informacje o radiostacji" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2031,7 +2032,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Raportowanie jest włączone" @@ -2091,11 +2092,11 @@ msgstr "Zapisano ustawienia" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2133,7 +2134,7 @@ msgstr "Usługa" msgid "Settings" msgstr "Ustawienia" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2214,7 +2215,7 @@ msgstr "Stan/Prowincja" msgid "Success" msgstr "Sukces" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2276,7 +2277,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2306,8 +2307,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2360,7 +2361,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2391,7 +2392,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2537,7 +2538,7 @@ msgstr "Nieobsługiwany typ pliku" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Pobieranie listy URCALL" @@ -2546,7 +2547,7 @@ msgstr "Pobieranie listy URCALL" msgid "Upload instructions" msgstr "Instrukcje wysyłania" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/pt_BR.po b/chirp/locale/pt_BR.po index 19509c02..fb7c2bc8 100644 --- a/chirp/locale/pt_BR.po +++ b/chirp/locale/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2013-03-30 22:04-0300\n" "Last-Translator: Crezivando \n" "Language-Team: Language pt-BR\n" @@ -59,19 +59,19 @@ msgstr[1] "Apagar (e deslocar)" msgid "%s has not been saved. Save before closing?" msgstr "Arquivo modificado, salvar alteraes antes de fechar?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -103,7 +103,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -111,7 +111,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -124,7 +124,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -132,7 +132,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -227,7 +227,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -240,7 +240,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -650,7 +650,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -679,7 +679,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Ocorreu um erro" @@ -717,15 +717,15 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -901,7 +901,7 @@ msgid "" "Polarity" msgstr "DTCS Pol" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -922,7 +922,7 @@ msgstr "Detectar" msgid "Delete" msgstr "Apagar" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Recuperando informaes do banco" @@ -999,7 +999,7 @@ msgstr "Descarregar a partir do R msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1055,7 +1055,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1064,14 +1064,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1121,7 +1122,7 @@ msgstr "Exportar Para Arquivo" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1140,7 +1141,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1163,7 +1164,7 @@ msgstr "" msgid "Files" msgstr "_Arquivo" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_Arquivo" @@ -1386,15 +1387,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1609,11 +1610,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1626,7 +1627,7 @@ msgstr "" msgid "Memories" msgstr "Memrias" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1949,7 +1950,7 @@ msgstr "" msgid "Radio information" msgstr "Recuperando informaes do banco" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2012,7 +2013,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Emisso de Relatrios desabilitada" @@ -2068,11 +2069,11 @@ msgstr "" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2112,7 +2113,7 @@ msgstr "" msgid "Settings" msgstr "" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2191,7 +2192,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2250,7 +2251,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2276,8 +2277,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2330,7 +2331,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2363,7 +2364,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2503,7 +2504,7 @@ msgstr "Tipo de arquivo n msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Atualizando lista URCALL" @@ -2512,7 +2513,7 @@ msgstr "Atualizando lista URCALL" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/ru.po b/chirp/locale/ru.po index 3755f901..830de187 100644 --- a/chirp/locale/ru.po +++ b/chirp/locale/ru.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2023-10-11 16:47+0300\n" "Last-Translator: Olesya Gerasimenko \n" "Language-Team: Basealt Translation Team\n" @@ -67,19 +67,19 @@ msgstr[2] "Ячейки памяти (%i) и сдвинуть блок ввер msgid "%s has not been saved. Save before closing?" msgstr "Сохранение %s не было выполнено. Сохранить перед закрытием?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -119,7 +119,7 @@ msgstr "" " (чтобы изменить, поверните ручку настройки, удерживая MONI)\n" "7. Нажмите «OK»\n" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -131,7 +131,7 @@ msgstr "" "3. Удерживая кнопку «A/N LOW», включите станцию.\n" "4. После нажатия «ОК» нажмите «SET MHz» для отправки образа.\n" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -156,7 +156,7 @@ msgstr "" "«*L» для\n" " разблокировки станции, а затем начните снова с шага 1.\n" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -168,7 +168,7 @@ msgstr "" "3. Удерживая кнопки «TONE» и «REV», включите станцию.\n" "4. После нажатия «ОК» нажмите «TONE» для отправки образа.\n" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -317,7 +317,7 @@ msgstr "" "4. После нажатия «ОК» нажмите клавишу [C](SEND) для\n" " отправки образа.\n" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -339,7 +339,7 @@ msgstr "" "6. После нажатия «ОК» нажмите «левую» клавишу [V/M]\n" " для отправки образа.\n" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -998,7 +998,7 @@ msgstr "" "Доступная новая версия программы CHIRP. Как можно скорее загрузите её на веб-" "сайте!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -1026,7 +1026,7 @@ msgstr "Все поддерживаемые форматы|" msgid "Amateur" msgstr "Любительская радиосвязь" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Ошибка" @@ -1064,17 +1064,17 @@ msgstr "Бинарный" msgid "Browser" msgstr "Браузер" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 #, fuzzy msgid "Bug number not found" msgstr "Номер задачи:" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 #, fuzzy msgid "Bug number:" msgstr "Номер задачи:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -1260,7 +1260,7 @@ msgstr "" "Полярность\n" "DTCS" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -1280,7 +1280,7 @@ msgstr "Десятичный" msgid "Delete" msgstr "Удалить" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Информация о станции" @@ -1356,7 +1356,7 @@ msgstr "Инструкции по загрузке" msgid "Driver" msgstr "Перезагрузить драйвер" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1411,7 +1411,7 @@ msgstr "Введите новое имя банка %s:" msgid "Enter custom port:" msgstr "Введите пользовательский порт:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1420,14 +1420,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1474,7 +1475,7 @@ msgstr "Экспорт в CSV..." msgid "Extra" msgstr "Дополнительно" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1496,7 +1497,7 @@ msgstr "Не удалось загрузить браузер станций" msgid "Failed to parse result" msgstr "Не удалось проанализировать результат" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 #, fuzzy msgid "Failed to send bug report:" msgstr "Не удалось проанализировать результат" @@ -1519,7 +1520,7 @@ msgstr "Файл не существует: %s" msgid "Files" msgstr "Файлы" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "Файлы" @@ -1840,15 +1841,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -2062,11 +2063,11 @@ msgstr "Загрузка параметров" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -2079,7 +2080,7 @@ msgstr "Долгота" msgid "Memories" msgstr "Ячейки памяти" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -2416,7 +2417,7 @@ msgstr "Станция не распознала блок %i" msgid "Radio information" msgstr "Информация о станции" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2481,7 +2482,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Отправка отчётов включена" @@ -2542,11 +2543,11 @@ msgstr "Сохранённые параметры" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2583,7 +2584,7 @@ msgstr "Служба" msgid "Settings" msgstr "Параметры" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2664,7 +2665,7 @@ msgstr "Область/регион" msgid "Success" msgstr "Успешно" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2742,7 +2743,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2775,8 +2776,8 @@ msgstr "" "полностью, создайте отчёт об ошибке и приложите к нему журнал отладки, чтобы " "мы могли добавить соответствующую поддержку для других версий." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2833,7 +2834,7 @@ msgstr "" "Также присылайте отчёты об ошибках и предложения по улучшению.\n" "Вы были предупреждены; продолжайте на свой страх и риск!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2869,7 +2870,7 @@ msgstr "" "может занять несколько секунд. Если не получается, сделайте ещё\n" "несколько попыток. Если удалось войти, проверьте станцию и кабель.\n" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -3016,7 +3017,7 @@ msgstr "Неподдерживаемый тип файла" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Обновление URCALL" @@ -3025,7 +3026,7 @@ msgstr "Обновление URCALL" msgid "Upload instructions" msgstr "Отправка инструкций" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/tr_TR.po b/chirp/locale/tr_TR.po index 10a4aeb4..9c9943c8 100644 --- a/chirp/locale/tr_TR.po +++ b/chirp/locale/tr_TR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-08-30 00:06+0300\n" "Last-Translator: Abdullah YILMAZ (TA1AUB) \n" "Language-Team: TURKISH\n" @@ -68,19 +68,19 @@ msgstr[1] "%i Kaydı ve bloğu yukarı kaydır" msgid "%s has not been saved. Save before closing?" msgstr "%s kaydedilmedi. Kapanmadan önce kaydedilsin mi?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "(Bunun yerine gerçekte ne olduğunu açıklayın)" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "(Ne olacağını beklediğinizi açıklayın)" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "(Ne yaptığınızı anlatın)" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -122,7 +122,7 @@ msgstr "" " (değiştirmek için MONI'ye basılı tutarken kadranı çevirin)\n" "7. TAMAM'a tıklayın\n" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -135,7 +135,7 @@ msgstr "" "4. TAMAM'ı tıkladıktan sonra, imajı göndermek için \"SET MHz\"e " "basın.\n" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -159,7 +159,7 @@ msgstr "" "deneyin,\n" " ardından 1. adımdan başlayın.\n" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -172,7 +172,7 @@ msgstr "" "4. TAMAM'ı tıkladıktan sonra, imajı göndermek için \"TONE\" tuşuna " "basın.\n" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -321,7 +321,7 @@ msgstr "" "4. TAMAM'ı tıkladıktan sonra, imajı göndermek için [C](GÖNDER) tuşuna " "basın.\n" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -342,7 +342,7 @@ msgstr "" "6. Tamam'a tıkladıktan sonra, imajı göndermek için \"sol\" [V/M] " "tuşuna basın.\n" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -995,7 +995,7 @@ msgstr "" "Yeni bir CHIRP sürümü mevcut. İndirmek için lütfen en kısa zamanda web " "sitesini ziyaret edin!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -1023,7 +1023,7 @@ msgstr "Desteklenen tüm biçimler|" msgid "Amateur" msgstr "Amatör" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Bir hata oluştu" @@ -1060,15 +1060,15 @@ msgstr "Bin" msgid "Browser" msgstr "Tarayıcı" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "Hata numarası bulunamadı" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "Hata numarası:" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "Hata konusu:" @@ -1252,7 +1252,7 @@ msgstr "" "DTCS\n" "Polarite" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "DTMF kod çöz" @@ -1272,7 +1272,7 @@ msgstr "Dec" msgid "Delete" msgstr "Sil" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 msgid "Detailed information" msgstr "Detaylı bilgi" @@ -1344,7 +1344,7 @@ msgstr "İndirme talimatları" msgid "Driver" msgstr "Sürücü" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "Sürücü bilgileri" @@ -1401,7 +1401,7 @@ msgstr "Banka %s için yeni bir ad girin:" msgid "Enter custom port:" msgstr "Özel bağlantı noktasını girin:" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1410,18 +1410,20 @@ msgstr "" "beklediğinizi ve gerçekte ne olduğunu açıklayıcı olun." #: ../wxui/bugreport.py:310 +#, fuzzy msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" "Hata hakkında kısa ama anlamlı bir konu başlığı ve (varsa) söz konusu telsiz " "modeli hakkında bilgi içeren bilgileri girin." -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "Hataya eklenecek bilgileri buraya girin" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "Güncellenmesi gereken hata numarasını girin" @@ -1470,7 +1472,7 @@ msgstr "CSV'ye aktar..." msgid "Extra" msgstr "Ekstra" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "FM Radyo" @@ -1492,7 +1494,7 @@ msgstr "Telsiz tarayıcısı yüklenemedi" msgid "Failed to parse result" msgstr "Sonuç ayrıştırılamadı" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "Hata raporu gönderilemedi:" @@ -1514,7 +1516,7 @@ msgstr "Dosya mevcut değil: %s" msgid "Files" msgstr "Dosyalar" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 msgid "Files:" msgstr "Dosyalar:" @@ -1825,15 +1827,15 @@ msgstr "Frekans %s desteklenen aralığın dışında" msgid "Frequency granularity in kHz" msgstr "kHz cinsinden frekans ayrıntı düzeyi" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "Bu aralıktaki frekans AM modu olmamalıdır" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "Bu aralıktaki frekans AM modunu gerektirir" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "TX bantları dışındaki frekanslar dupleks=kapalı olmalıdır" @@ -2046,11 +2048,11 @@ msgstr "Ayarlar yükleniyor" msgid "Login failed: Check your username and password" msgstr "Giriş başarısız: Kullanıcı adınızı ve şifrenizi kontrol edin" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "Logo dizesi 1 (12 karakter)" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "Logo dizesi 2 (12 karakter)" @@ -2063,7 +2065,7 @@ msgstr "Boylam" msgid "Memories" msgstr "Kayıtlar" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" "Desteklenmeyen aygıt yazılımı sürümü nedeniyle bellekler salt okunurdur" @@ -2401,7 +2403,7 @@ msgstr "Telsiz %i bloğunu onaylamadı" msgid "Radio information" msgstr "Telsiz bilgisi" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "Telsiz modeli:" @@ -2471,7 +2473,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "Bir hatayı bildirin veya güncelleyin..." -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, python-format msgid "Reporting a new bug: %r" msgstr "Yeni hata bildiriliyor: %r" @@ -2530,11 +2532,11 @@ msgstr "Kaydedilmiş ayarlar" msgid "Scan control (skip, include, priority, etc)" msgstr "Tarama kontrolü (atlama, dahil etme, öncelik vb.)" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "Tarama listeleri" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "Karıştırıcı" @@ -2570,7 +2572,7 @@ msgstr "Servis" msgid "Settings" msgstr "Ayarlar" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "Desteklenmeyen aygıt yazılımı sürümü nedeniyle ayarlar salt okunurdur" @@ -2648,7 +2650,7 @@ msgstr "Eyalet/İl" msgid "Success" msgstr "Başarılı" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "Hata raporu başarıyla gönderildi:" @@ -2733,7 +2735,7 @@ msgstr "" "yüklemeyecektir. Şimdi çıkıp CHIRP'i etkileşimsiz olarak (veya stdin /dev/" "null'a yönlendirilmiş olarak) çalıştırmanız önerilir" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "Aşağıdaki bilgiler sunulacaktır:" @@ -2767,8 +2769,8 @@ msgstr "" "güncellenmemişse, lütfen hata ayıklama günlüğü içeren bir hata raporu açarak " "bize yardım edin, böylece diğer revizyonlar için destek verebilelim." -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" "Bu sürücü geliştirme aşamasındadır ve deneysel olarak değerlendirilmelidir." @@ -2843,7 +2845,7 @@ msgstr "" "Ayrıca lütfen hata raporu ve geliştirme istekleri gönderin!\n" "Uyarıldınız. Kendi sorumluluğunuzda ilerleyin!" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2886,7 +2888,7 @@ msgstr "" "birkaç saniye sürebilir, işe yaramazsa birkaç kez tekrar deneyin.\n" "İşe yaramazsa, lütfen telsizi ve kabloyu kontrol edin.\n" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -3035,7 +3037,7 @@ msgstr "Desteklenmeyen model %r" msgid "Update an existing bug" msgstr "Mevcut bir hatayı güncelle" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, python-format msgid "Updating bug %s" msgstr "%s hatası güncelleniyor" @@ -3044,7 +3046,7 @@ msgstr "%s hatası güncelleniyor" msgid "Upload instructions" msgstr "Yükleme talimatları" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" "Desteklenmeyen aygıt yazılımı sürümü nedeniyle yükleme devre dışı bırakıldı" diff --git a/chirp/locale/uk_UA.po b/chirp/locale/uk_UA.po index 82733477..eac13774 100644 --- a/chirp/locale/uk_UA.po +++ b/chirp/locale/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2015-11-30 10:36+0200\n" "Last-Translator: laser \n" "Language-Team: laser \n" @@ -59,19 +59,19 @@ msgstr[1] "Видалити (та зсунути вгору)" msgid "%s has not been saved. Save before closing?" msgstr "Файл змінено, зберегти зміни перед закриттям?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -103,7 +103,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -111,7 +111,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -124,7 +124,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -132,7 +132,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -227,7 +227,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -240,7 +240,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -650,7 +650,7 @@ msgid "" "possible to download it!" msgstr "" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -679,7 +679,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "Сталася помилка" @@ -717,15 +717,15 @@ msgstr "" msgid "Browser" msgstr "" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -903,7 +903,7 @@ msgid "" "Polarity" msgstr "DTCS Pol" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -925,7 +925,7 @@ msgstr "Визначити" msgid "Delete" msgstr "Видалити" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "Отримання інформації банку" @@ -1003,7 +1003,7 @@ msgstr "Скопіювати з радіостанції" msgid "Driver" msgstr "" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1059,7 +1059,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1068,14 +1068,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1125,7 +1126,7 @@ msgstr "Експорт до файлу" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1144,7 +1145,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1167,7 +1168,7 @@ msgstr "" msgid "Files" msgstr "_Файл" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "_Файл" @@ -1390,15 +1391,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1613,11 +1614,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1631,7 +1632,7 @@ msgstr "" msgid "Memories" msgstr "Пам'ять" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1956,7 +1957,7 @@ msgstr "" msgid "Radio information" msgstr "Отримання інформації банку" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2019,7 +2020,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "Звіти вимкнуто" @@ -2075,11 +2076,11 @@ msgstr "" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2119,7 +2120,7 @@ msgstr "" msgid "Settings" msgstr "" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2199,7 +2200,7 @@ msgstr "" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2258,7 +2259,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2284,8 +2285,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2338,7 +2339,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2371,7 +2372,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2511,7 +2512,7 @@ msgstr "Файл непідтримуваного типу" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "Оновлення списку URCALL" @@ -2520,7 +2521,7 @@ msgstr "Оновлення списку URCALL" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/locale/zh_CN.po b/chirp/locale/zh_CN.po index 18343f6a..13b2a50e 100644 --- a/chirp/locale/zh_CN.po +++ b/chirp/locale/zh_CN.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: CHIRP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-05 16:29-0700\n" +"POT-Creation-Date: 2024-09-09 14:41-0700\n" "PO-Revision-Date: 2024-01-26 13:30+0800\n" "Last-Translator: DuckSoft, BH2UEP \n" "Language-Team: \n" @@ -56,19 +56,19 @@ msgstr[0] "...并将区块上移" msgid "%s has not been saved. Save before closing?" msgstr "%s 还没有被保存。要在关闭程序前保存吗?" -#: ../wxui/bugreport.py:424 +#: ../wxui/bugreport.py:426 msgid "(Describe what actually happened instead)" msgstr "" -#: ../wxui/bugreport.py:422 +#: ../wxui/bugreport.py:424 msgid "(Describe what you expected to happen)" msgstr "" -#: ../wxui/bugreport.py:420 +#: ../wxui/bugreport.py:422 msgid "(Describe what you were doing)" msgstr "" -#: ../wxui/bugreport.py:426 +#: ../wxui/bugreport.py:428 msgid "" "(Has this ever worked before? New radio? Does it work with OEM software?)" msgstr "" @@ -100,7 +100,7 @@ msgid "" "7. Click OK\n" msgstr "" -#: ../drivers/ft2900.py:1228 +#: ../drivers/ft2900.py:1253 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -108,7 +108,7 @@ msgid "" "4. After clicking OK, press \"SET MHz\" to send image.\n" msgstr "" -#: ../drivers/ft2900.py:1233 +#: ../drivers/ft2900.py:1258 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -121,7 +121,7 @@ msgid "" " radio, then start back at step 1.\n" msgstr "" -#: ../drivers/ft7100.py:1126 +#: ../drivers/ft7100.py:1130 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -129,7 +129,7 @@ msgid "" "4. After clicking OK, press \"TONE\" to send image.\n" msgstr "" -#: ../drivers/ft7100.py:1131 +#: ../drivers/ft7100.py:1135 msgid "" "1. Turn Radio off.\n" "2. Connect data cable.\n" @@ -224,7 +224,7 @@ msgid "" " press the [C](SEND) key to send image.\n" msgstr "" -#: ../drivers/ft7800.py:835 +#: ../drivers/ft7800.py:857 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -237,7 +237,7 @@ msgid "" " send image.\n" msgstr "" -#: ../drivers/ft7800.py:845 +#: ../drivers/ft7800.py:867 msgid "" "1. Turn radio off.\n" "2. Connect cable to DATA jack.\n" @@ -659,7 +659,7 @@ msgid "" "possible to download it!" msgstr "新的 CHIRP 版本已经推出。请尽快访问网站下载!" -#: ../drivers/ga510.py:1070 +#: ../drivers/ga510.py:1068 msgid "AM mode does not allow duplex or tone" msgstr "" @@ -687,7 +687,7 @@ msgstr "" msgid "Amateur" msgstr "" -#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:391 ../wxui/common.py:609 +#: ../wxui/bugreport.py:284 ../wxui/bugreport.py:393 ../wxui/common.py:609 #: ../wxui/common.py:636 msgid "An error has occurred" msgstr "发生错误" @@ -724,15 +724,15 @@ msgstr "" msgid "Browser" msgstr "数据浏览器" -#: ../wxui/bugreport.py:390 +#: ../wxui/bugreport.py:392 msgid "Bug number not found" msgstr "" -#: ../wxui/bugreport.py:367 +#: ../wxui/bugreport.py:369 msgid "Bug number:" msgstr "" -#: ../wxui/bugreport.py:323 +#: ../wxui/bugreport.py:324 msgid "Bug subject:" msgstr "" @@ -903,7 +903,7 @@ msgstr "" "DTCS\n" "策略" -#: ../drivers/uvk5.py:885 +#: ../drivers/uvk5.py:881 msgid "DTMF decode" msgstr "" @@ -923,7 +923,7 @@ msgstr "探测" msgid "Delete" msgstr "删除" -#: ../wxui/bugreport.py:467 +#: ../wxui/bugreport.py:469 #, fuzzy msgid "Detailed information" msgstr "电台信息" @@ -996,7 +996,7 @@ msgstr "显示指引" msgid "Driver" msgstr "重新加载驱动程序" -#: ../drivers/uvk5.py:1303 +#: ../drivers/uvk5.py:1299 msgid "Driver information" msgstr "" @@ -1051,7 +1051,7 @@ msgstr "" msgid "Enter custom port:" msgstr "" -#: ../wxui/bugreport.py:405 +#: ../wxui/bugreport.py:407 msgid "" "Enter details about this update. Be descriptive about what you were doing, " "what you expected to happen, and what actually happened." @@ -1060,14 +1060,15 @@ msgstr "" #: ../wxui/bugreport.py:310 msgid "" "Enter information about the bug including a short but meaningful subject and " -"information about the radio model (if applicable) in question." +"information about the radio model (if applicable) in question. In the next " +"step you will have a chance to add more details about the problem." msgstr "" -#: ../wxui/bugreport.py:412 +#: ../wxui/bugreport.py:414 msgid "Enter information to add to the bug here" msgstr "" -#: ../wxui/bugreport.py:358 +#: ../wxui/bugreport.py:360 msgid "Enter the bug number that should be updated" msgstr "" @@ -1115,7 +1116,7 @@ msgstr "以CSV文件格式导出……" msgid "Extra" msgstr "" -#: ../drivers/uvk5.py:1301 +#: ../drivers/uvk5.py:1297 msgid "FM Radio" msgstr "" @@ -1134,7 +1135,7 @@ msgstr "" msgid "Failed to parse result" msgstr "" -#: ../wxui/bugreport.py:595 +#: ../wxui/bugreport.py:597 msgid "Failed to send bug report:" msgstr "" @@ -1156,7 +1157,7 @@ msgstr "" msgid "Files" msgstr "文件" -#: ../wxui/bugreport.py:465 +#: ../wxui/bugreport.py:467 #, fuzzy msgid "Files:" msgstr "文件" @@ -1412,15 +1413,15 @@ msgstr "" msgid "Frequency granularity in kHz" msgstr "" -#: ../drivers/ga510.py:1074 ../drivers/tdh8.py:2464 +#: ../drivers/ga510.py:1072 ../drivers/tdh8.py:2482 msgid "Frequency in this range must not be AM mode" msgstr "" -#: ../drivers/ga510.py:1067 ../drivers/tdh8.py:2461 +#: ../drivers/ga510.py:1065 ../drivers/tdh8.py:2479 msgid "Frequency in this range requires AM mode" msgstr "" -#: ../drivers/tdh8.py:2468 +#: ../drivers/tdh8.py:2486 msgid "Frequency outside TX bands must be duplex=off" msgstr "" @@ -1628,11 +1629,11 @@ msgstr "" msgid "Login failed: Check your username and password" msgstr "" -#: ../drivers/uvk5.py:1804 +#: ../drivers/uvk5.py:1800 msgid "Logo string 1 (12 characters)" msgstr "" -#: ../drivers/uvk5.py:1811 +#: ../drivers/uvk5.py:1807 msgid "Logo string 2 (12 characters)" msgstr "" @@ -1645,7 +1646,7 @@ msgstr "" msgid "Memories" msgstr "存储" -#: ../drivers/uvk5.py:2093 +#: ../drivers/uvk5.py:2098 msgid "Memories are read-only due to unsupported firmware version" msgstr "" @@ -1958,7 +1959,7 @@ msgstr "" msgid "Radio information" msgstr "电台信息" -#: ../wxui/bugreport.py:331 +#: ../wxui/bugreport.py:333 msgid "Radio model:" msgstr "" @@ -2022,7 +2023,7 @@ msgstr "" msgid "Report or update a bug..." msgstr "" -#: ../wxui/bugreport.py:462 +#: ../wxui/bugreport.py:464 #, fuzzy, python-format msgid "Reporting a new bug: %r" msgstr "启用报告功能" @@ -2077,11 +2078,11 @@ msgstr "设置" msgid "Scan control (skip, include, priority, etc)" msgstr "" -#: ../drivers/uvk5.py:899 +#: ../drivers/uvk5.py:895 msgid "Scanlists" msgstr "" -#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:895 +#: ../drivers/ksun_m6.py:418 ../drivers/uvk5.py:891 msgid "Scrambler" msgstr "" @@ -2120,7 +2121,7 @@ msgstr "" msgid "Settings" msgstr "设置" -#: ../drivers/uvk5.py:2097 +#: ../drivers/uvk5.py:2102 msgid "Settings are read-only due to unsupported firmware version" msgstr "" @@ -2196,7 +2197,7 @@ msgstr "州/省" msgid "Success" msgstr "" -#: ../wxui/bugreport.py:598 +#: ../wxui/bugreport.py:600 msgid "Successfully sent bug report:" msgstr "" @@ -2255,7 +2256,7 @@ msgid "" "redirected to /dev/null)" msgstr "" -#: ../wxui/bugreport.py:447 +#: ../wxui/bugreport.py:449 msgid "The following information will be submitted:" msgstr "" @@ -2280,8 +2281,8 @@ msgid "" "add support for the other revisions." msgstr "" -#: ../drivers/radtel_rt490.py:1324 ../drivers/radtel_rt490.py:1326 -#: ../drivers/radtel_rt490.py:1328 +#: ../drivers/radtel_rt490.py:1345 ../drivers/radtel_rt490.py:1347 +#: ../drivers/radtel_rt490.py:1349 msgid "This driver is in development and should be considered as experimental." msgstr "" @@ -2341,7 +2342,7 @@ msgid "" "You have been warned. Proceed at your own risk!" msgstr "" -#: ../wxui/bugreport.py:372 +#: ../wxui/bugreport.py:374 msgid "" "This is the ticket number for an already-created issue on the chirpmyradio." "com website" @@ -2374,7 +2375,7 @@ msgid "" "If you can get into it, please check the radio and cable.\n" msgstr "" -#: ../drivers/uvk5.py:1889 +#: ../drivers/uvk5.py:1885 msgid "" "This should only be enabled if you are using modified firmware that supports " "wider frequency coverage. Enabling this will cause CHIRP not to enforce OEM " @@ -2511,7 +2512,7 @@ msgstr "不支持的文件类型" msgid "Update an existing bug" msgstr "" -#: ../wxui/bugreport.py:464 +#: ../wxui/bugreport.py:466 #, fuzzy, python-format msgid "Updating bug %s" msgstr "正在更新 URCALL 列表" @@ -2520,7 +2521,7 @@ msgstr "正在更新 URCALL 列表" msgid "Upload instructions" msgstr "" -#: ../drivers/uvk5.py:2084 +#: ../drivers/uvk5.py:2089 msgid "Upload is disabled due to unsupported firmware version" msgstr "" diff --git a/chirp/wxui/bugreport.py b/chirp/wxui/bugreport.py index 6bd2e8eb..437a2b97 100644 --- a/chirp/wxui/bugreport.py +++ b/chirp/wxui/bugreport.py @@ -309,7 +309,8 @@ def GetNext(self): class NewBugInfo(BugReportPage): INST = _('Enter information about the bug including a short but ' 'meaningful subject and information about the radio model ' - '(if applicable) in question.') + '(if applicable) in question. In the next step you will have ' + 'a chance to add more details about the problem.') def _build(self, vbox): self.context.bugsubj = self.context.bugmodel = None @@ -323,6 +324,7 @@ def _build(self, vbox): panel, label=_('Bug subject:')), border=20, flag=wx.ALIGN_CENTER | wx.RIGHT | wx.LEFT) self.subj = wx.TextCtrl(panel) + self.subj.SetMaxLength(100) self.subj.Bind(wx.EVT_TEXT, self.validate_next) grid.Add(self.subj, 1, border=20, flag=wx.EXPAND | wx.RIGHT | wx.LEFT)