minor update

This commit is contained in:
junzis
2017-07-21 16:02:40 +02:00
parent 0e29a4d18a
commit 27daf52850
2 changed files with 3 additions and 3 deletions

View File

@@ -678,9 +678,9 @@ def altitude_diff(msg):
msgbin = util.hex2bin(msg)
sign = -1 if int(msgbin[80]) else 1
value = util.bin2int(msgbin[81:88]) * 25
value = util.bin2int(msgbin[81:88])
if value == 0 or value == 127:
return None
else:
return sign * value
return sign * (value - 1) * 25 # in ft.