# HG changeset patch # User heinrichsweikamp # Date 1721659214 -7200 # Node ID 3a1c533f3840d109ccac737d2b02fd19cc7f2c67 # Parent cb386cccc7c5278b6ad3c3e0c39ea7cd77c596ec# Parent 61f14abce25d02cb7314f85bb5f78203dd80a659 Zusammenf?hren diff -r 61f14abce25d -r 3a1c533f3840 Common/Inc/settings.h --- a/Common/Inc/settings.h Tue Feb 13 17:30:24 2024 +0100 +++ b/Common/Inc/settings.h Mon Jul 22 16:40:14 2024 +0200 @@ -46,6 +46,7 @@ #define NUM_GASES 5 #define NUM_OFFSET_DILUENT 5 #define SPECIAL_GAS_ID 0 +#define NO_GAS_ID 255 #define ERROR_ 0xFF diff -r 61f14abce25d -r 3a1c533f3840 Discovery/Inc/text_multilanguage.h --- a/Discovery/Inc/text_multilanguage.h Tue Feb 13 17:30:24 2024 +0100 +++ b/Discovery/Inc/text_multilanguage.h Mon Jul 22 16:40:14 2024 +0200 @@ -374,7 +374,9 @@ TXT2BYTE_Starting, TXT2BYTE_Finished, - TXT2BYTE_END + TXT2BYTE_Page, + + TXT2BYTE_END, }; #endif /* TEXT_MULTILINGUAGE_H */ diff -r 61f14abce25d -r 3a1c533f3840 Discovery/Src/check_warning.c --- a/Discovery/Src/check_warning.c Tue Feb 13 17:30:24 2024 +0100 +++ b/Discovery/Src/check_warning.c Mon Jul 22 16:40:14 2024 +0200 @@ -231,6 +231,14 @@ gasIdOffset = 0; } + if (betterGasIdLocal == NO_GAS_ID) { + for (unsigned i = gasIdOffset + 1; i <= gasIdOffset + 5; i++) { + if (diveSettings.gas[i].note.ub.active && diveSettings.gas[i].note.ub.first) { + betterGasIdLocal = i; + } + } + } + /* life data is float, gas data is uint8 */ if (actualLeftMaxDepth(diveState)) { /* deco gases */ for (int i=1+gasIdOffset; i<= 5+gasIdOffset; i++) { @@ -245,7 +253,7 @@ } } else { /* travel gases */ bestGasDepth = 0; - //check for travalgas + //check for travelgas for (int i = 1 + gasIdOffset; i <= 5 + gasIdOffset; i++) { if ((diveSettings.gas[i].note.ub.active) && (diveSettings.gas[i].note.ub.travel) @@ -277,7 +285,7 @@ if (isLoopMode(diveSettings.diveMode)) { betterGasId = getBetterGasId(true, lifeData.actualGas.GasIdInSettings, diveState); - betterBailoutGasId = getBetterGasId(false, lifeData.lastDiluent_GasIdInSettings, diveState); + betterBailoutGasId = getBetterGasId(false, NO_GAS_ID, diveState); } else { betterGasId = getBetterGasId(false, lifeData.actualGas.GasIdInSettings, diveState); } diff -r 61f14abce25d -r 3a1c533f3840 Discovery/Src/data_central.c --- a/Discovery/Src/data_central.c Tue Feb 13 17:30:24 2024 +0100 +++ b/Discovery/Src/data_central.c Mon Jul 22 16:40:14 2024 +0200 @@ -547,12 +547,19 @@ nitrogen -= helium; - if((lifeData->actualGas.nitrogen_percentage != nitrogen) || (lifeData->actualGas.helium_percentage != helium) || (lifeData->actualGas.AppliedDiveMode != DIVEMODE_OC)) + if ((lifeData->actualGas.nitrogen_percentage != nitrogen) || (lifeData->actualGas.helium_percentage != helium) || lifeData->actualGas.AppliedDiveMode != DIVEMODE_OC) { - stateUsedWrite->events.manualGasSet = 1; - stateUsedWrite->events.info_manualGasSetHe = helium; - stateUsedWrite->events.info_manualGasSetO2 = oxygen; + if (stateUsed->diveSettings.ccrOption) { + stateUsedWrite->events.bailout = 1; + stateUsedWrite->events.info_bailoutHe = helium; + stateUsedWrite->events.info_bailoutO2 = oxygen; + } else { + stateUsedWrite->events.manualGasSet = 1; + stateUsedWrite->events.info_manualGasSetHe = helium; + stateUsedWrite->events.info_manualGasSetO2 = oxygen; + } } + if( lifeData->actualGas.setPoint_cbar != setpoint_cbar) { stateUsedWrite->events.setpointChange = 1; diff -r 61f14abce25d -r 3a1c533f3840 Discovery/Src/tInfoLog.c --- a/Discovery/Src/tInfoLog.c Tue Feb 13 17:30:24 2024 +0100 +++ b/Discovery/Src/tInfoLog.c Mon Jul 22 16:40:14 2024 +0200 @@ -233,6 +233,8 @@ infolog.line = 0; infolog.modeFlipPages = 1; + tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); + if(!settingsGetPointer()->FlipDisplay) { GFX_SetFrameBottom(pMenuCursorDesignSolo->FBStartAdress, 0, 25, 800, 390); @@ -420,12 +422,11 @@ } GFX_write_string(&FontT48, &INFOLOGwindow, text,1); - if(infolog.linesAvailableForPage > 1) + if(infolog.page == 255) { + tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,0,0); + } else { tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); - else if(infolog.page == 255) - tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,0,0); - else - tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,0); + } GFX_SetFrameTop(INFOLOGscreen.FBStartAdress); set_globalState_Log_Page(infolog.page); @@ -443,6 +444,12 @@ infolog.modeFlipPages = 0; + if (infolog.linesAvailableForPage > 1) { + tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_Page, TXT2BYTE_ButtonEnter, TXT2BYTE_ButtonNext); + } else { + tInfo_write_buttonTextline(&INFOLOGscreen, TXT2BYTE_Page, TXT2BYTE_ButtonEnter, 0); + } + if(!settingsGetPointer()->FlipDisplay) { GFX_SetFrameBottom((pMenuCursor->FBStartAdress) + 65*2*(infolog.line - 1), 0, 25, 800, 390); diff -r 61f14abce25d -r 3a1c533f3840 Discovery/Src/text_multilanguage.c --- a/Discovery/Src/text_multilanguage.c Tue Feb 13 17:30:24 2024 +0100 +++ b/Discovery/Src/text_multilanguage.c Mon Jul 22 16:40:14 2024 +0200 @@ -1901,6 +1901,12 @@ static uint8_t text_IT_Finished[] = "Finito"; static uint8_t text_ES_Finished[] = "Terminado"; +static uint8_t text_EN_Page[] = "Page"; +static uint8_t text_DE_Page[] = "Blättern"; +static uint8_t text_FR_Page[] = "Défiler"; +static uint8_t text_IT_Page[] = "Scorrere"; +static uint8_t text_ES_Page[] = "Desplazarse"; + /* Lookup Table -------------------------------------------------------------*/ const tText text_array[] = @@ -2189,4 +2195,6 @@ {(uint8_t)TXT2BYTE_Timer, {text_EN_Timer, text_DE_Timer, text_FR_Timer, text_IT_Timer, text_ES_Timer}}, {(uint8_t)TXT2BYTE_Starting, {text_EN_Starting, text_DE_Starting, text_FR_Starting, text_IT_Starting, text_ES_Starting}}, {(uint8_t)TXT2BYTE_Finished, {text_EN_Finished, text_DE_Finished, text_FR_Finished, text_IT_Finished, text_ES_Finished}}, + + {(uint8_t)TXT2BYTE_Page, {text_EN_Page, text_DE_Page, text_FR_Page, text_IT_Page, text_ES_Page}}, };