# HG changeset patch # User heinrichsweikamp # Date 1570363961 -7200 # Node ID ba53ab77f059251e3e2777b48e7a59324ab0d344 # Parent 591c03a1e68d57be07ecf46f4e304fec5068be3c# Parent 607099140a412ebaa8ad7909ddd2ac84caafdd86 Merge diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Inc/tStructure.h --- a/Discovery/Inc/tStructure.h Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Inc/tStructure.h Sun Oct 06 14:12:41 2019 +0200 @@ -123,7 +123,6 @@ #define StMOG_ChangeDepth _MB(2,1,255,3,0) #define StMOG_SetToMOD _MB(2,1,255,4,0) #define StMOG_Bottle _MB(2,1,255,5,0) -#define StMOG_Wireless _MB(2,1,255,6,0) #define StMOG_MOD _MB(2,1,255,9,0) diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Inc/text_multilanguage.h --- a/Discovery/Inc/text_multilanguage.h Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Inc/text_multilanguage.h Sun Oct 06 14:12:41 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, diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/base.c --- a/Discovery/Src/base.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/base.c Sun Oct 06 14:12:41 2019 +0200 @@ -525,6 +525,8 @@ /// to be called /// // =============================================================================== + +//#define NO_TIMEOUT void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { #ifdef DEMOMODE diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/data_exchange_main.c --- a/Discovery/Src/data_exchange_main.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/data_exchange_main.c Sun Oct 06 14:12:41 2019 +0200 @@ -693,40 +693,31 @@ } } -#define AVERAGE_COUNT 4 static float getSampleDepth(SDataExchangeSlaveToMaster *d, SDiveState *ds) { - static uint8_t c = 0; - static float ambient[AVERAGE_COUNT] = {0}; - static float surface[AVERAGE_COUNT]= {0}; - static float depth[AVERAGE_COUNT]= {0}; - - ambient[c] = d->data[d->boolPressureData].pressure_mbar / 1000.0f; - surface[c] = d->data[d->boolPressureData].surface_mbar / 1000.0f; - float density = ((float)( 100 + settingsGetPointer()->salinity)) / 100.0f; + float ambient = 0; + float surface = 0; + float depth = 0; + float density = 0; - ds->lifeData.pressure_ambient_bar = (ambient[0] + ambient[1] + ambient[2] + ambient[3])/4.0f; - ds->lifeData.pressure_surface_bar = (surface[0] + surface[1] + surface[2] + surface[3])/4.0f; - depth[c] = (ambient[c] - surface[c]) / (0.09807f * density); + ambient = d->data[d->boolPressureData].pressure_mbar / 1000.0f; + surface = d->data[d->boolPressureData].surface_mbar / 1000.0f; + density = ((float)( 100 + settingsGetPointer()->salinity)) / 100.0f; - c++; - if (c == AVERAGE_COUNT) c = 0; + ds->lifeData.pressure_ambient_bar = ambient; + ds->lifeData.pressure_surface_bar = surface; + depth = (ambient - surface) / (0.09807f * density); + ds->lifeData.bool_temp1 = d->data[d->boolPressureData].SPARE1; - return (depth[0] + depth[1] + depth[2] + depth[3])/4.0f; + return depth; } -#define TEMP_AVERAGE_COUNT 3 static float getTemperature(SDataExchangeSlaveToMaster *d) { - static uint8_t c = 0; - static float temp[TEMP_AVERAGE_COUNT] = {0}; - - temp[c] = d->data[d->boolPressureData].temperature; + float temp = 0; + temp = d->data[d->boolPressureData].temperature; - c++; - if (c == TEMP_AVERAGE_COUNT) c = 0; - - return (temp[0] + temp[1] + temp[2])/3.0f; + return temp; } void DataEX_copy_to_LifeData(_Bool *modeChangeFlag) diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/t7.c --- a/Discovery/Src/t7.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/t7.c Sun Oct 06 14:12:41 2019 +0200 @@ -1144,73 +1144,8 @@ draw_frame(0,0, CLUT_pluginboxSurface, CLUT_Font020); } -void t7_refresh_surface_debugmode_wireless_info(void) -{ - char text[400]; - uint8_t colorDataLost = 0; - int txtPointer = 0; - uint8_t numberOfBytes = 0; - - GFX_DrawCfgWindow textWindow = - { - .Image = &t7screen, - .WindowNumberOfTextLines = 5, - .WindowLineSpacing = 70, - .WindowTab = 220, - .WindowX0 = 10, - .WindowX1 = 790, - .WindowY0 = 10, - .WindowY1 = 380 - }; - - Gfx_write_label_var(&t7screen, 10,600, 10,&FontT42,CLUT_DiveMainLabel,"Wireless Data"); - - if(stateUsed->data_old__lost_connection_to_slave) - { - Gfx_write_label_var(&t7screen, 600,800,10,&FontT42,CLUT_Font020,"CPU2?"); - colorDataLost = 1; - } - - txtPointer = 0; - for(int i=0;i<4;i++) - { - if((!stateUsed->lifeData.wireless_data[i].ageInMilliSeconds) || colorDataLost) - text[txtPointer++] = '\021'; - - numberOfBytes = stateUsed->lifeData.wireless_data[i].numberOfBytes; - if((numberOfBytes > 0) && (numberOfBytes <= 10)) - { - txtPointer += snprintf(&text[txtPointer],20,"%02u s %02u\t" - ,(stateUsed->lifeData.wireless_data[i].ageInMilliSeconds)/1000 - ,stateUsed->lifeData.wireless_data[i].status - ); - if(numberOfBytes > 8) ///< lifeData.wireless_data[i].data[j] has only size of 8 - numberOfBytes = 8; - for(int j=0;jlifeData.wireless_data[i].data[j] - ); - } - } - text[txtPointer++] = '\n'; - text[txtPointer++] = '\r'; - text[txtPointer++] = '\020'; - text[txtPointer] = 0; - } - GFX_write_string(&FontT48,&textWindow,text,1); - -} - - void t7_refresh_surface_debugmode(void) { - if(selection_customview%2 == 1) - { - t7_refresh_surface_debugmode_wireless_info(); - return; - } - // could be warning, now just to set RTE variables DataEX_check_RTE_version__needs_update(); @@ -1312,6 +1247,16 @@ // Gfx_write_label_var(&t7screen, 601,800,310,&FontT42,CLUT_DiveMainLabel,"Light"); // Gfx_write_label_var(&t7screen, 601,800,355,&FontT48,CLUT_Font020,TextL1); +/* show surface pressure state */ + if(stateUsed->lifeData.bool_temp1 ) + { + snprintf(TextL1,TEXTSIZE,"stable"); + } + else + { + snprintf(TextL1,TEXTSIZE,"unstable"); + } + Gfx_write_label_var(&t7screen, 500,800,400,&FontT48,CLUT_Font020,TextL1); if(Sdate.Year < 15) diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/tMenuEditGasOC.c --- a/Discovery/Src/tMenuEditGasOC.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/tMenuEditGasOC.c Sun Oct 06 14:12:41 2019 +0200 @@ -44,19 +44,15 @@ uint8_t setpoint; } SEditGasPage; -#define MAX_SENDER_AT_ONCE 5 /* Private variables ---------------------------------------------------------*/ SEditGasPage editGasPage; -uint16_t wirelessSender[MAX_SENDER_AT_ONCE]; - /* Private function prototypes -----------------------------------------------*/ void create_text_with_u8(char *text, const char *text1, uint8_t inputU8, const char *text2); void openEdit_Gas(uint8_t line, uint8_t ccr); void openEdit_GasType(void); -void openEdit_Wireless(void); void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr); void openEdit_SpecialDiveGasMenu(uint8_t ccr); @@ -70,16 +66,12 @@ uint8_t OnAction_ChangeDepth (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_SetToMOD (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_BottleSize (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); -uint8_t OnAction_Wireless (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_First (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_Deco (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_Travel (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_Inactive (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); -uint8_t OnAction_WirelessID (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); -uint8_t OnAction_NoWireless (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); - uint8_t OnAction_DM_Active (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); uint8_t OnAction_DM_Mix (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); @@ -344,8 +336,7 @@ /* surface mode */ void openEdit_Gas(uint8_t line, uint8_t ccr) { - uint8_t gasID, oxygen, helium, depthDeco, active, first, depthMOD, deco, travel, inactive;//, bottleSizeLiter;, bottleWirelessStatus; - //uint16_t bottleWirelessId;//, bottleWirelessIdSmall; + uint8_t gasID, oxygen, helium, depthDeco, active, first, depthMOD, deco, travel, inactive;//, bottleSizeLiter; char text[32]; char textMOD[32]; @@ -385,9 +376,6 @@ travel = editGasPage.pGasLine[gasID].note.ub.travel; //bottleSizeLiter = editGasPage.pGasLine[gasID].bottle_size_liter; -// bottleWirelessStatus = editGasPage.pGasLine[gasID].bottle_wireless_status; - //bottleWirelessId = editGasPage.pGasLine[gasID].bottle_wireless_id; - //bottleWirelessIdSmall = bottleWirelessId & 0x0F; if(active) inactive = 0; @@ -487,14 +475,6 @@ write_label_var( 20 ,800, ME_Y_LINE5, &FontT48, text); write_field_2digit(StMOG_Bottle, 600, 710, ME_Y_LINE5, &FontT48,"## ltr", (uint32_t)bottleSizeLiter, 0, 0, 0); - txtptr = 0; - text[txtptr++] = TXT_2BYTE; - text[txtptr++] = TXT2BYTE_WirelessSender; - text[txtptr++] = ' '; - if(!bottleWirelessId) - text[txtptr++] = '\021'; - txtptr += snprintf(&text[txtptr],20,"%u (%04X)",bottleWirelessIdSmall, bottleWirelessId); - write_field_button(StMOG_Wireless, 20, 710, ME_Y_LINE6, &FontT48, text); */ stop_cursor_fields(); @@ -522,7 +502,6 @@ } /* setEvent(StMOG_Bottle, (uint32_t)OnAction_BottleSize); - setEvent(StMOG_Wireless, (uint32_t)OnAction_Wireless); */ write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); } @@ -606,205 +585,6 @@ return UNSPECIFIC_RETURN; } -void openEdit_Wireless(void) -{ - uint8_t gasID, wirelessSenderAvailable, isNotMatched, isMatchedWithThis, wirelessSenderActive[MAX_SENDER_AT_ONCE], senderCount, isInList; //, wirelessStatus; - uint16_t wirelessId, wirelessSenderIdSmall, wirelessIdTemp; - char text[32]; - uint8_t txtptr; - - if(editGasPage.ccr) - { - resetMenuEdit(CLUT_MenuPageGasCC); - setBackMenu((uint32_t)openEdit_GasCC, editGasPage.gasID - NUM_OFFSET_DILUENT, 5); - } - else - { - resetMenuEdit(CLUT_MenuPageGasOC); - setBackMenu((uint32_t)openEdit_GasOC, editGasPage.gasID, 5); - } - - gasID = editGasPage.gasID; - wirelessId = editGasPage.pGasLine[gasID].bottle_wireless_id; -// wirelessStatus = editGasPage.pGasLine[gasID].bottle_wireless_status; - - - /* header */ - int i = 0; - if(gasID >= 10) - { - i = 1; - strcpy(text, "\001" "Gas #10 X"); - } - else - strcpy(text, "\001" "Gas #0 X"); - - if(editGasPage.ccr) - text[8+i] = TXT_Diluent_Gas_Edit; - else - text[8+i] = TXT_OC_Gas_Edit; - - if(gasID >= 10) - text[6+i] += gasID - 10; - else - text[6+i] += gasID; - write_topline(text); - - senderCount = 0; - wirelessSenderAvailable = 0; - if(wirelessId) - { - wirelessSender[senderCount] = wirelessId; - wirelessSenderActive[senderCount] = 0; - wirelessSenderAvailable++; - senderCount++; - } - - for(int i=0;i<4;i++) - { - if((stateUsed->lifeData.wireless_data[i].ageInMilliSeconds) && (stateUsed->lifeData.wireless_data[i].ageInMilliSeconds <= 60000) && ((stateUsed->lifeData.wireless_data[i].data[1] & 0x0F) != 0)) - { - wirelessIdTemp = stateUsed->lifeData.wireless_data[i].data[0] * 256; - wirelessIdTemp += stateUsed->lifeData.wireless_data[i].data[1]; - if(wirelessId && (wirelessId == wirelessIdTemp)) - wirelessSenderActive[0] = 1; - else - { - isInList = 0; - for(int j=0;j MAX_SENDER_AT_ONCE) - wirelessSenderAvailable = MAX_SENDER_AT_ONCE; - - isNotMatched = 1; - - for(int i=0;igas[j].bottle_wireless_id == wirelessSender[i])) - { - txtptr += snprintf(&text[txtptr],20," used by Gas #%i",i); - break; - } - } - } - write_field_on_off(StMOG_Transmitter1 + i, 30, 710, ME_Y_LINE1 + (i * ME_Y_LINE_STEP), &FontT48, text, isMatchedWithThis); - } - - - txtptr = 0; - text[txtptr++] = TXT_2BYTE; - text[txtptr++] = TXT2BYTE_WirelessDisconnect; - text[txtptr++] = 0; - write_field_on_off(StMOG_NoTransmitter, 30, 400, ME_Y_LINE6, &FontT48, text, isNotMatched); - - // setEvent has to be _after_ all fields are written - for(int i=0;i StMOG_Transmitter5)) - return UNSPECIFIC_RETURN; - - uint8_t line, isMatched; - - line = editId - StMOG_Transmitter1; - - - if(editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_id == wirelessSender[line]) - isMatched = 1; - else - isMatched = 0; - - editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_id = wirelessSender[line]; -// editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_status = 0; - - for(int i=0;i<5;i++) - { - if((StMOG_Transmitter1 + i) != editId) - tMenuEdit_set_on_off(StMOG_Transmitter1 + i, 0); - } - tMenuEdit_set_on_off(editId, 1); - tMenuEdit_set_on_off(StMOG_NoTransmitter, 0); - - if(!isMatched) - return UPDATE_DIVESETTINGS; - else - return UPDATE_AND_EXIT_TO_MENU; -} - - -uint8_t OnAction_NoWireless (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) -{ - uint8_t isNotMatched; - - if(editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_id == 0) - isNotMatched = 1; - else - isNotMatched = 1; - - editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_id = 0; -// editGasPage.pGasLine[editGasPage.gasID].bottle_wireless_status = 0; - - tMenuEdit_set_on_off(StMOG_Transmitter1, 0); - tMenuEdit_set_on_off(StMOG_Transmitter2, 0); - tMenuEdit_set_on_off(StMOG_Transmitter3, 0); - tMenuEdit_set_on_off(StMOG_Transmitter4, 0); - tMenuEdit_set_on_off(StMOG_Transmitter5, 0); - tMenuEdit_set_on_off(StMOG_NoTransmitter, 1); - - if(!isNotMatched) - return UPDATE_DIVESETTINGS; - else - return UPDATE_AND_EXIT_TO_MENU; -} - - uint8_t OnAction_Mix(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) { uint8_t digitContentNew; diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/tMenuEditSystem.c --- a/Discovery/Src/tMenuEditSystem.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/tMenuEditSystem.c Sun Oct 06 14:12:41 2019 +0200 @@ -35,11 +35,16 @@ #include "ostc.h" #include "settings.h" // for getLicence() #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass() +#include "tMenu.h" #include "tMenuEdit.h" +#include "tMenuSystem.h" +#include "t7.h" + +/* uncomment to activate debug view option */ +/*#define HAVE_DEBUG_VIEW */ /* Private variables ---------------------------------------------------------*/ - -uint8_t infoPage = 0; +static uint8_t infoPage = 0; /* Private function prototypes -----------------------------------------------*/ void openEdit_DateTime(void); @@ -576,10 +581,14 @@ write_field_button(StMSYS3_Units, 400, 700, ME_Y_LINE1, &FontT48, ""); write_field_button(StMSYS3_Colors, 400, 700, ME_Y_LINE2, &FontT48, ""); -// write_field_button(StMSYS3_Debug, 400, 700, ME_Y_LINE3, &FontT48, ""); +#ifdef HAVE_DEBUG_VIEW + write_field_button(StMSYS3_Debug, 400, 700, ME_Y_LINE3, &FontT48, ""); +#endif setEvent(StMSYS3_Units, (uint32_t)OnAction_Units); setEvent(StMSYS3_Colors, (uint32_t)OnAction_Colorscheme); -// setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); +#ifdef HAVE_DEBUG_VIEW + setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); +#endif } @@ -620,7 +629,7 @@ text[1] = 0; write_label_var( 400, 700, ME_Y_LINE2, &FontT48, text); -/* +#ifdef HAVE_DEBUG_VIEW // specials text[0] = TXT_2BYTE; text[1] = TXT2BYTE_ShowDebug; @@ -633,7 +642,7 @@ text[0] = '\006'; text[1] = 0; write_label_var( 400, 700, ME_Y_LINE3, &FontT48, text); -*/ +#endif // design text[0] = TXT_Depth; @@ -732,7 +741,7 @@ write_field_button(StMSYS4_CViewStandard, 400, 700, ME_Y_LINE2, &FontT48, ""); write_field_button(StMSYS4_CornerTimeout, 400, 700, ME_Y_LINE3, &FontT48, ""); - write_field_button(StMSYS4_CornerStandard, 400, 700, ME_Y_LINE4, &FontT48, ""); + write_field_button(StMSYS4_CornerStandard, 400, 700, ME_Y_LINE4, &FontT48, ""); write_field_button(StMSYS4_ExtraDisplay, 400, 700, ME_Y_LINE5, &FontT48, ""); diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/tMenuEditXtra.c --- a/Discovery/Src/tMenuEditXtra.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/tMenuEditXtra.c Sun Oct 06 14:12:41 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()); diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/tMenuGas.c --- a/Discovery/Src/tMenuGas.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/tMenuGas.c Sun Oct 06 14:12:41 2019 +0200 @@ -74,7 +74,7 @@ { const SGasLine * pGasLine; - uint8_t gasId, oxygen, helium, depthUp, active, first, typeDeco, wirelessId; + uint8_t gasId, oxygen, helium, depthUp, active, first, typeDeco; float fPpO2limitHigh = 0; float fPpO2ofGasAtThisDepth = 0; //uint8_t senderCode, depthDown,; @@ -142,7 +142,6 @@ typeDeco = pGasLine[gasId].note.ub.deco; mod = calc_MOD(gasId); ltr = pGasLine[gasId].bottle_size_liter; - wirelessId = pGasLine[gasId].bottle_wireless_id; //bar = stateUsed->lifeData.bottle_bar[gasId]; if(active) @@ -224,12 +223,6 @@ if(ltr) color[2] = '\020'; /* bar */ - if(wirelessId) - color[3] = '\020'; - /* wireless */ - if(wirelessId) - color[4] = '\020'; - /* ltr, bar */ if(mod < depthUp) { @@ -302,18 +295,6 @@ color[3], bar ); */ - /* wireless */ -/* - if(wirelessId) - { - textPointer += snprintf(&text[textPointer], 8,\ - "%c" - " *" - "%u", - color[4], (wirelessId%0x0F) - ); - } -*/ text[textPointer++] = '\035'; text[textPointer++] = '\n'; text[textPointer++] = '\r'; diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/tMenuXtra.c --- a/Discovery/Src/tMenuXtra.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/tMenuXtra.c Sun Oct 06 14:12:41 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; } diff -r 591c03a1e68d -r ba53ab77f059 Discovery/Src/text_multilanguage.c --- a/Discovery/Src/text_multilanguage.c Sun Oct 06 14:07:51 2019 +0200 +++ b/Discovery/Src/text_multilanguage.c Sun Oct 06 14:12:41 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}}, diff -r 591c03a1e68d -r ba53ab77f059 RefPrj/Firmware/.cproject --- a/RefPrj/Firmware/.cproject Sun Oct 06 14:07:51 2019 +0200 +++ b/RefPrj/Firmware/.cproject Sun Oct 06 14:12:41 2019 +0200 @@ -50,7 +50,7 @@