Mercurial > public > ostc4
diff Discovery/Src/tHome.c @ 777:6a8cf91e5b22
This is only showing if one of the compass views is visible. It should make it possible to verify that a correct heading is set as the user can see the compass readout when pushing the button. (mikeller)
author | heinrichsweikamp |
---|---|
date | Mon, 22 May 2023 09:14:27 +0200 |
parents | 46c6d2380d4e |
children | dd7ce655db26 |
line wrap: on
line diff
--- a/Discovery/Src/tHome.c Thu May 11 12:13:03 2023 +0200 +++ b/Discovery/Src/tHome.c Mon May 22 09:14:27 2023 +0200 @@ -181,6 +181,16 @@ } +static void checkSetStateCompassSim(SSettings *settings) +{ + if (settings->design == 7 && t7_isCompassShowing()) { + set_globalState(StDBEAR); + } else { + checkSetStateSim(settings); + } +} + + void tHomeDiveMenuControl(uint8_t sendAction) { SSettings *settings = settingsGetPointer(); @@ -277,7 +287,7 @@ break; } - checkSetStateSim(settings); + checkSetStateCompassSim(settings); break; case StDBAILOUT: @@ -287,11 +297,11 @@ break; } - checkSetStateSim(settings); + checkSetStateCompassSim(settings); break; case StDSETPOINT: - checkSetStateSim(settings); + checkSetStateCompassSim(settings); break; case StDSIM1: @@ -355,6 +365,12 @@ break; #endif case StDBEAR: + if (settingsGetPointer()->design == 7) { + checkSetStateSim(settings); + + break; + } + if(settingsGetPointer()->design == 5) { set_globalState(StDRAVG); @@ -500,7 +516,7 @@ set_globalState(StD); break; - case StDBEAR: // t5_gauge + case StDBEAR: // t5_gauge, t7 setCompassHeading((uint16_t)stateUsed->lifeData.compass_heading); set_globalState(StD); break;