Mercurial > public > ostc4
diff Discovery/Src/tMenuEditXtra.c @ 350:607099140a41
Merged in Ideenmodellierer/ostc4/FlightMode_Improvment (pull request #32)
FlightMode Improvment
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Sun, 06 Oct 2019 11:58:36 +0000 |
parents | 77de014928d6 |
children | 12f8745c8a94 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditXtra.c Mon Aug 19 11:42:31 2019 +0000 +++ b/Discovery/Src/tMenuEditXtra.c Sun Oct 06 11:58:36 2019 +0000 @@ -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());