Skip to content
Snippets Groups Projects
Commit 3bb479f7 authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

ulog mavlink: use the px4_sem calls (needed for OSX)

parent 7c40c8df
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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