Mercurial > public > ostc4
diff Discovery/Src/tMenuEditGasOC.c @ 682:8775d3dc6325 Betatest
Bugfix low ppO2 warning in bailout mode:
the code has different sources for divesettings (real and simulated). The ppo2 calculation code used the pointer to the real structure. As result in simulation mode an error occured caused by the ppo2 calculation which was not aware that a bailout happened (because the real structure was references instead of the simulator ones). The problem has been fixed by using the "stateUsed" pointer which is refering to the structure currenty in use.
author | Ideenmodellierer |
---|---|
date | Mon, 25 Apr 2022 21:15:01 +0200 |
parents | 1b995079c045 |
children | 01f40cb1057e |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditGasOC.c Mon Apr 25 21:10:10 2022 +0200 +++ b/Discovery/Src/tMenuEditGasOC.c Mon Apr 25 21:15:01 2022 +0200 @@ -167,9 +167,12 @@ /* select gas in divemode */ void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr) { - openEdit_DiveGasSelect_Subroutine(line, ccr); - if(!ccr) - tMEGas_check_switch_to_bailout(); + if(!ccr) + { + tMEGas_check_switch_to_bailout(); + } + openEdit_DiveGasSelect_Subroutine(line, ccr); + exitMenuEdit_to_Home_with_Menu_Update(); }