comparison Common/Inc/settings.h @ 819:24b39a432bc2

Added debug information in case an error in the settings has been detected: The "Check Settings" warning now provides the index of the first parameter which has been corrected as well as the number of corrections.
author Ideenmodellierer
date Sun, 24 Sep 2023 18:39:26 +0200
parents dd7ce655db26
children b7d93ff6b3b2 fa431d42b5fb
comparison
equal deleted inserted replaced
818:40e951cfa443 819:24b39a432bc2
174 SETPOINT_INDEX_AUTO_LOW, 174 SETPOINT_INDEX_AUTO_LOW,
175 SETPOINT_INDEX_AUTO_HIGH, 175 SETPOINT_INDEX_AUTO_HIGH,
176 SETPOINT_INDEX_AUTO_DECO, 176 SETPOINT_INDEX_AUTO_DECO,
177 }; 177 };
178 178
179 typedef struct
180 {
181 uint8_t FirstCorrection;
182 uint8_t Corrections;
183 } SSettingsStatus;
179 184
180 /* SSettings 185 /* SSettings
181 * gas[0] and setpoint[0] are the special ones configurable during the dive 186 * gas[0] and setpoint[0] are the special ones configurable during the dive
182 */ 187 */
183 typedef struct 188 typedef struct
379 384
380 void settingsHelperButtonSens_keepPercentageValues(uint32_t inputValueRaw, uint8_t *outArray4Values); 385 void settingsHelperButtonSens_keepPercentageValues(uint32_t inputValueRaw, uint8_t *outArray4Values);
381 uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage); 386 uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage);
382 uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC); 387 uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC);
383 388
389 void get_CorrectionStatus(SSettingsStatus* Status);
384 void reset_SettingWarning(); 390 void reset_SettingWarning();
385 uint8_t isSettingsWarning(); 391 uint8_t isSettingsWarning();
386 392
387 bool checkAndFixSetpointSettings(void); 393 bool checkAndFixSetpointSettings(void);
388 #endif // SETTINGS_H 394 #endif // SETTINGS_H