Mercurial > public > ostc4
diff Discovery/Src/tMenuEditGasOC.c @ 647:15f6f0b5786c
Integrated selection of bailout in the diluent selection page:
To be able to introduce a new menu page for future development, the selection of bailout cases is now combined with the selection of the diluent at one page. To enable this the concept of a "shadow page" has been introduced. With that the original functionality may be reused without need to a a standalone page. The bailout /diluen page is now switched (surface mode) using the last menu line of the gas selection page
author | Ideenmodellierer |
---|---|
date | Tue, 13 Apr 2021 19:25:41 +0200 |
parents | a9c195be907e |
children | 1b995079c045 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditGasOC.c Tue Apr 13 19:21:14 2021 +0200 +++ b/Discovery/Src/tMenuEditGasOC.c Tue Apr 13 19:25:41 2021 +0200 @@ -89,24 +89,58 @@ void openEdit_GasCC(uint8_t line) { if(actual_menu_content == MENU_SURFACE) - openEdit_Gas(line , 1); + { + if(line == 6) + { + if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1)) + { + selectPage(StMOG); + } + } + else + { + openEdit_Gas(line , 1); + } + } else - if(line == 6) - openEdit_SpecialDiveGasMenu(1); - else - openEdit_DiveGasSelect(line, 1); + { + if(line == 6) + { + openEdit_SpecialDiveGasMenu(1); + } + else + { + openEdit_DiveGasSelect(line, 1); + } + } } void openEdit_GasOC(uint8_t line) { if(actual_menu_content == MENU_SURFACE) - openEdit_Gas(line, 0); + { + if(line == 6) + { + if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1)) + { + selectPage(StMCG); + } + } + else + { + openEdit_Gas(line, 0); + } + } else if(line == 6) + { openEdit_SpecialDiveGasMenu(0); + } else + { openEdit_DiveGasSelect(line, 0); + } }