Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send the SyncOut fire time to time_reference #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nodes/mtnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def reset_vars(self):
self.imu_msg.angular_velocity_covariance = (-1., )*9
self.imu_msg.linear_acceleration_covariance = (-1., )*9
self.pub_imu = False
self.pub_syncout_timeref = False
self.raw_gps_msg = NavSatFix()
self.pub_raw_gps = False
self.pos_gps_msg = NavSatFix()
Expand Down Expand Up @@ -406,6 +407,9 @@ def fill_from_Stat(status):
self.pos_gps_msg.status.status = NavSatStatus.STATUS_NO_FIX
self.pos_gps_msg.status.service = 0

if status & 0x400000:
self.pub_syncout_timeref = True

def fill_from_Sample(ts):
'''Catch 'Sample' MTData blocks.'''
self.h.seq = ts
Expand Down Expand Up @@ -447,6 +451,11 @@ def fill_from_Timestamp(o):
publish_time_ref(sample_time_coarse, 0, 'sample time coarse')
except KeyError:
pass

if self.pub_syncout_timeref:
secs = self.h.stamp.secs
nsecs = self.h.stamp.nsecs
publish_time_ref(secs, nsecs, "Syncout fire")
# TODO find what to do with other kind of information
pass

Expand Down