LogAnalyzer: don't die if no arm/disarm eveents

This commit is contained in:
Peter Barker 2015-07-10 12:52:29 +10:00 committed by Andrew Tridgell
parent 1dba943a10
commit ec9be695fb
1 changed files with 2 additions and 1 deletions

View File

@ -14,10 +14,11 @@ class TestBrownout(Test):
self.result = TestResult()
self.result.status = TestResult.StatusType.GOOD
isArmed = False
# FIXME: cope with LOG_ARM_DISARM_MSG message
if "EV" in logdata.channels:
# step through the arm/disarm events in order, to see if they're symmetrical
# note: it seems landing detection isn't robust enough to rely upon here, so we'll only consider arm+disarm, not takeoff+land
isArmed = False
for line,ev in logdata.channels["EV"]["Id"].listData:
if ev == 10:
isArmed = True