[chirp_devel] [PATCH] [ft1d] cleanse unprintable characters from the aprs messages
Angus Ainslie
Tue May 26 20:28:33 PDT 2015
# HG changeset patch
# User Angus Ainslie <angus at akkea.ca>
# Date 1432697154 21600
# Tue May 26 21:25:54 2015 -0600
# Node ID a01c70d3e9905f64d44160e6367acb55be26498c
# Parent 1540030fc327c5b56967a208496b16081715fa98
[ft1d] cleanse unprintable characters from the aprs messages
diff -r 1540030fc327 -r a01c70d3e990 chirp/drivers/ft1d.py
--- a/chirp/drivers/ft1d.py Tue May 26 17:19:17 2015 -0600
+++ b/chirp/drivers/ft1d.py Tue May 26 21:25:54 2015 -0600
@@ -973,8 +973,13 @@
"Dst Callsign %d" % index, val)
menu.append(rs)
+ body = str(aprs_msg[index].path_and_body).rstrip("\xFF")
+ checksum = body[-2:]
+ body = ''.join(s for s in body[:-2]
+ if s in string.printable).translate(
+ None, "\x09\x0a\x0b\x0c\x0d")
val = RadioSettingValueString(
- 0, 66, str(aprs_msg[index].path_and_body).rstrip("\xFF"))
+ 0, 66, str(body))
rs = RadioSetting(
"aprs_msg.path_and_body%d" % index, "Body", val)
menu.append(rs)
More information about the chirp_devel
mailing list