Mercurial > public > ostc4
diff Discovery/Src/base.c @ 272:74a8296a2318 write-from-sim
cleanup: simplify stateUsed usage
Get rid of some local stateUsed pointers used to differentiate between
normal dive and simulator mode. Simply use the (properly set) global
data for this. Its rather useless to do this test on countless locations.
Trivial cleanup.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Sat, 27 Apr 2019 12:27:46 +0200 |
parents | 2e58a4094770 |
children | 5ca177d2df5d fc5e9fdcb156 |
line wrap: on
line diff
--- a/Discovery/Src/base.c Sat Apr 27 09:32:16 2019 +0200 +++ b/Discovery/Src/base.c Sat Apr 27 12:27:46 2019 +0200 @@ -511,13 +511,10 @@ // Enable this to make the simulator write a logbook entry // #define SIM_WRITES_LOGBOOK 1 +#ifdef SIM_WRITES_LOGBOOK if(stateUsed == stateSimGetPointer()) - { -#ifdef SIM_WRITES_LOGBOOK logbook_InitAndWrite(stateUsed); #endif - } - if(stateUsed == stateRealGetPointer()) /* Handle log entries while in dive mode*/ logbook_InitAndWrite(stateUsed); }