diff Common/Inc/data_central.h @ 271:1303747b5ba2 write-from-sim

cleanup: also write gas and setpoint changes in simulator mode This is related to the previous commit. There is all kinds of logic around that distinguishes real diving mode and simulator mode. This is valid in certain cases. For example, we do not want a simulator session to act as a repetitive dive for subsequent real dives. What is simply wrong, is skipping relevant logic, like gas switches to act differently in the simulator and in a real dive. The main advantage of this commit is code simplicity. Normal users will never see the difference, as simulator dives are not logged (unless compiled in by a developer). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Sat, 27 Apr 2019 09:32:16 +0200
parents 2e58a4094770
children 54d14bc2083c
line wrap: on
line diff
--- a/Common/Inc/data_central.h	Wed Apr 24 17:10:51 2019 +0200
+++ b/Common/Inc/data_central.h	Sat Apr 27 09:32:16 2019 +0200
@@ -394,8 +394,8 @@
 extern SDiveState stateSim;
 extern SDiveState stateDeco;
 extern uint8_t decoLock;
-extern const SDiveState * stateUsed;
-
+extern const SDiveState *stateUsed;
+extern SDiveState *stateUsedWrite;
 
 enum DECO_LOCK{
 		DECO_CALC_running,