| 203 | } |
| 204 | |
| 205 | bool GyroTemperatureCalibrator::loadConfig(float newSensitivity) { |
| 206 | bool ok = configuration.loadTemperatureCalibration(sensorId, config); |
| 207 | if (ok) { |
| 208 | config.rescaleSamples(newSensitivity); |
| 209 | if (config.fullyCalibrated()) { |
| 210 | configSaved = true; |
| 211 | } |
| 212 | } else { |
| 213 | m_Logger.warn( |
| 214 | "No temperature calibration data found for sensor %d, ignoring...", |
| 215 | sensorId |
| 216 | ); |
| 217 | // m_Logger.info("Temperature calibration is advised"); |
| 218 | m_Logger.info( |
| 219 | "Temperature calibration is a work-in-progress feature; any changes to its " |
| 220 | "parameters or updates will render the saved temperature curve invalid and " |
| 221 | "unloadable." |
| 222 | ); |
| 223 | } |
| 224 | return configSaved; |
| 225 | } |
| 226 | |
| 227 | bool GyroTemperatureCalibrator::saveConfig() { |
| 228 | if (configuration.saveTemperatureCalibration(sensorId, config)) { |
nothing calls this directly
no test coverage detected