[chirp_devel] [PATCH] [TK-760G] Unobfuscate valid character filter. #4731
Tom Hayward
Thu Apr 13 17:27:40 PDT 2017
# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1492129614 25200
# Thu Apr 13 17:26:54 2017 -0700
# Node ID de0318acd4a4dc92fa1e16c2d86bab03fa97beed
# Parent 791293b5a0101a7be61cafdc1b41cdd0a431cfd8
[TK-760G] Unobfuscate valid character filter. #4731
diff -r 791293b5a010 -r de0318acd4a4 chirp/drivers/tk760g.py
--- a/chirp/drivers/tk760g.py Thu Apr 13 17:22:21 2017 -0700
+++ b/chirp/drivers/tk760g.py Thu Apr 13 17:26:54 2017 -0700
@@ -1261,13 +1261,8 @@
basic.append(pom)
# dealer
- mstr = ""
- valid_chars = [32, 44, 45, 47, 58, 91, 93] + range(48, 58) + \
- range(65, 91) + range(97, 123)
-
- for i in range(0, len(self._VARIANT)):
- if ord(self._VARIANT[i]) in valid_chars:
- mstr += self._VARIANT[i]
+ valid_chars = ",-/:[]" + chirp_common.CHARSET_ALPHANUMERIC
+ mstr = "".join([c for c in self._VARIANT if c in valid_chars])
val = RadioSettingValueString(0, 35, mstr)
val.set_mutable(False)
More information about the chirp_devel
mailing list