diff --git a/libraries/AP_ADC/AP_ADC_ADS1115.cpp b/libraries/AP_ADC/AP_ADC_ADS1115.cpp index 6cbf60f6f5..9ae8832fe6 100644 --- a/libraries/AP_ADC/AP_ADC_ADS1115.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS1115.cpp @@ -223,6 +223,7 @@ void AP_ADC_ADS1115::_update() return; } + _dev->get_semaphore()->give(); float sample = _convert_register_data_to_mv(be16toh(val)); @@ -233,7 +234,5 @@ void AP_ADC_ADS1115::_update() _channel_to_read = (_channel_to_read + 1) % _channels_number; _start_conversion(_channel_to_read); - _dev->get_semaphore()->give(); - _last_update_timestamp = AP_HAL::micros(); }