Mercurial > public > ostc4
changeset 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 | 73325a78c907 |
children | 84f5c18b74ea |
files | Discovery/Inc/text_multilanguage.h Discovery/Src/tMenuEditXtra.c Discovery/Src/tMenuXtra.c Discovery/Src/text_multilanguage.c |
diffstat | 4 files changed, 38 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Inc/text_multilanguage.h Thu Oct 03 21:30:16 2019 +0200 +++ b/Discovery/Inc/text_multilanguage.h Thu Oct 03 21:33:47 2019 +0200 @@ -166,6 +166,7 @@ TXT2BYTE_ResetStopwatch, TXT2BYTE_SetMarker, TXT2BYTE_CompassHeading, + TXT2BYTE_EndDiveMode, /* */ TXT2BYTE_Simulator, TXT2BYTE_StartSimulator, @@ -237,8 +238,6 @@ TXT2BYTE_AmbientTemperature, /* */ TXT2BYTE_Bottle, - TXT2BYTE_WirelessSender, - TXT2BYTE_WirelessDisconnect, /* */ TXT2BYTE_Gaslist, TXT2BYTE_Clock,
--- 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());
--- a/Discovery/Src/tMenuXtra.c Thu Oct 03 21:30:16 2019 +0200 +++ b/Discovery/Src/tMenuXtra.c Thu Oct 03 21:33:47 2019 +0200 @@ -94,6 +94,16 @@ strcpy(&text[textPointer],"\n\r"); textPointer += 2; } + else + { + if((line == 0) || (line == 4)) /* end dive mode only used during real dives */ + { + text[textPointer++] = TXT_2BYTE; + text[textPointer++] = TXT2BYTE_EndDiveMode; + } + strcpy(&text[textPointer],"\n\r"); + textPointer += 2; + } return StMXTRA; }
--- a/Discovery/Src/text_multilanguage.c Thu Oct 03 21:30:16 2019 +0200 +++ b/Discovery/Src/text_multilanguage.c Thu Oct 03 21:33:47 2019 +0200 @@ -1,4 +1,4 @@ -/////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// /// -*- coding: UTF-8 -*- /// /// \file Discovery/Src/text_multilanguage.c @@ -722,6 +722,13 @@ static uint8_t text_IT_CompassHeading[] = "Direzione bussola"; static uint8_t text_ES_CompassHeading[] = "Rumbo brújula"; +// Dive Menu +static uint8_t text_EN_EndDiveMode[] = "End dive"; +static uint8_t text_DE_EndDiveMode[] = "Tauchgang beenden"; +static uint8_t text_FR_EndDiveMode[] = "End dive"; +static uint8_t text_IT_EndDiveMode[] = "End dive"; +static uint8_t text_ES_EndDiveMode[] = "End dive"; + // Menu SIM static uint8_t text_EN_Simulator[] = "Simulator"; static uint8_t text_DE_Simulator[] = ""; @@ -1505,18 +1512,6 @@ static uint8_t text_IT_GasVorrat[] = ""; static uint8_t text_ES_GasVorrat[] = ""; -static uint8_t text_EN_WirelessSender[] = "wireless id"; -static uint8_t text_DE_WirelessSender[] = "Sender ID"; -static uint8_t text_FR_WirelessSender[] = ""; -static uint8_t text_IT_WirelessSender[] = "Numero di serie"; -static uint8_t text_ES_WirelessSender[] = "wireless id"; - -static uint8_t text_EN_WirelessDisconnect[] = "Disconnect"; -static uint8_t text_DE_WirelessDisconnect[] = "Nicht verbunden"; -static uint8_t text_FR_WirelessDisconnect[] = ""; -static uint8_t text_IT_WirelessDisconnect[] = "Disconnesso"; -static uint8_t text_ES_WirelessDisconnect[] = "Desconectado"; - static uint8_t text_EN_FlipDisplay[] = "Flip display"; static uint8_t text_DE_FlipDisplay[] = "Anzeige spiegeln"; static uint8_t text_FR_FlipDisplay[] = ""; @@ -1622,7 +1617,8 @@ {(uint8_t)TXT2BYTE_ResetStopwatch, {text_EN_ResetStopwatch, text_DE_ResetStopwatch, text_FR_ResetStopwatch, text_IT_ResetStopwatch, text_ES_ResetStopwatch}}, {(uint8_t)TXT2BYTE_SetMarker, {text_EN_SetMarker, text_DE_SetMarker, text_FR_SetMarker, text_IT_SetMarker, text_ES_SetMarker}}, {(uint8_t)TXT2BYTE_CompassHeading, {text_EN_CompassHeading, text_DE_CompassHeading, text_FR_CompassHeading, text_IT_CompassHeading, text_ES_CompassHeading}}, - {(uint8_t)TXT2BYTE_Simulator, {text_EN_Simulator, text_DE_Simulator, text_FR_Simulator, text_IT_Simulator, text_ES_Simulator}}, + {(uint8_t)TXT2BYTE_EndDiveMode, {text_EN_EndDiveMode, text_DE_EndDiveMode, text_FR_EndDiveMode, text_IT_EndDiveMode, text_ES_EndDiveMode}}, + {(uint8_t)TXT2BYTE_Simulator, {text_EN_Simulator, text_DE_Simulator, text_FR_Simulator, text_IT_Simulator, text_ES_Simulator}}, {(uint8_t)TXT2BYTE_StartSimulator, {text_EN_StartSimulator, text_DE_StartSimulator, text_FR_StartSimulator, text_IT_StartSimulator, text_ES_StartSimulator}}, {(uint8_t)TXT2BYTE_Intervall, {text_EN_Intervall, text_DE_Intervall, text_FR_Intervall, text_IT_Intervall, text_ES_Intervall}}, {(uint8_t)TXT2BYTE_SimDiveTime, {text_EN_SimDiveTime, text_DE_SimDiveTime, text_FR_SimDiveTime, text_IT_SimDiveTime, text_ES_SimDiveTime}}, @@ -1684,8 +1680,6 @@ {(uint8_t)TXT2BYTE_NumberOfDives, {text_EN_NumberOfDives, text_DE_NumberOfDives, text_FR_NumberOfDives, text_IT_NumberOfDives, text_ES_NumberOfDives}}, {(uint8_t)TXT2BYTE_AmbientTemperature,{text_EN_AmbientTemperature, text_DE_AmbientTemperature, text_FR_AmbientTemperature, text_IT_AmbientTemperature, text_ES_AmbientTemperature}}, {(uint8_t)TXT2BYTE_Bottle, {text_EN_Bottle, text_DE_Bottle, text_FR_Bottle, text_IT_Bottle, text_ES_Bottle}}, - {(uint8_t)TXT2BYTE_WirelessSender,{text_EN_WirelessSender, text_DE_WirelessSender, text_FR_WirelessSender, text_IT_WirelessSender, text_ES_WirelessSender}}, - {(uint8_t)TXT2BYTE_WirelessDisconnect,{text_EN_WirelessDisconnect, text_DE_WirelessDisconnect, text_FR_WirelessDisconnect, text_IT_WirelessDisconnect, text_ES_WirelessDisconnect}}, {(uint8_t)TXT2BYTE_Gaslist, {text_EN_Gaslist, text_DE_Gaslist, text_FR_Gaslist, text_IT_Gaslist, text_ES_Gaslist}}, {(uint8_t)TXT2BYTE_Clock, {text_EN_Clock, text_DE_Clock, text_FR_Clock, text_IT_Clock, text_ES_Clock}}, {(uint8_t)TXT2BYTE_Sunday, {text_EN_Sunday, text_DE_Sunday, text_FR_Sunday, text_IT_Sunday, text_ES_Sunday}},