changeset 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 1953cd9145b3
children 52df13712fa3
files Discovery/Src/simulation.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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);