mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
Tools: LogAnalyzer: correct CTUN test
This commit is contained in:
parent
f1641161d7
commit
214bca8b30
@ -388,7 +388,13 @@ class DataflashLogHelper:
|
||||
if logdata.vehicleType == VehicleType.Copter:
|
||||
throttleThreshold = 200 # copter uses 0-1000, plane+rover use 0-100
|
||||
if "CTUN" in logdata.channels:
|
||||
maxThrottle = logdata.channels["CTUN"]["ThrOut"].max()
|
||||
try:
|
||||
maxThrottle = logdata.channels["CTUN"]["ThrOut"].max()
|
||||
except KeyError as e:
|
||||
# ThrOut was shorted to ThO at some stage...
|
||||
maxThrottle = logdata.channels["CTUN"]["ThO"].max()
|
||||
# at roughly the same time ThO became a range from 0 to 1
|
||||
throttleThreshold = 0.2
|
||||
if maxThrottle < throttleThreshold:
|
||||
return "Throttle never above 20%"
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user