diff options
Diffstat (limited to 'firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h')
-rw-r--r-- | firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h b/firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h index 8c95f9ba..710c442c 100644 --- a/firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h +++ b/firmware/os/algos/calibration/online_calibration/common_data/online_calibration.h @@ -26,6 +26,14 @@ namespace online_calibration { +// Device physical state change types. +enum class PhysicalStateType : uint8_t { + kUnknownPhysicalState = 0, + kFoldableOpen, + kFoldableClosed, + kNumPhysicalStateTypes, +}; + /* * This abstract base class provides a set of general interface functions for * calibration algorithms. The data structures used are intended to be lean and @@ -130,6 +138,13 @@ class OnlineCalibration { // Returns the sensor-type this calibration algorithm provides updates for. virtual SensorType get_sensor_type() const = 0; + // Tells the calibrator that the device's physical state has changed. This is + // useful, for example, if there is a need for the calibration algorithm to be + // aware of and take some sort of internal action in response to a physical + // state change (e.g., for foldable devices, MagCal may adjust internal states + // to implement specific transition behavior between open/closed states). + virtual void UpdatePhysicalState(PhysicalStateType physical_state) {} + protected: // Helper function that activates the registered callback. void OnNotifyCalibrationUpdate(CalibrationTypeFlags cal_update_flags) const { |