Mercurial > public > ostc4
diff Discovery/Src/simulation.c @ 678:05cdd367dbd0 Betatest
Bugfix: deco planner did not initialize properly
Redoing a deco calculation in the planner, after a change in used gasses, did result
in wrong gas usage figures. And a restart after sleep made things right again. This all
feels like some initialization problem. Nothing very important as it's only a desktop
planner, but a bug it is.
Code reading, I found the not correctly initialized data.
Reported-by: Teun (forum user tdewilt2)
Signed-off-by: Jan Mulder <jan@jlmulder.nl>
author | Jan Mulder <jan@jlmulder.nl> |
---|---|
date | Thu, 21 Apr 2022 21:02:50 +0200 |
parents | 55a9aa740f13 |
children | 01f40cb1057e |
line wrap: on
line diff
--- a/Discovery/Src/simulation.c Wed Apr 20 20:25:04 2022 +0200 +++ b/Discovery/Src/simulation.c Thu Apr 21 21:02:50 2022 +0200 @@ -391,6 +391,9 @@ { uint8_t ptrGasChangeList = 0; // new hw 160704 + for (int i = 0; i < 40; i++) + gasChangeListDepthGas20x2[i] = 0; + SDiveState * pDiveState = &stateSim; copyDiveSettingsToSim(); vpm_init(&pDiveState->vpm, pDiveState->diveSettings.vpm_conservatism, 0, 0);