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

Add support for time synchronisation with FCU #159

Merged
merged 13 commits into from
Oct 7, 2014
Merged

Add support for time synchronisation with FCU #159

merged 13 commits into from
Oct 7, 2014

Conversation

mhkabir
Copy link
Member

@mhkabir mhkabir commented Oct 6, 2014

This PR adds timesync support. I've finished FCU implementation, but needs testing and hotfix if needed.
@vooon Please go through this, and let me know.

To use the offset anywhere else, simply subscribe to the mavros/time_offset topic and add this offset to time_boot_ms of incoming mavlink messages.

Kabir

public:
SystemTimePlugin():
uas(nullptr)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't put init code to constructor, must be in initialize(). How it might build?..

@vooon
Copy link
Member

vooon commented Oct 6, 2014

You forget add it to mavros/CMakeLists.txt (look list of plugin sources) and to mavros_plugins.xml.

@vooon
Copy link
Member

vooon commented Oct 6, 2014

Add:

#include <sensor_msgs/TimeReference.h>

@mhkabir
Copy link
Member Author

mhkabir commented Oct 6, 2014

@vooon Cannot fix last problem. Great if you could look into it. Leave me a comment, I'll follow up tomorrow.

@vooon
Copy link
Member

vooon commented Oct 6, 2014

At line 132: you trying to divide message smart pointer (that don't implement operator/).

@vooon
Copy link
Member

vooon commented Oct 6, 2014

Also i think that ros::Duration is preffered type for offset value (and for message, because time_offset can not be used as TimeReference).

Unknown author and others added 2 commits October 7, 2014 08:29
@mhkabir
Copy link
Member Author

mhkabir commented Oct 7, 2014

All done and implemented

vooon added a commit that referenced this pull request Oct 7, 2014
Add support for time synchronisation with FCU.
@vooon vooon merged commit 5b53c17 into mavlink:master Oct 7, 2014
@vooon
Copy link
Member

vooon commented Oct 7, 2014

Looks good. Merged.

@mhkabir
Copy link
Member Author

mhkabir commented Oct 7, 2014

@vooon Thanks. APM compatibility should be OK, but please check if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants