comparison Discovery/Src/tMenuEditXtra.c @ 769:6b248bcdbf28

Deactivation of the 'fallback' option when the CCR mode is set to 'Fixed' - this makes it a little clearer that the option has no influence in this mode.
author heinrichsweikamp
date Fri, 21 Apr 2023 09:47:06 +0200
parents b6d8a6fbf4fd
children 6169309d6eb9
comparison
equal deleted inserted replaced
768:dfdfea8897f3 769:6b248bcdbf28
77 77
78 void openEdit_Xtra(uint8_t line) 78 void openEdit_Xtra(uint8_t line)
79 { 79 {
80 set_globalState_Menu_Line(line); 80 set_globalState_Menu_Line(line);
81 81
82
83 /* DIVE MODE */ 82 /* DIVE MODE */
84 if(actual_menu_content != MENU_SURFACE) 83 if(actual_menu_content != MENU_SURFACE)
85 { 84 {
86 resetMenuEdit(CLUT_MenuPageXtra); 85 resetMenuEdit(CLUT_MenuPageXtra);
87 86
112 break; 111 break;
113 } 112 }
114 } 113 }
115 else /* surface mode */ 114 else /* surface mode */
116 { 115 {
117 if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3)) /* PSCR items are only optional */ 116 if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3)) /* PSCR items are only optional */
118 { 117 {
119 line = 6; 118 line = 6;
120 } 119 }
121 120
122 switch(line) 121 switch(line)
190 { 189 {
191 /* does not work like this resetEnterPressedToStateBeforeButtonAction(); */ 190 /* does not work like this resetEnterPressedToStateBeforeButtonAction(); */
192 191
193 SSettings *pSettings = settingsGetPointer(); 192 SSettings *pSettings = settingsGetPointer();
194 193
195 if(pSettings->fallbackToFixedSetpoint == 0) 194 if (pSettings->CCR_Mode == CCRMODE_Sensors) {
196 { 195 pSettings->fallbackToFixedSetpoint = (pSettings->fallbackToFixedSetpoint + 1) % 2;
197 pSettings->fallbackToFixedSetpoint = 1; 196 }
198 } 197
199 else
200 {
201 pSettings->fallbackToFixedSetpoint = 0;
202 }
203 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); 198 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only();
204 } 199 }
205 200
206 201
207 static void printScrubberResetText(char *text, SSettings *settings) 202 static void printScrubberResetText(char *text, SSettings *settings)