comparison Discovery/Src/t3.c @ 619:8fa2de4414a8

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.
author Ideenmodellierer
date Wed, 27 Jan 2021 22:10:11 +0100
parents beeb23d18443
children 8f78faf88fc5
comparison
equal deleted inserted replaced
618:96af74455420 619:8fa2de4414a8
260 uint16_t max_depth = 10; 260 uint16_t max_depth = 10;
261 char text[TEXTSIZE]; 261 char text[TEXTSIZE];
262 point_t start, stop; 262 point_t start, stop;
263 uint16_t diveMinutes = 0; 263 uint16_t diveMinutes = 0;
264 264
265 const SDecoinfo * pDecoinfo;
266
267 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE)
268 {
269 pDecoinfo = &stateUsed->decolistBuehlmann;
270 }
271 else
272 {
273 pDecoinfo = &stateUsed->decolistVPM;
274 }
275
265 wintemp.left = t3c1.WindowX0; 276 wintemp.left = t3c1.WindowX0;
266 wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH; 277 wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH;
267 wintemp.top = 480 - BigFontSeperationTopBottom + 5; 278 wintemp.top = 480 - BigFontSeperationTopBottom + 5;
268 wintemp.bottom = 479 - 5; 279 wintemp.bottom = 479 - 5;
269 280
307 } 318 }
308 319
309 snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0); 320 snprintf(text,TEXTSIZE,"\002%01.1fm", max_depth / 100.0);
310 GFX_write_string(&FontT42,&t3c1,text,0); 321 GFX_write_string(&FontT42,&t3c1,text,0);
311 322
323
324 if(pDecoinfo->output_time_to_surface_seconds) /* draw deco data first => will be overlayed by all other informations */
325 {
326 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL);
327 }
328
312 if(replayDataLength != 0) 329 if(replayDataLength != 0)
313 { 330 {
314 GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, pReplayData, drawDataLength, CLUT_Font031, NULL); 331 GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, pReplayData, drawDataLength, CLUT_Font031, NULL);
315 if(pReplayMarker[0] != 0xFF) 332 if(pReplayMarker[0] != 0xFF)
316 { 333 {
318 } 335 }
319 } 336 }
320 337
321 if(liveDataLength > 3) 338 if(liveDataLength > 3)
322 { 339 {
323 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL);
324 GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, getMiniLiveReplayPointerToData(), drawDataLength, CLUT_Font030, NULL); 340 GFX_graph_print(&t3screen, &wintemp, 0,1,0, max_depth, getMiniLiveReplayPointerToData(), drawDataLength, CLUT_Font030, NULL);
325 } 341 }
326 } 342 }
327 343
328 344
660 text[textPointer++] = 0; 676 text[textPointer++] = 0;
661 GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow); 677 GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow);
662 break; 678 break;
663 679
664 case StDMARK: snprintf(text,TEXTSIZE,"\a\003\001%c%c", TXT_2BYTE, TXT2BYTE_SetMarkerShort); 680 case StDMARK: snprintf(text,TEXTSIZE,"\a\003\001%c%c", TXT_2BYTE, TXT2BYTE_SetMarkerShort);
681 GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow);
682 break;
683
684 case StDCHECK: snprintf(text,TEXTSIZE,"\a\003\001%c%c", TXT_2BYTE, TXT2BYTE_CheckMarker);
665 GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow); 685 GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow);
666 break; 686 break;
667 687
668 default: /* show divetime */ 688 default: /* show divetime */
669 689