mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ulog mavlink: use the px4_sem calls (needed for OSX)
This commit is contained in:
parent
7c40c8dfd9
commit
3bb479f72e
@ -45,7 +45,7 @@
|
||||
|
||||
bool MavlinkULog::_init = false;
|
||||
MavlinkULog *MavlinkULog::_instance = nullptr;
|
||||
sem_t MavlinkULog::_lock;
|
||||
px4_sem_t MavlinkULog::_lock;
|
||||
const float MavlinkULog::_rate_calculation_delta_t = 0.1f;
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ void MavlinkULog::initialize()
|
||||
if (_init) {
|
||||
return;
|
||||
}
|
||||
sem_init(&_lock, 1, 1);
|
||||
px4_sem_init(&_lock, 1, 1);
|
||||
_init = true;
|
||||
}
|
||||
|
||||
|
||||
@ -105,17 +105,17 @@ private:
|
||||
|
||||
static void lock()
|
||||
{
|
||||
do {} while (sem_wait(&_lock) != 0);
|
||||
do {} while (px4_sem_wait(&_lock) != 0);
|
||||
}
|
||||
|
||||
static void unlock()
|
||||
{
|
||||
sem_post(&_lock);
|
||||
px4_sem_post(&_lock);
|
||||
}
|
||||
|
||||
void publish_ack(uint16_t sequence);
|
||||
|
||||
static sem_t _lock;
|
||||
static px4_sem_t _lock;
|
||||
static bool _init;
|
||||
static MavlinkULog *_instance;
|
||||
static const float _rate_calculation_delta_t; ///< rate update interval
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user