LogAnalyser: adapt to new APM:* vehicle names

This commit is contained in:
Holger Steinhaus 2015-05-05 20:16:07 +02:00 committed by Randy Mackay
parent 46c3c26065
commit 1cdc5f7c7f
1 changed files with 2 additions and 2 deletions

View File

@ -501,7 +501,7 @@ class DataflashLog(object):
else:
self.messages[lineNumber] = e.Message
elif e.NAME == "MODE":
if self.vehicleType == "ArduCopter":
if self.vehicleType in ["ArduCopter"]:
try:
modes = {0:'STABILIZE',
1:'ACRO',
@ -521,7 +521,7 @@ class DataflashLog(object):
self.modeChanges[lineNumber] = (modes[int(e.Mode)], e.ThrCrs)
except:
self.modeChanges[lineNumber] = (e.Mode, e.ThrCrs)
elif self.vehicleType == "ArduPlane" or self.vehicleType == "ArduRover":
elif self.vehicleType in ["ArduPlane", "APM:Plane", "ArduRover", "APM:Rover", "APM:Copter"]:
self.modeChanges[lineNumber] = (e.Mode, e.ModeNum)
else:
raise Exception("Unknown log type for MODE line {} {}".format(self.vehicleType, repr(e)))