Skip to content

Commit

Permalink
fixed mavsplit_sysid
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 16, 2023
1 parent fe9886f commit be740ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/mavsplit_sysid.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ def process(filename):
if args.condition and not mavutil.evaluate_condition(args.condition, mlog.messages):
continue

if m.get_type() == 'BAD_DATA':
continue

sysid = m.get_srcSystem()
if not sysid in output:
fname = "%s-%u.%s" % (base, sysid, extension)
print("Creating %s" % fname)
output[sysid] = open(fname, mode='wb')

if output[sysid] and m.get_type() != 'BAD_DATA':
if output[sysid]:
timestamp = getattr(m, '_timestamp', None)
output[sysid].write(struct.pack('>Q', int(timestamp*1.0e6)))
output[sysid].write(m.get_msgbuf())
Expand Down

0 comments on commit be740ad

Please sign in to comment.