mirror of
https://github.com/kemenril/iR-APRSISD.git
synced 2024-11-12 16:44:11 -08:00
Some changes to the way missed APRS packets are handled.
This commit is contained in:
parent
4748d06de7
commit
7d0531eb26
|
@ -333,15 +333,16 @@ def sendAPRS(device, DevID, ARPreamble, tstamp, lat, long, alt, course, speed, c
|
||||||
try:
|
try:
|
||||||
aprslib.parse(aprsPacket) # For syntax
|
aprslib.parse(aprsPacket) # For syntax
|
||||||
AIS.sendall(aprsPacket)
|
AIS.sendall(aprsPacket)
|
||||||
|
#If the above doesn't raise an exception, we should assume we've sent the packet.
|
||||||
|
lastUpdate[DevID] = calendar.timegm(tstamp)
|
||||||
|
transmitted[DevID] += 1
|
||||||
|
print("Sent: " + aprsPacket)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Could not send APRS packet: ")
|
print("Could not send APRS packet: ")
|
||||||
print(aprsPacket)
|
print(aprsPacket)
|
||||||
print("Attempting reconnect just in case.")
|
print("Attempting reconnect just in case.")
|
||||||
reconnect()
|
reconnect()
|
||||||
pass
|
return None
|
||||||
#Last update in UTC
|
|
||||||
lastUpdate[DevID] = calendar.timegm(tstamp)
|
|
||||||
transmitted[DevID] += 1
|
|
||||||
|
|
||||||
def stats():
|
def stats():
|
||||||
global transmitted, lastStats
|
global transmitted, lastStats
|
||||||
|
|
Loading…
Reference in a new issue