[chirp_devel] [PATCH] Fix range() related errors in Python3 #7923
Alex Page
Mon Jun 1 09:23:19 PDT 2020
# HG changeset patch
# User Alex Page <a.t.page at gmail.com>
# Date 1591028543 14400
# Mon Jun 01 12:22:23 2020 -0400
# Branch py3
# Node ID 71b08c265f2136cd1b66fb2095aaaaf81302ab55
# Parent 1c8561d30ebe95eefffcd8ab1be62d6f4cbf7d09
Fix range() related errors in Python3 #7923
diff --git a/chirp/drivers/ft450d.py b/chirp/drivers/ft450d.py
--- a/chirp/drivers/ft450d.py
+++ b/chirp/drivers/ft450d.py
@@ -304,8 +304,8 @@
struct mem_struct current;
"""
- _CALLSIGN_CHARSET = [chr(x) for x in range(ord("0"), ord("9") + 1) +
- range(ord("A"), ord("Z") + 1) + [ord(" ")]]
+ _CALLSIGN_CHARSET = [chr(x) for x in list(range(ord("0"), ord("9") + 1)) +
+ list(range(ord("A"), ord("Z") + 1)) + [ord(" ")]]
_CALLSIGN_CHARSET_REV = dict(zip(_CALLSIGN_CHARSET,
range(0, len(_CALLSIGN_CHARSET))))
diff --git a/chirp/drivers/leixen.py b/chirp/drivers/leixen.py
--- a/chirp/drivers/leixen.py
+++ b/chirp/drivers/leixen.py
@@ -226,7 +226,7 @@
]
MODES = ["NFM", "FM"]
-WTFTONES = map(float, xrange(56, 64))
+WTFTONES = map(float, range(56, 64))
TONES = WTFTONES + chirp_common.TONES
DTCS_CODES = [17, 50, 645] + chirp_common.DTCS_CODES
DTCS_CODES.sort()
diff --git a/chirp/drivers/puxing_px888k.py b/chirp/drivers/puxing_px888k.py
--- a/chirp/drivers/puxing_px888k.py
+++ b/chirp/drivers/puxing_px888k.py
@@ -527,7 +527,7 @@
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))
+DTMF_GROUPS = zip(["Off", "A", "B", "C", "D", "*", "#"], [255]+list(range(10, 16)))
FIVE_TONE_STANDARDS = ['ZVEI1', 'ZVEI2', 'CCIR1', 'CCITT']
# should mimic the defaults in the memedit MemoryEditor somewhat
@@ -543,10 +543,10 @@
DTMF_ALERT_TRANSPOND = zip(['Off', 'Call alert',
'Transpond-alert',
'Transpond-ID code'],
- [255]+range(1, 4))
+ [255]+list(range(1, 4)))
FIVE_TONE_ALERT_TRANSPOND = zip(['Off', 'Alert tone',
'Transpond', 'Transpond-ID code'],
- [255]+range(1, 4))
+ [255]+list(range(1, 4)))
BFM_BANDS = ['87.5-108MHz', '76.0-91.0MHz', '76.0-108.0MHz', '65.0-76.0MHz']
BFM_STRIDE = ['100kHz', '50kHz']
More information about the chirp_devel
mailing list