mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
LogAnalyser: adapt to new APM:* vehicle names
This commit is contained in:
parent
46c3c26065
commit
1cdc5f7c7f
@ -501,7 +501,7 @@ class DataflashLog(object):
|
|||||||
else:
|
else:
|
||||||
self.messages[lineNumber] = e.Message
|
self.messages[lineNumber] = e.Message
|
||||||
elif e.NAME == "MODE":
|
elif e.NAME == "MODE":
|
||||||
if self.vehicleType == "ArduCopter":
|
if self.vehicleType in ["ArduCopter"]:
|
||||||
try:
|
try:
|
||||||
modes = {0:'STABILIZE',
|
modes = {0:'STABILIZE',
|
||||||
1:'ACRO',
|
1:'ACRO',
|
||||||
@ -521,7 +521,7 @@ class DataflashLog(object):
|
|||||||
self.modeChanges[lineNumber] = (modes[int(e.Mode)], e.ThrCrs)
|
self.modeChanges[lineNumber] = (modes[int(e.Mode)], e.ThrCrs)
|
||||||
except:
|
except:
|
||||||
self.modeChanges[lineNumber] = (e.Mode, e.ThrCrs)
|
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)
|
self.modeChanges[lineNumber] = (e.Mode, e.ModeNum)
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown log type for MODE line {} {}".format(self.vehicleType, repr(e)))
|
raise Exception("Unknown log type for MODE line {} {}".format(self.vehicleType, repr(e)))
|
||||||
|
Loading…
Reference in New Issue
Block a user