Skip to content

Commit

Permalink
pymavlink: fixed time handling in mavgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Tridgell committed Mar 24, 2014
1 parent 2bf2f4e commit 6f447f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pymavlink/tools/mavgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ def process_file(filename):
while True:
msg = mlog.recv_match(opts.condition)
if msg is None: break
tdays = (msg._timestamp - time.timezone) / (24 * 60 * 60)
tdays += 719163 # pylab wants it since 0001-01-01
tdays = matplotlib.dates.date2num(datetime.datetime.fromtimestamp(msg._timestamp))
add_data(tdays, msg, mlog.messages)

if len(filenames) == 0:
Expand Down

0 comments on commit 6f447f8

Please sign in to comment.