Round the altitude value
This commit is contained in:
parent
a4aae76fc5
commit
e31774fcd2
|
|
@ -295,8 +295,8 @@ def callback(packet):
|
||||||
if altitude:
|
if altitude:
|
||||||
if METRICUNITS is "0":
|
if METRICUNITS is "0":
|
||||||
altitude = altitude / 0.3048
|
altitude = altitude / 0.3048
|
||||||
logging.debug("altitude: %s", altitude)
|
logging.debug("altitude: %s", round(altitude, 0))
|
||||||
publish_aprstomqtt(ssid, "altitude",altitude)
|
publish_aprstomqtt(ssid, "altitude",round(altitude, 0))
|
||||||
|
|
||||||
comment = aprspacket.get('comment', None)
|
comment = aprspacket.get('comment', None)
|
||||||
if comment:
|
if comment:
|
||||||
|
|
@ -367,10 +367,6 @@ def aprs_connect():
|
||||||
aprs.consumer(callback, raw=True)
|
aprs.consumer(callback, raw=True)
|
||||||
else:
|
else:
|
||||||
aprs.consumer(callback)
|
aprs.consumer(callback)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Use the signal module to handle signals
|
# Use the signal module to handle signals
|
||||||
signal.signal(signal.SIGTERM, cleanup)
|
signal.signal(signal.SIGTERM, cleanup)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue