diff options
Diffstat (limited to 'chirp')
| -rw-r--r-- | chirp/directory.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/ap510.py | 5 | ||||
| -rw-r--r-- | chirp/drivers/bf-t1.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/ft450d.py | 19 | ||||
| -rw-r--r-- | chirp/drivers/kguv8dplus.py | 4 | ||||
| -rw-r--r-- | chirp/drivers/leixen.py | 4 | ||||
| -rw-r--r-- | chirp/drivers/puxing_px888k.py | 17 | ||||
| -rw-r--r-- | chirp/drivers/th_uvf8d.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/thd72.py | 6 | ||||
| -rw-r--r-- | chirp/drivers/tk270.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/tk760.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/tk760g.py | 11 | ||||
| -rw-r--r-- | chirp/drivers/ts2000.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/ts850.py | 4 |
14 files changed, 58 insertions, 24 deletions
diff --git a/chirp/directory.py b/chirp/directory.py index f79f23d..60c3813 100644 --- a/chirp/directory.py +++ b/chirp/directory.py @@ -227,3 +227,5 @@ def safe_import_drivers(limit=None): __import__('chirp.drivers.%s' % driver_module) except Exception as e: print('Failed to import %s: %s' % (module, e)) + #Use the below line for more information when troubleshooting + #traceback.print_exc() diff --git a/chirp/drivers/ap510.py b/chirp/drivers/ap510.py index f905d31..724e4e0 100644 --- a/chirp/drivers/ap510.py +++ b/chirp/drivers/ap510.py @@ -242,7 +242,8 @@ class AP510Memory(object): class AP510Memory20141215(AP510Memory): """Compatible with firmware version 20141215""" - ATTR_MAP = dict(AP510Memory.ATTR_MAP.items() + { + ATTR_MAP = dict(AP510Memory.ATTR_MAP.items()) + ATTR_MAP.update({ 'tx_volume': '21', # 1-6 'rx_volume': '22', # 1-9 'tx_power': '23', # 1: 1 watt, 0: 0.5 watt @@ -252,7 +253,7 @@ class AP510Memory20141215(AP510Memory): 'path3': '27', # like "WIDE1 1" else "0" 'multiple': '28', 'auto_on': '29', - }.items()) + }) def get_multiple(self): return dict(zip( diff --git a/chirp/drivers/bf-t1.py b/chirp/drivers/bf-t1.py index f93972f..a0c4939 100644 --- a/chirp/drivers/bf-t1.py +++ b/chirp/drivers/bf-t1.py @@ -503,7 +503,7 @@ class BFT1(chirp_common.CloneModeRadio, chirp_common.ExperimentalRadio): """Get the radio's features""" rf = chirp_common.RadioFeatures() - rf.valid_special_chans = SPECIALS.keys() + rf.valid_special_chans = list(SPECIALS.keys()) rf.has_settings = True rf.has_bank = False rf.has_tuning_step = False diff --git a/chirp/drivers/ft450d.py b/chirp/drivers/ft450d.py index 12af6b8..4d49ea5 100644 --- a/chirp/drivers/ft450d.py +++ b/chirp/drivers/ft450d.py @@ -304,8 +304,23 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio): struct mem_struct current;
"""
- _CALLSIGN_CHARSET = [chr(x) for x in range(ord("0"), ord("9") + 1) +
- range(ord("A"), ord("Z") + 1) + [ord(" ")]]
+ temp_list = []
+
+ for x in range(ord("0"),ord("9")+1):
+ temp_list.append(chr(x))
+
+ for x in range(ord("A"),ord("Z")+1):
+ temp_list.append(chr(x))
+
+ temp_list.append(chr(ord(" ")))
+
+ #print(temp_list)
+
+ #_CALLSIGN_CHARSET = [chr(x) for x in range(ord("0"), ord("9") + 1) +
+ # range(ord("A"), ord("Z") + 1) + [ord(" ")]]
+
+ _CALLSIGN_CHARSET = temp_list
+
_CALLSIGN_CHARSET_REV = dict(zip(_CALLSIGN_CHARSET,
range(0, len(_CALLSIGN_CHARSET))))
diff --git a/chirp/drivers/kguv8dplus.py b/chirp/drivers/kguv8dplus.py index 64f09ae..185c452 100644 --- a/chirp/drivers/kguv8dplus.py +++ b/chirp/drivers/kguv8dplus.py @@ -666,9 +666,9 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio, _nam = self._memobj.names[number] if mem.empty: - _mem.set_raw("\x00" * (_mem.size() / 8)) + _mem.set_raw("\x00" * int((_mem.size() / 8))) self._memobj.valid[number] = 0 - self._memobj.names[number].set_raw("\x00" * (_nam.size() / 8)) + self._memobj.names[number].set_raw("\x00" * int((_nam.size() / 8))) return _mem.rxfreq = int(mem.freq / 10) diff --git a/chirp/drivers/leixen.py b/chirp/drivers/leixen.py index fd580d4..e9a39d6 100644 --- a/chirp/drivers/leixen.py +++ b/chirp/drivers/leixen.py @@ -226,8 +226,8 @@ PFKEYSHORT_LIST = ["OFF", ] MODES = ["NFM", "FM"] -WTFTONES = map(float, xrange(56, 64)) -TONES = WTFTONES + chirp_common.TONES +WTFTONES = map(float, range(56, 64)) +TONES = list(WTFTONES) + chirp_common.TONES DTCS_CODES = [17, 50, 645] + chirp_common.DTCS_CODES DTCS_CODES.sort() TMODES = ["", "Tone", "DTCS", "DTCS"] diff --git a/chirp/drivers/puxing_px888k.py b/chirp/drivers/puxing_px888k.py index 78f49a6..7e4fb83 100644 --- a/chirp/drivers/puxing_px888k.py +++ b/chirp/drivers/puxing_px888k.py @@ -527,7 +527,11 @@ BACKLIGHT_MODES = ["Off", "Auto", "On"] TONE_RESET_TIME = ['Off'] + ['%ds' % x for x in range(1, 256)] DTMF_TONE_RESET_TIME = TONE_RESET_TIME[0:16] -DTMF_GROUPS = zip(["Off", "A", "B", "C", "D", "*", "#"], [255]+range(10, 16)) +temp_list = [255] +for x in range(10,16): + temp_list.append(x) + +DTMF_GROUPS = zip(["Off", "A", "B", "C", "D", "*", "#"], temp_list) FIVE_TONE_STANDARDS = ['ZVEI1', 'ZVEI2', 'CCIR1', 'CCITT'] # should mimic the defaults in the memedit MemoryEditor somewhat @@ -540,13 +544,18 @@ SANE_MEMORY_DEFAULT = b"\x14\x61\x00\x00\x14\x61\x00\x00" + \ # these two option sets are listed differently like this in the stock software, # so I'm keeping them separate for now if they are in fact identical # in behaviour, that should probably be amended +temp_list = [255] +for x in range(1,4): + temp_list.append(x) + DTMF_ALERT_TRANSPOND = zip(['Off', 'Call alert', 'Transpond-alert', 'Transpond-ID code'], - [255]+range(1, 4)) + temp_list) + FIVE_TONE_ALERT_TRANSPOND = zip(['Off', 'Alert tone', 'Transpond', 'Transpond-ID code'], - [255]+range(1, 4)) + temp_list) BFM_BANDS = ['87.5-108MHz', '76.0-91.0MHz', '76.0-108.0MHz', '65.0-76.0MHz'] BFM_STRIDE = ['100kHz', '50kHz'] @@ -1142,7 +1151,7 @@ class Puxing_PX888K_Radio(chirp_common.CloneModeRadio): rf.valid_name_length = 6 rf.valid_cross_modes = CROSS_MODES rf.memory_bounds = (1, 128) - rf.valid_special_chans = SPECIAL_CHANNELS.keys() + rf.valid_special_chans = list(SPECIAL_CHANNELS.keys()) rf.valid_tuning_steps = [5.0, 6.25, 10.0, 12.5, 25.0] return rf diff --git a/chirp/drivers/th_uvf8d.py b/chirp/drivers/th_uvf8d.py index e302784..412ec07 100644 --- a/chirp/drivers/th_uvf8d.py +++ b/chirp/drivers/th_uvf8d.py @@ -288,7 +288,7 @@ class TYTUVF8DRadio(chirp_common.CloneModeRadio): rf.valid_skips = ["", "S"] rf.valid_power_levels = POWER_LEVELS rf.valid_modes = ["FM", "NFM"] - rf.valid_special_chans = SPECIALS.keys() + rf.valid_special_chans = list(SPECIALS.keys()) rf.valid_name_length = 7 return rf diff --git a/chirp/drivers/thd72.py b/chirp/drivers/thd72.py index 5b3d053..b8b01e9 100644 --- a/chirp/drivers/thd72.py +++ b/chirp/drivers/thd72.py @@ -244,9 +244,9 @@ class THD72Radio(chirp_common.CloneModeRadio): rf.has_bank = False rf.has_settings = True rf.valid_tuning_steps = [] - rf.valid_modes = MODES_REV.keys() - rf.valid_tmodes = TMODES_REV.keys() - rf.valid_duplexes = DUPLEX_REV.keys() + rf.valid_modes = list(MODES_REV.keys()) + rf.valid_tmodes = list(TMODES_REV.keys()) + rf.valid_duplexes = list(DUPLEX_REV.keys()) rf.valid_skips = ["", "S"] rf.valid_characters = chirp_common.CHARSET_ALPHANUMERIC rf.valid_name_length = 8 diff --git a/chirp/drivers/tk270.py b/chirp/drivers/tk270.py index b7927d2..89961ee 100644 --- a/chirp/drivers/tk270.py +++ b/chirp/drivers/tk270.py @@ -96,7 +96,7 @@ struct { MEM_SIZE = 0x400 BLOCK_SIZE = 8 -MEM_BLOCKS = range(0, (MEM_SIZE / BLOCK_SIZE)) +MEM_BLOCKS = range(0, int(int(MEM_SIZE) / BLOCK_SIZE)) ACK_CMD = "\x06" TIMEOUT = 0.05 # from 0.03 up it' s safe, we set in 0.05 for a margin diff --git a/chirp/drivers/tk760.py b/chirp/drivers/tk760.py index c9a2ff1..c272574 100644 --- a/chirp/drivers/tk760.py +++ b/chirp/drivers/tk760.py @@ -97,7 +97,7 @@ KEYS = { MEM_SIZE = 0x400 BLOCK_SIZE = 8 -MEM_BLOCKS = range(0, (MEM_SIZE / BLOCK_SIZE)) +MEM_BLOCKS = range(0, int((int(MEM_SIZE) / BLOCK_SIZE))) ACK_CMD = "\x06" # from 0.03 up it' s safe # I have to turn it up, some users reported problems with this, was 0.05 diff --git a/chirp/drivers/tk760g.py b/chirp/drivers/tk760g.py index 212eb73..6e62c19 100644 --- a/chirp/drivers/tk760g.py +++ b/chirp/drivers/tk760g.py @@ -264,12 +264,19 @@ struct { MEM_SIZE = 0x8000 # 32,768 bytes BLOCK_SIZE = 256 BLOCKS = MEM_SIZE / BLOCK_SIZE -MEM_BLOCKS = range(0, BLOCKS) +MEM_BLOCKS = range(0, int(BLOCKS)) # define and empty block of data, as it will be used a lot in this code EMPTY_BLOCK = "\xFF" * 256 -RO_BLOCKS = range(0x10, 0x1F) + range(0x59, 0x5f) +RO_BLOCKS = [] +for x in range(0x10,0x1F): + RO_BLOCKS.append(x) + +for x in range(0x59,0x5f): + RO_BLOCKS.append(x) + +#RO_BLOCKS = range(0x10, 0x1F) + range(0x59, 0x5f) ACK_CMD = "\x06" POWER_LEVELS = [chirp_common.PowerLevel("Low", watts=1), diff --git a/chirp/drivers/ts2000.py b/chirp/drivers/ts2000.py index c842a5f..99f4d39 100644 --- a/chirp/drivers/ts2000.py +++ b/chirp/drivers/ts2000.py @@ -50,7 +50,7 @@ class TS2000Radio(KenwoodLiveRadio): rf.valid_tuning_steps = list(TS2000_SSB_STEPS + TS2000_FM_STEPS) rf.valid_bands = [(1000, 1300000000)] rf.valid_skips = ["", "S"] - rf.valid_duplexes = TS2000_DUPLEX.values() + rf.valid_duplexes = list(TS2000_DUPLEX.values()) # TS-2000 uses ";" as a message separator even though it seems to # allow you to to use all printable ASCII characters at the manual diff --git a/chirp/drivers/ts850.py b/chirp/drivers/ts850.py index 4520aca..8fb453d 100644 --- a/chirp/drivers/ts850.py +++ b/chirp/drivers/ts850.py @@ -37,7 +37,7 @@ TS850_MODES = { "CW-R": "7", "FSK-R": "9", } -TS850_MODES_REV = {val: mode for mode, val in TS850_MODES.iteritems()} +TS850_MODES_REV = {val: mode for mode, val in TS850_MODES.items()} TS850_TONES = list(chirp_common.OLD_TONES) TS850_TONES.remove(69.3) @@ -81,7 +81,7 @@ class TS850Radio(KenwoodLiveRadio): rf.valid_bands = TS850_BANDS rf.valid_characters = chirp_common.CHARSET_UPPER_NUMERIC rf.valid_duplexes = TS850_DUPLEX - rf.valid_modes = TS850_MODES.keys() + rf.valid_modes = list(TS850_MODES.keys()) rf.valid_skips = TS850_SKIP rf.valid_tmodes = TS850_TMODES |
