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
+18 -4
View File
@@ -1,6 +1,6 @@
//=======================================================================
// Copyright (c) 2016, Mark Charlebois. All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -13,7 +13,7 @@
// * Neither the name of The Linux Foundation nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -30,12 +30,26 @@
#include "AEEStdDef.idl"
interface px4muorb{
/**
* interface method to start the uorb service and initialize the muorb
*/
AEEResult orb_initialize();
/**
* Interface to set an offset to hrt_absolute_time on the DSP.
*
* @param time_diff_us: time difference of the DSP clock to Linux clock.
* A positive number means the Linux clock is ahead of the DSP one.
*/
AEEResult set_absolute_time_offset( in long time_diff_us );
/**
* Interface to request hrt_absolute_time on the DSP.
* @param time_us: pointer to time in us
*/
AEEResult get_absolute_time(rout unsigned long long time_us);
/**
* Interface to add a subscriber to the identified topic
* @param topic_name
@@ -130,6 +144,6 @@ interface px4muorb{
* @return status
* 0 = success
* all others is a failure.
**/
**/
AEEResult receive_bulk_data( rout sequence<octet> data, rout long bytes_returned, rout long topic_count );
};