Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditGasOC.c @ 696:cc542448fb28
Merge
author | heinrichsweikamp |
---|---|
date | Fri, 19 Aug 2022 11:30:24 +0200 |
parents | 8775d3dc6325 |
children | 01f40cb1057e |
comparison
equal
deleted
inserted
replaced
661:87bee7cc77b3 | 696:cc542448fb28 |
---|---|
90 { | 90 { |
91 if(actual_menu_content == MENU_SURFACE) | 91 if(actual_menu_content == MENU_SURFACE) |
92 { | 92 { |
93 if(line == 6) | 93 if(line == 6) |
94 { | 94 { |
95 if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1)) | 95 if(isLoopMode(settingsGetPointer()->dive_mode) || (stateUsed->diveSettings.ccrOption == 1)) |
96 { | 96 { |
97 selectPage(StMOG); | 97 selectPage(StMOG); |
98 } | 98 } |
99 } | 99 } |
100 else | 100 else |
120 { | 120 { |
121 if(actual_menu_content == MENU_SURFACE) | 121 if(actual_menu_content == MENU_SURFACE) |
122 { | 122 { |
123 if(line == 6) | 123 if(line == 6) |
124 { | 124 { |
125 if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1)) | 125 if(isLoopMode(settingsGetPointer()->dive_mode) || (stateUsed->diveSettings.ccrOption == 1)) |
126 { | 126 { |
127 selectPage(StMCG); | 127 selectPage(StMCG); |
128 } | 128 } |
129 } | 129 } |
130 else | 130 else |
165 | 165 |
166 | 166 |
167 /* select gas in divemode */ | 167 /* select gas in divemode */ |
168 void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr) | 168 void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr) |
169 { | 169 { |
170 openEdit_DiveGasSelect_Subroutine(line, ccr); | 170 if(!ccr) |
171 if(!ccr) | 171 { |
172 tMEGas_check_switch_to_bailout(); | 172 tMEGas_check_switch_to_bailout(); |
173 } | |
174 openEdit_DiveGasSelect_Subroutine(line, ccr); | |
175 | |
173 exitMenuEdit_to_Home_with_Menu_Update(); | 176 exitMenuEdit_to_Home_with_Menu_Update(); |
174 } | 177 } |
175 | 178 |
176 | 179 |
177 void openEdit_DiveGasSelect_Subroutine(uint8_t line, uint8_t ccr) | 180 void openEdit_DiveGasSelect_Subroutine(uint8_t line, uint8_t ccr) |
365 } | 368 } |
366 | 369 |
367 | 370 |
368 void tMEGas_check_switch_to_bailout(void) | 371 void tMEGas_check_switch_to_bailout(void) |
369 { | 372 { |
370 if(stateUsed->diveSettings.diveMode == DIVEMODE_CCR) | 373 if(isLoopMode(stateUsed->diveSettings.diveMode)) |
371 { | 374 { |
372 stateUsedWrite->diveSettings.diveMode = DIVEMODE_OC; | 375 stateUsedWrite->diveSettings.diveMode = DIVEMODE_OC; |
373 block_diluent_page(); | 376 block_diluent_page(); |
374 } | 377 } |
375 } | 378 } |