Skip to content

Commit

Permalink
AP_InertialSensor: correct compilation when logging disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 1, 2024
1 parent 07007f9 commit 29fae25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_InertialSensor/BatchSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ void AP_InertialSensor::BatchSampler::periodic()
if (_sensor_mask == 0) {
return;
}
#if HAL_LOGGING_ENABLED
push_data_to_log();
#endif
}

void AP_InertialSensor::BatchSampler::update_doing_sensor_rate_logging()
Expand Down Expand Up @@ -175,6 +177,7 @@ void AP_InertialSensor::BatchSampler::rotate_to_next_sensor()
update_doing_sensor_rate_logging();
}

#if HAL_LOGGING_ENABLED
void AP_InertialSensor::BatchSampler::push_data_to_log()
{
if (!initialised) {
Expand Down Expand Up @@ -266,6 +269,7 @@ bool AP_InertialSensor::BatchSampler::should_log(uint8_t _instance, IMU_SENSOR_T
}
return true;
}
#endif // HAL_LOGGING_ENABLED

void AP_InertialSensor::BatchSampler::sample(uint8_t _instance, AP_InertialSensor::IMU_SENSOR_TYPE _type, uint64_t sample_us, const Vector3f &_sample)
{
Expand Down

0 comments on commit 29fae25

Please sign in to comment.