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:
Julian Oes
2016-04-08 15:51:16 +02:00
parent ae2c28677d
commit 2bce8f2803
6 changed files with 164 additions and 6 deletions
+9
View File
@@ -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.
*