Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
267:cf6ad20380fb | 273:5fe136480a47 |
---|---|
506 if(DoDisplayRefresh) | 506 if(DoDisplayRefresh) |
507 { | 507 { |
508 DoDisplayRefresh = 0; | 508 DoDisplayRefresh = 0; |
509 RefreshDisplay(); | 509 RefreshDisplay(); |
510 | 510 |
511 // Enable this to make the simulator write a logbook entry | |
512 // #define SIM_WRITES_LOGBOOK 1 | |
513 | |
514 #ifdef SIM_WRITES_LOGBOOK | |
515 if(stateUsed == stateSimGetPointer()) | |
516 logbook_InitAndWrite(stateUsed); | |
517 #endif | |
511 if(stateUsed == stateRealGetPointer()) /* Handle log entries while in dive mode*/ | 518 if(stateUsed == stateRealGetPointer()) /* Handle log entries while in dive mode*/ |
512 logbook_InitAndWrite(); | 519 logbook_InitAndWrite(stateUsed); |
513 } | 520 } |
514 | 521 |
515 #ifdef DEBUG_RUNTIME | 522 #ifdef DEBUG_RUNTIME |
516 translateTime(stateUsed->lifeData.timeBinaryFormat, &Stime); | 523 translateTime(stateUsed->lifeData.timeBinaryFormat, &Stime); |
517 if(lastsecond == 0xFF) | 524 if(lastsecond == 0xFF) |