Fixed problem where course/speed may not have been added in every case where it was available.

This commit is contained in:
Chris Smith 2021-04-10 01:11:28 -05:00
parent 66f2a95580
commit 299cea7aff

View file

@ -318,7 +318,7 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c
#In theory a course/speed of 000/000 sholdn't be much different
# from not reporting one, but also in theory, more space is
# available for a comment if we don't add the data extension.
if speed and course:
if (speed != None) and (course != None):
aprsPacket = ''.join([aprsPacket,str(round(course)).zfill(3), '/', str(min(round(speed),999)).zfill(3)])
#Same with altitude:
if alt: