Mercurial > public > ostc4
diff Discovery/Src/t3.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 | ec16fd26e280 |
children | 427ae9f8e28e |
line wrap: on
line diff
--- a/Discovery/Src/t3.c Sat Apr 27 09:32:16 2019 +0200 +++ b/Discovery/Src/t3.c Sat Apr 27 12:27:46 2019 +0200 @@ -487,14 +487,7 @@ if((t3_selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0)) t3_change_customview(); - SDiveState * pDiveState; - - if(stateUsed == stateRealGetPointer()) - pDiveState = stateRealGetPointerWrite(); - else - pDiveState = stateSimGetPointerWrite(); - - t3_basics_refresh_customview(depth, t3_selection_customview, &t3screen, &t3c1, &t3c2, pDiveState->diveSettings.diveMode); + t3_basics_refresh_customview(depth, t3_selection_customview, &t3screen, &t3c1, &t3c2, stateUsedWrite->diveSettings.diveMode); }