Skip to content

Commit

Permalink
AP_Baro: use HAL_SEMAPHORE_BLOCK_FOREVER macro
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed May 8, 2017
1 parent cb2f472 commit ccc495e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Baro/AP_Baro_UAVCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ AP_Baro_UAVCAN::~AP_Baro_UAVCAN()
// Read the sensor
void AP_Baro_UAVCAN::update(void)
{
if (_sem_baro->take(0)) {
if (_sem_baro->take(HAL_SEMAPHORE_BLOCK_FOREVER)) {
_copy_to_frontend(_instance, _pressure, _temperature);

_frontend.set_external_temperature(_temperature);
Expand All @@ -62,7 +62,7 @@ void AP_Baro_UAVCAN::update(void)

void AP_Baro_UAVCAN::handle_baro_msg(float pressure, float temperature)
{
if (_sem_baro->take(0)) {
if (_sem_baro->take(HAL_SEMAPHORE_BLOCK_FOREVER)) {
_pressure = pressure;
_temperature = temperature - 273.15f;
_last_timestamp = AP_HAL::micros64();
Expand Down

0 comments on commit ccc495e

Please sign in to comment.