diff options
| author | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-19 19:50:34 -0600 |
|---|---|---|
| committer | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-19 19:50:34 -0600 |
| commit | 88861100f7881a09f88ac78ba21fd0975cd05f38 (patch) | |
| tree | 3f864d7f52b022a72e3c29600042f572856e43da | |
| parent | e1af65311e21aa9b1a7fc5d4df3f3040842b1db5 (diff) | |
| download | chirp-88861100f7881a09f88ac78ba21fd0975cd05f38.tar.gz chirp-88861100f7881a09f88ac78ba21fd0975cd05f38.tar.xz | |
More driver fixes
| -rw-r--r-- | chirp/directory.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/ap510.py | 5 | ||||
| -rw-r--r-- | chirp/drivers/ft450d.py | 19 | ||||
| -rw-r--r-- | chirp/drivers/leixen.py | 4 | ||||
| -rw-r--r-- | chirp/drivers/puxing_px888k.py | 15 | ||||
| -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/ts850.py | 2 |
9 files changed, 48 insertions, 14 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/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/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..63499fe 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'] 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/ts850.py b/chirp/drivers/ts850.py index 4520aca..746a94d 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) |
