# HG changeset patch # User Ideenmodellierer # Date 1695573566 -7200 # Node ID 24b39a432bc22374fcd17d4b7143637ba19aa113 # Parent 40e951cfa44354bb3d9f5e9c01108d840adebe59 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. diff -r 40e951cfa443 -r 24b39a432bc2 Common/Inc/settings.h --- a/Common/Inc/settings.h Thu Sep 14 13:24:30 2023 +0200 +++ b/Common/Inc/settings.h Sun Sep 24 18:39:26 2023 +0200 @@ -176,6 +176,11 @@ SETPOINT_INDEX_AUTO_DECO, }; +typedef struct +{ + uint8_t FirstCorrection; + uint8_t Corrections; +} SSettingsStatus; /* SSettings * gas[0] and setpoint[0] are the special ones configurable during the dive @@ -381,6 +386,7 @@ uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage); uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC); +void get_CorrectionStatus(SSettingsStatus* Status); void reset_SettingWarning(); uint8_t isSettingsWarning(); diff -r 40e951cfa443 -r 24b39a432bc2 Discovery/Src/t7.c --- a/Discovery/Src/t7.c Thu Sep 14 13:24:30 2023 +0200 +++ b/Discovery/Src/t7.c Sun Sep 24 18:39:26 2023 +0200 @@ -2160,7 +2160,7 @@ const SGasLine * pGasLine; // CVIEW_Gaslist uint8_t oxygen, helium; // CVIEW_Gaslist float depth, surface, fraction_nitrogen, fraction_helium, ead, end; // CVIEW_EADTime - + SSettingsStatus SettingsStatus; SSettings* pSettings; pSettings = settingsGetPointer(); @@ -2266,15 +2266,11 @@ { if(warning_count_high_time) { + get_CorrectionStatus(&SettingsStatus); shiftWindowY0 += 20; t7cC.WindowY0 -= shiftWindowY0; textpointer = 0; - text[textpointer++] = '\001'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_CheckSettings; - text[textpointer++] = '\n'; - text[textpointer++] = '\r'; - text[textpointer++] = 0; + snprintf(text,255,"\001%c%c\n\r\001%d|%d",TXT_2BYTE,TXT2BYTE_CheckSettings,SettingsStatus.FirstCorrection,SettingsStatus.Corrections); GFX_write_string_color(&FontT42,&t7cC,text,1, CLUT_WarningRed); t7cC.WindowY0 += shiftWindowY0; }