mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 02:43:33 +08:00
muorb: abs time on aDSP in sync with Linux side
This adds a call on startup of the muorb on the aDSP side to use an offset for hrt_absolute_call(). This means that the hrt_absolute_call() on the appsproc (Linux) side should now match the one on the aDSP (QURT) side. The accuracy still needs to be determined.
This commit is contained in:
@@ -109,6 +109,15 @@ __EXPORT extern hrt_abstime hrt_elapsed_time(const volatile hrt_abstime *then);
|
||||
*/
|
||||
__EXPORT extern hrt_abstime hrt_store_absolute_time(volatile hrt_abstime *now);
|
||||
|
||||
#ifdef __PX4_QURT
|
||||
/**
|
||||
* Set a time offset to hrt_absolute_time on the DSP.
|
||||
* @param time_diff_us: time difference of the DSP clock to Linux clock.
|
||||
* This param is positive because the Linux clock is ahead of the DSP one.
|
||||
*/
|
||||
__EXPORT extern int hrt_set_absolute_time_offset(int32_t time_diff_us);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Call callout(arg) after delay has elapsed.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user