Skip to content
Snippets Groups Projects
Commit 8eaf213e authored by David Sidrane's avatar David Sidrane
Browse files

Update uavcan_main.cpp

parent 7f7fb7c0
No related branches found
No related tags found
No related merge requests found
......@@ -766,9 +766,10 @@ int UavcanNode::run()
/* When we have a system wide notion of time update (i.e the transition from the initial
* System RTC setting to the GPS) we would call uavcan_stm32::clock::setUtc() when that
* happens, but for now we use adjustUtc with a correction of 0
* happens, but for now we use adjustUtc with a correction of the hrt so that the
* time bases are the same
*/
uavcan_stm32::clock::adjustUtc(uavcan::UtcDuration::fromUSec(0));
uavcan_stm32::clock::adjustUtc(uavcan::UtcDuration::fromUSec(hrt_absolute_time()));
_master_timer.setCallback(TimerCallback(this, &UavcanNode::handle_time_sync));
_master_timer.startPeriodic(uavcan::MonotonicDuration::fromMSec(1000));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment