summaryrefslogtreecommitdiff
path: root/firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h')
-rw-r--r--firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h b/firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h
index 9b8962a9..5142a151 100644
--- a/firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h
+++ b/firmware/os/algos/calibration/online_calibration/gyroscope/gyro_offset_over_temp_cal/gyro_offset_over_temp_cal.h
@@ -69,6 +69,12 @@ class GyroOffsetOtcCal final
bool SetInitialCalibration(
const CalibrationDataThreeAxis& input_cal_data) final;
+ // Indicates which values are modified by this calibration algorithm.
+ CalibrationTypeFlags which_calibration_flags() const final {
+ return CalibrationTypeFlags::BIAS | CalibrationTypeFlags::OVER_TEMP |
+ CalibrationTypeFlags::OTC_STILL_BIAS;
+ }
+
// Returns the calibration sensor type.
SensorType get_sensor_type() const final {
return SensorType::kGyroscopeRps;
@@ -78,12 +84,20 @@ class GyroOffsetOtcCal final
const GyroCal& get_gyro_cal() const { return gyro_cal_; }
const OverTempCal& get_over_temp_cal() const { return over_temp_cal_; }
+ // Optional function used by calibration algorithms to maintain awareness of
+ // of sensor enable states.
+ void UpdateSensorEnableState(SensorType sensor_type, uint8_t sensor_index,
+ bool is_enabled) final;
+
private:
// GyroCal algorithm data structure.
GyroCal gyro_cal_;
// Over-temperature offset compensation algorithm data structure.
OverTempCal over_temp_cal_;
+
+ // Tracks the gyro sensor enable state.
+ bool gyro_is_enabled_;
};
} // namespace online_calibration