diff --git a/src/apex/aprs/aprs_kiss.py b/src/apex/aprs/aprs_kiss.py index 063fc3fc3db7d2eb804f6807df02300216b2d731..27005d1308f1df37d746d2c41fb73531d6bc2f3f 100644 --- a/src/apex/aprs/aprs_kiss.py +++ b/src/apex/aprs/aprs_kiss.py @@ -48,10 +48,10 @@ class AprsKiss(apex.kiss.Kiss): # Less than 2 callsigns? if 1 < i < 11: if (raw_frame[raw_slice + 1] & 0x03 == 0x03 and raw_frame[raw_slice + 2] in [0xf0, 0xcf]): - frame['text'] = raw_frame[raw_slice + 3:] + frame['text'] = "".join(map(chr, raw_frame[raw_slice + 3:])) frame['destination'] = AprsKiss.__identity_as_string(AprsKiss.__extract_callsign(raw_frame)) frame['source'] = AprsKiss.__identity_as_string(AprsKiss.__extract_callsign(raw_frame[7:])) - frame['path'] = AprsKiss.__extract_path(math.floor(i), raw_frame) + frame['path'] = AprsKiss.__extract_path(int(i), raw_frame) return frame logging.debug('frame=%s', frame) diff --git a/src/apex/aprs/util.py b/src/apex/aprs/util.py index 6ae3d808a909fd2539a150c4561a7fa78a7cc98e..34df341e90f8f9ad821bfc220e3c49746f1141b7 100755 --- a/src/apex/aprs/util.py +++ b/src/apex/aprs/util.py @@ -183,7 +183,7 @@ def run_doctest(): # pragma: no cover def hash_frame(frame): """ - Produces an integr value that acts as a hash for the frame + Produces an integer value that acts as a hash for the frame :param frame: A frame packet :type frame: dict :return: an integer representing the hash diff --git a/src/apex/cli.py b/src/apex/cli.py index 403490c1c4964f4d30ed1d4caa912d3947b3ceb2..31605dc8cae915a74140e092953641ce242c1d99 100644 --- a/src/apex/cli.py +++ b/src/apex/cli.py @@ -15,7 +15,7 @@ Why does this file exist, and why not put this in __main__? Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration """ -# These imports are for python3 compatability inside python2 +# These imports are for python3 compatibility inside python2 from __future__ import absolute_import from __future__ import division from __future__ import print_function @@ -179,10 +179,8 @@ def main(verbose, configfile): something_read = False try: for port_name in port_map.keys(): - click.echo('reading port: %s' % port_name) port = port_map[port_name] frame = port['tnc'].read() - click.echo('raw frame read in: %s' % frame) if frame: formatted_aprs = apex.aprs.util.format_aprs_frame(frame) print(port_name + " << " + formatted_aprs) diff --git a/src/apex/kiss/kiss.py b/src/apex/kiss/kiss.py index e7a75f4c9e9d5739ce782503340f8a7574c56a7f..007d0b81ea9ae722bb4ace01e130db2c022b2cdb 100644 --- a/src/apex/kiss/kiss.py +++ b/src/apex/kiss/kiss.py @@ -87,7 +87,7 @@ class Kiss(object): waiting_data = self.interface.inWaiting() if waiting_data: read_data += self.interface.read(waiting_data) - return read_data + return map(ord, read_data) @staticmethod def __strip_df_start(frame):