Mercurial > public > ostc4
diff Discovery/Src/tMenuEditXtra.c @ 347:77de014928d6 FlightMode_Improvment
Added option to manually leave dive mode to system menu
Added multilanguage strings and removed some outdated ones
author | ideenmodellierer |
---|---|
date | Thu, 03 Oct 2019 21:33:47 +0200 |
parents | ba229a012ac7 |
children | 12f8745c8a94 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditXtra.c Thu Oct 03 21:30:16 2019 +0200 +++ b/Discovery/Src/tMenuEditXtra.c Thu Oct 03 21:33:47 2019 +0200 @@ -33,12 +33,15 @@ #include "simulation.h" #include "timer.h" #include "tMenuEdit.h" +#include "data_exchange_main.h" + /* Private function prototypes -----------------------------------------------*/ void openEdit_CompassHeading(void); void openEdit_ResetStopwatch(void); void openEdit_SimFollowDecostops(void); void openEdit_SetManualMarker(void); +void openEdit_SetEndDive(void); /* Announced function prototypes -----------------------------------------------*/ uint8_t OnAction_CompassHeading (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); @@ -63,7 +66,14 @@ openEdit_SetManualMarker(); break; case 4: - openEdit_SimFollowDecostops(); + if(is_stateUsedSetToSim()) + { + openEdit_SimFollowDecostops(); + } + else + { + openEdit_SetEndDive(); + } break; } } @@ -81,6 +91,12 @@ exitMenuEdit_to_Home(); } +void openEdit_SetEndDive(void) +{ + dataOutGetPointer()->setEndDive = 1; + exitMenuEdit_to_Home(); +} + void openEdit_SimFollowDecostops(void) { simulation_set_heed_decostops(!simulation_get_heed_decostops());