From 66f2a95580ae521e2cc44718604ee9ebe60f8aff Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 8 Apr 2021 19:43:25 -0500 Subject: [PATCH] Fixed process by which the comment is assembled to be functionally identical, but more sensible. --- ir-aprsisd | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ir-aprsisd b/ir-aprsisd index d272cee..dc97931 100755 --- a/ir-aprsisd +++ b/ir-aprsisd @@ -309,10 +309,6 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c if device: gateInfo = gateInfo + device - #In the format we're using, APRS comments can be 36 characters - # ... but APRS-IS doesn't seem to care, so leave this off. - #comment = comment[:36] - aprsPacket = ''.join([getSSID(DevID),ARPreamble, ':@', time.strftime("%d%H%Mz",tstamp), pos]) #Check to make sure the update is new: @@ -327,9 +323,18 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c #Same with altitude: if alt: #We need six digits of altitude. - aprsPacket = aprsPacket + "/A=" + str(round(alt)).zfill(6)[0:6] - # Regardless: - aprsPacket = aprsPacket + comment + gateInfo + comment = "/A=" + str(round(alt)).zfill(6)[0:6] + comment + + #Regardless: + comment = comment + gateInfo + + #We have the whole comment in one place now. + #In the format we're using, APRS comments can be 36 characters + # ... but APRS-IS doesn't seem to care, so leave this off. + #comment = comment[:36] + + aprsPacket = aprsPacket + comment + try: aprslib.parse(aprsPacket) # For syntax AIS.sendall(aprsPacket)