Mercurial > public > ostc4
diff Discovery/Src/base.c @ 273:5fe136480a47
Merged in janlmulder/ostc4/write-from-sim (pull request #20)
Cleanup and debug capabilty to write logbook from simulator
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Sun, 28 Apr 2019 07:05:23 +0000 |
parents | 74a8296a2318 |
children | 5ca177d2df5d fc5e9fdcb156 |
line wrap: on
line diff
--- a/Discovery/Src/base.c Fri Apr 26 10:36:11 2019 +0000 +++ b/Discovery/Src/base.c Sun Apr 28 07:05:23 2019 +0000 @@ -508,8 +508,15 @@ DoDisplayRefresh = 0; RefreshDisplay(); +// Enable this to make the simulator write a logbook entry +// #define SIM_WRITES_LOGBOOK 1 + +#ifdef SIM_WRITES_LOGBOOK + if(stateUsed == stateSimGetPointer()) + logbook_InitAndWrite(stateUsed); +#endif if(stateUsed == stateRealGetPointer()) /* Handle log entries while in dive mode*/ - logbook_InitAndWrite(); + logbook_InitAndWrite(stateUsed); } #ifdef DEBUG_RUNTIME