get alc only if != 0.0

This commit is contained in:
DJ2LS 2023-02-01 13:41:34 +01:00
parent 5970cdc2a8
commit 2772afc400

View file

@ -256,7 +256,10 @@ class radio:
alc = data[0].decode("utf-8")
if 'RPRT' not in alc:
try:
self.alc = float(alc)
alc = float(alc)
if alc != 0.0:
self.alc = float(alc)
except ValueError:
self.alc = str(alc)