Tools: LogAnalyzer: fix whitespace

This commit is contained in:
Peter Barker 2017-07-22 10:28:07 +10:00
parent a6fd812051
commit ebc8dc4afc
3 changed files with 14 additions and 14 deletions

View File

@ -14,8 +14,8 @@ class TestBrownout(Test):
self.result = TestResult() self.result = TestResult()
self.result.status = TestResult.StatusType.GOOD self.result.status = TestResult.StatusType.GOOD
isArmed = False isArmed = False
# FIXME: cope with LOG_ARM_DISARM_MSG message # FIXME: cope with LOG_ARM_DISARM_MSG message
if "EV" in logdata.channels: if "EV" in logdata.channels:
# step through the arm/disarm events in order, to see if they're symmetrical # 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 # note: it seems landing detection isn't robust enough to rely upon here, so we'll only consider arm+disarm, not takeoff+land

View File

@ -21,30 +21,30 @@ class TestEvents(Test):
for i in range(len(logdata.channels["ERR"]["Subsys"].listData)): for i in range(len(logdata.channels["ERR"]["Subsys"].listData)):
subSys = logdata.channels["ERR"]["Subsys"].listData[i][1] subSys = logdata.channels["ERR"]["Subsys"].listData[i][1]
eCode = logdata.channels["ERR"]["ECode"].listData[i][1] eCode = logdata.channels["ERR"]["ECode"].listData[i][1]
if subSys == 2 and (eCode == 1): if subSys == 2 and (eCode == 1):
errors.add("PPM") errors.add("PPM")
elif subSys == 3 and (eCode == 1 or eCode == 2): elif subSys == 3 and (eCode == 1 or eCode == 2):
errors.add("COMPASS") errors.add("COMPASS")
elif subSys == 5 and (eCode == 1): elif subSys == 5 and (eCode == 1):
errors.add("FS_THR") errors.add("FS_THR")
elif subSys == 6 and (eCode == 1): elif subSys == 6 and (eCode == 1):
errors.add("FS_BATT") errors.add("FS_BATT")
elif subSys == 7 and (eCode == 1): elif subSys == 7 and (eCode == 1):
errors.add("GPS") errors.add("GPS")
elif subSys == 8 and (eCode == 1): elif subSys == 8 and (eCode == 1):
errors.add("GCS") errors.add("GCS")
elif subSys == 9 and (eCode == 1 or eCode == 2): elif subSys == 9 and (eCode == 1 or eCode == 2):
errors.add("FENCE") errors.add("FENCE")
elif subSys == 10: elif subSys == 10:
errors.add("FLT_MODE") errors.add("FLT_MODE")
elif subSys == 11 and (eCode == 2): elif subSys == 11 and (eCode == 2):
errors.add("GPS_GLITCH") errors.add("GPS_GLITCH")
elif subSys == 12 and (eCode == 1): elif subSys == 12 and (eCode == 1):
errors.add("CRASH") errors.add("CRASH")
if errors: if errors:
if len(errors) == 1 and "FENCE" in errors: if len(errors) == 1 and "FENCE" in errors:
self.result.status = TestResult.StatusType.WARN self.result.status = TestResult.StatusType.WARN
else: else:
self.result.status = TestResult.StatusType.FAIL self.result.status = TestResult.StatusType.FAIL
if len(errors) == 1: if len(errors) == 1:

View File

@ -25,9 +25,9 @@ class TestGPSGlitch(Test):
for i in range(len(logdata.channels["ERR"]["Subsys"].listData)): for i in range(len(logdata.channels["ERR"]["Subsys"].listData)):
subSys = logdata.channels["ERR"]["Subsys"].listData[i][1] subSys = logdata.channels["ERR"]["Subsys"].listData[i][1]
eCode = logdata.channels["ERR"]["ECode"].listData[i][1] eCode = logdata.channels["ERR"]["ECode"].listData[i][1]
if subSys == 11 and (eCode == 2): if subSys == 11 and (eCode == 2):
gpsGlitchCount += 1 gpsGlitchCount += 1
if gpsGlitchCount: if gpsGlitchCount:
self.result.status = TestResult.StatusType.FAIL self.result.status = TestResult.StatusType.FAIL
self.result.statusMessage = "GPS glitch errors found (%d)" % gpsGlitchCount self.result.statusMessage = "GPS glitch errors found (%d)" % gpsGlitchCount