mirror of
https://github.com/kemenril/iR-APRSISD.git
synced 2024-11-09 23:24:07 -08:00
Fixed process by which the comment is assembled to be functionally identical, but more sensible.
This commit is contained in:
parent
7d0531eb26
commit
66f2a95580
17
ir-aprsisd
17
ir-aprsisd
|
@ -309,10 +309,6 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c
|
||||||
if device:
|
if device:
|
||||||
gateInfo = gateInfo + 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])
|
aprsPacket = ''.join([getSSID(DevID),ARPreamble, ':@', time.strftime("%d%H%Mz",tstamp), pos])
|
||||||
|
|
||||||
#Check to make sure the update is new:
|
#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:
|
#Same with altitude:
|
||||||
if alt:
|
if alt:
|
||||||
#We need six digits of altitude.
|
#We need six digits of altitude.
|
||||||
aprsPacket = aprsPacket + "/A=" + str(round(alt)).zfill(6)[0:6]
|
comment = "/A=" + str(round(alt)).zfill(6)[0:6] + comment
|
||||||
|
|
||||||
#Regardless:
|
#Regardless:
|
||||||
aprsPacket = aprsPacket + comment + gateInfo
|
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:
|
try:
|
||||||
aprslib.parse(aprsPacket) # For syntax
|
aprslib.parse(aprsPacket) # For syntax
|
||||||
AIS.sendall(aprsPacket)
|
AIS.sendall(aprsPacket)
|
||||||
|
|
Loading…
Reference in a new issue