mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-02 19:53:57 -04:00
LogAnalyser: fix parsing of log messages without attributes (e.g. STRT)
This commit is contained in:
parent
2deb0e08ea
commit
a146b188a7
@ -145,12 +145,12 @@ class BinaryFormat(ctypes.LittleEndianStructure):
|
||||
NAME = self.name,
|
||||
MSG = self.type,
|
||||
SIZE = self.length,
|
||||
labels = self.labels.split(","),
|
||||
labels = self.labels.split(",") if self.labels else [],
|
||||
_pack_ = True)
|
||||
|
||||
fieldtypes = [i for i in self.types]
|
||||
fieldlabels = self.labels.split(",")
|
||||
if len(fieldtypes) != len(fieldlabels):
|
||||
if self.labels and (len(fieldtypes) != len(fieldlabels)):
|
||||
print("Broken FMT message for {} .. ignoring".format(self.name), file=sys.stderr)
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user