update EHS module

This commit is contained in:
junzis
2017-03-23 13:12:33 +01:00
parent a1615767b6
commit 1e82b5c59c
+12 -12
View File
@@ -315,7 +315,7 @@ def isBDS44(msg, rev=False):
return False return False
vw = wind44(msg, rev=rev) vw = wind44(msg, rev=rev)
if vw and vw[0] > 250: if vw is not None and vw[0] > 250:
result &= False result &= False
# if temp44(msg): # if temp44(msg):
@@ -481,14 +481,14 @@ def isBDS50(msg):
result &= False result &= False
gs = gs50(msg) gs = gs50(msg)
if gs and gs > 600: if gs is not None and gs > 600:
result &= False result &= False
tas = tas50(msg) tas = tas50(msg)
if tas and tas > 500: if tas is not None and tas > 500:
result &= False result &= False
if gs and tas and abs(tas50(msg) - gs50(msg)) > 200: if (gs is not None) and (tas is not None) and (abs(tas - gs) > 200):
result &= False result &= False
return result return result
@@ -626,19 +626,19 @@ def isBDS53(msg):
return False return False
ias = ias53(msg) ias = ias53(msg)
if ias and ias > 500: if ias is not None and ias > 500:
result &= False result &= False
mach = mach53(msg) mach = mach53(msg)
if mach and mach > 1: if mach is not None and mach > 1:
result &= False result &= False
tas = tas53(msg) tas = tas53(msg)
if tas and tas > 500: if tas is not None and tas > 500:
result &= False result &= False
vr = vr53(msg) vr = vr53(msg)
if vr and abs(vr) > 8000: if vr is not None and abs(vr) > 8000:
result &= False result &= False
return result return result
@@ -767,19 +767,19 @@ def isBDS60(msg):
return False return False
ias = ias60(msg) ias = ias60(msg)
if ias and ias > 500: if ias is not None and ias > 500:
result &= False result &= False
mach = mach60(msg) mach = mach60(msg)
if mach and mach > 1: if mach is not None and mach > 1:
result &= False result &= False
vrb = vr60baro(msg) vrb = vr60baro(msg)
if vrb and abs(vrb) > 5000: if vrb is not None and abs(vrb) > 5000:
result &= False result &= False
vri = vr60ins(msg) vri = vr60ins(msg)
if vri and abs(vri) > 5000: if vri is not None and abs(vri) > 5000:
result &= False result &= False
return result return result