# HG changeset patch # User Ideenmodellierer # Date 1611781811 -3600 # Node ID 8fa2de4414a8bd5e702a5850fa9805e0040fec3f # Parent 96af744554205cbb818d48557fd99b6f804aea8e Added t3 quick menu for marker synchronisation: By selecting the "Check" optin of the quickmenu available in the T3_Profile view only, the live profile data may be syncronised with the marker data stored in the log profile. The implementation does not mentain a history storage. In case all markes have been checked the next check will cause the live data to be shown. another check will then map the profile again to the first marker. To support this functionality menu infra structures have been added to the menu handling functions. diff -r 96af74455420 -r 8fa2de4414a8 Discovery/Inc/tStructure.h --- a/Discovery/Inc/tStructure.h Wed Jan 27 22:04:45 2021 +0100 +++ b/Discovery/Inc/tStructure.h Wed Jan 27 22:10:11 2021 +0100 @@ -98,6 +98,7 @@ #define StDRAVG _MB(1,2,9,0,0) #define StDQUIT _MB(1,2,10,0,0) #define StDMARK _MB(1,2,11,0,0) +#define StDCHECK _MB(1,2,12,0,0) #define StUART_STANDARD _MB(3,1,0,0,0) diff -r 96af74455420 -r 8fa2de4414a8 Discovery/Inc/text_multilanguage.h --- a/Discovery/Inc/text_multilanguage.h Wed Jan 27 22:04:45 2021 +0100 +++ b/Discovery/Inc/text_multilanguage.h Wed Jan 27 22:10:11 2021 +0100 @@ -167,6 +167,7 @@ TXT2BYTE_ResetStopwatch, TXT2BYTE_SetMarker, TXT2BYTE_SetMarkerShort, + TXT2BYTE_CheckMarker, TXT2BYTE_CompassHeading, TXT2BYTE_CalibView, TXT2BYTE_EndDiveMode, diff -r 96af74455420 -r 8fa2de4414a8 Discovery/Src/t3.c --- a/Discovery/Src/t3.c Wed Jan 27 22:04:45 2021 +0100 +++ b/Discovery/Src/t3.c Wed Jan 27 22:10:11 2021 +0100 @@ -262,6 +262,17 @@ point_t start, stop; uint16_t diveMinutes = 0; + const SDecoinfo * pDecoinfo; + + if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE) + { + pDecoinfo = &stateUsed->decolistBuehlmann; + } + else + { + pDecoinfo = &stateUsed->decolistVPM; + } + wintemp.left = t3c1.WindowX0; wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH; wintemp.top = 480 - BigFontSeperationTopBottom + 5; @@ -309,6 +320,12 @@ snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0); GFX_write_string(&FontT42,&t3c1,text,0); + + if(pDecoinfo->output_time_to_surface_seconds) /* draw deco data first => will be overlayed by all other informations */ + { + GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL); + } + if(replayDataLength != 0) { GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, pReplayData, drawDataLength, CLUT_Font031, NULL); @@ -320,7 +337,6 @@ if(liveDataLength > 3) { - GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL); GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, getMiniLiveReplayPointerToData(), drawDataLength, CLUT_Font030, NULL); } } @@ -665,6 +681,10 @@ GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow); break; + case StDCHECK: snprintf(text,TEXTSIZE,"\a\003\001%c%c", TXT_2BYTE, TXT2BYTE_CheckMarker); + GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow); + break; + default: /* show divetime */ Divetime.Total = stateUsed->lifeData.dive_time_seconds_without_surface_time; diff -r 96af74455420 -r 8fa2de4414a8 Discovery/Src/tHome.c --- a/Discovery/Src/tHome.c Wed Jan 27 22:04:45 2021 +0100 +++ b/Discovery/Src/tHome.c Wed Jan 27 22:10:11 2021 +0100 @@ -43,6 +43,7 @@ #include "tMenuEditSetpoint.h" // for openEdit_DiveSelectBetterSetpoint() #include "simulation.h" #include "motion.h" +#include "logbook_miniLive.h" /* Private types -------------------------------------------------------------*/ @@ -286,6 +287,17 @@ set_globalState(StD); break; + case StDMARK: + if((settingsGetPointer()->design == 3) && (MiniLiveLogbook_getNextMarkerIndex(0) != 0)) + { + set_globalState(StDCHECK); + } + else + { + set_globalState(StD); + } + break; + default: set_globalState(StD); } @@ -348,6 +360,8 @@ set_globalState(StD); break; + case StDCHECK: MiniLiveLogbook_checkMarker(); + break; default: break; } diff -r 96af74455420 -r 8fa2de4414a8 Discovery/Src/text_multilanguage.c --- a/Discovery/Src/text_multilanguage.c Wed Jan 27 22:04:45 2021 +0100 +++ b/Discovery/Src/text_multilanguage.c Wed Jan 27 22:10:11 2021 +0100 @@ -737,12 +737,18 @@ static uint8_t text_IT_SetMarker[] = "Marcatura"; static uint8_t text_ES_SetMarker[] = "Poner Marcador"; -static uint8_t text_EN_SetMarkerShort[] = "Set Mark"; -static uint8_t text_DE_SetMarkerShort[] = "Markierung"; +static uint8_t text_EN_SetMarkerShort[] = "Set mark"; +static uint8_t text_DE_SetMarkerShort[] = "Marker"; static uint8_t text_FR_SetMarkerShort[] = "Repère"; static uint8_t text_IT_SetMarkerShort[] = "Marcatura"; static uint8_t text_ES_SetMarkerShort[] = "Marcador"; +static uint8_t text_EN_CheckMarker[] = "Check"; +static uint8_t text_DE_CheckMarker[] = "Passiert"; +static uint8_t text_FR_CheckMarker[] = ""; +static uint8_t text_IT_CheckMarker[] = ""; +static uint8_t text_ES_CheckMarker[] = ""; + // Dive Menu static uint8_t text_EN_CompassHeading[] = "Compass heading"; static uint8_t text_DE_CompassHeading[] = "Kompasskurs"; @@ -1762,6 +1768,7 @@ {(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_SetMarkerShort, {text_EN_SetMarkerShort, text_DE_SetMarkerShort, text_FR_SetMarkerShort, text_IT_SetMarkerShort, text_ES_SetMarkerShort}}, + {(uint8_t)TXT2BYTE_CheckMarker, {text_EN_CheckMarker, text_DE_CheckMarker, text_FR_CheckMarker, text_IT_CheckMarker, text_ES_CheckMarker}}, {(uint8_t)TXT2BYTE_CompassHeading, {text_EN_CompassHeading, text_DE_CompassHeading, text_FR_CompassHeading, text_IT_CompassHeading, text_ES_CompassHeading}}, {(uint8_t)TXT2BYTE_CalibView, {text_EN_CalibView, text_DE_CalibView, text_FR_CalibView, text_IT_CalibView, text_ES_CalibView}}, {(uint8_t)TXT2BYTE_IndicateFrame, {text_EN_IndicateFrame, text_DE_IndicateFrame, text_FR_IndicateFrame, text_IT_IndicateFrame, text_ES_IndicateFrame}},