From ea03ea320c1f9265d15ae6fe1eb4e9de690ae68c Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 5 Jul 2022 04:08:56 +0100 Subject: [PATCH] AP_InertialSensor: params always use set method --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 2 +- libraries/AP_InertialSensor/BatchSampler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 95f79295bf..8de1d764ef 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -1573,7 +1573,7 @@ AP_InertialSensor::_init_gyro() _gyro_cal_ok[k] = true; _gyro_offset[k] = new_gyro_offset[k]; #if HAL_INS_TEMPERATURE_CAL_ENABLE - caltemp_gyro[k] = 0.5 * (get_temperature(k) + start_temperature[k]); + caltemp_gyro[k].set(0.5 * (get_temperature(k) + start_temperature[k])); #endif } } diff --git a/libraries/AP_InertialSensor/BatchSampler.cpp b/libraries/AP_InertialSensor/BatchSampler.cpp index cd35ff42cf..a7914d5a00 100644 --- a/libraries/AP_InertialSensor/BatchSampler.cpp +++ b/libraries/AP_InertialSensor/BatchSampler.cpp @@ -56,7 +56,7 @@ void AP_InertialSensor::BatchSampler::init() return; } - _required_count -= _required_count % 32; // round down to nearest multiple of 32 + _required_count.set(_required_count - (_required_count % 32)); // round down to nearest multiple of 32 const uint32_t total_allocation = 3*_required_count*sizeof(uint16_t); GCS_SEND_TEXT(MAV_SEVERITY_DEBUG, "INS: alloc %u bytes for ISB (free=%u)", (unsigned int)total_allocation, (unsigned int)hal.util->available_memory());