comparison Discovery/Src/tMenuEditGasOC.c @ 1061:f501d7c35c8f Icon_Integration

Show/ edit bottle size and pressure: The function to visualize bottle data was already present in an earlier implementation. The functions have be reactivated and may now be added using the compile switch "ENABLE_ADVANCED_GAS". The size of a bottle may be selected and pressure information will be displayed if it is available.
author Ideenmodellierer
date Sat, 07 Feb 2026 21:39:40 +0100
parents 22d5b477c903
children
comparison
equal deleted inserted replaced
1060:3d9994033ae6 1061:f501d7c35c8f
380 380
381 381
382 /* surface mode */ 382 /* surface mode */
383 void openEdit_Gas(uint8_t line, uint8_t ccr) 383 void openEdit_Gas(uint8_t line, uint8_t ccr)
384 { 384 {
385 uint8_t gasID, oxygen, helium, depthDeco, active, first, depthMOD, deco, travel, inactive, off ;//, bottleSizeLiter; 385 uint8_t gasID, oxygen, helium, depthDeco, active, first, depthMOD, deco, travel, inactive, off ;
386 #ifdef ENABLE_ADVANCED_GAS
387 uint8_t bottleSizeLiter;
388 #endif
386 389
387 char text[32]; 390 char text[32];
388 char textMOD[32]; 391 char textMOD[32];
389 uint8_t txtptr; 392 uint8_t txtptr;
390 393
420 first = editGasPage.pGasLine[gasID].note.ub.first; 423 first = editGasPage.pGasLine[gasID].note.ub.first;
421 deco = editGasPage.pGasLine[gasID].note.ub.deco; 424 deco = editGasPage.pGasLine[gasID].note.ub.deco;
422 travel = editGasPage.pGasLine[gasID].note.ub.travel; 425 travel = editGasPage.pGasLine[gasID].note.ub.travel;
423 off = editGasPage.pGasLine[gasID].note.ub.off; 426 off = editGasPage.pGasLine[gasID].note.ub.off;
424 427
425 //bottleSizeLiter = editGasPage.pGasLine[gasID].bottle_size_liter; 428 #ifdef ENABLE_ADVANCED_GAS
429 bottleSizeLiter = editGasPage.pGasLine[gasID].bottle_size_liter;
430 #endif
426 431
427 if(active) 432 if(active)
428 inactive = 0; 433 inactive = 0;
429 else 434 else
430 inactive = 1; 435 inactive = 1;
523 text[txtptr++] = TXT_2BYTE; 528 text[txtptr++] = TXT_2BYTE;
524 text[txtptr++] = TXT2BYTE_SetToMOD; 529 text[txtptr++] = TXT2BYTE_SetToMOD;
525 text[txtptr++] = 0; 530 text[txtptr++] = 0;
526 write_label_var( 20 ,800, ME_Y_LINE4, &FontT48, text); 531 write_label_var( 20 ,800, ME_Y_LINE4, &FontT48, text);
527 } 532 }
528 /* 533 #ifdef ENABLE_ADVANCED_GAS
529 txtptr = 0; 534 txtptr = 0;
530 text[txtptr++] = TXT_2BYTE; 535 text[txtptr++] = TXT_2BYTE;
531 text[txtptr++] = TXT2BYTE_Bottle; 536 text[txtptr++] = TXT2BYTE_Bottle;
532 text[txtptr++] = 0; 537 text[txtptr++] = 0;
533 write_label_var( 20 ,800, ME_Y_LINE5, &FontT48, text); 538 write_label_var( 20 ,800, ME_Y_LINE5, &FontT48, text);
534 write_field_2digit(StMOG_Bottle, 600, 710, ME_Y_LINE5, &FontT48,"## ltr", (uint32_t)bottleSizeLiter, 0, 0, 0); 539 write_field_2digit(StMOG_Bottle, 600, 710, ME_Y_LINE5, &FontT48,"## ltr", (uint32_t)bottleSizeLiter, 0, 0, 0);
535 540 #endif
536 */
537 stop_cursor_fields(); 541 stop_cursor_fields();
538 542
539 textMOD[0] = '#'; 543 textMOD[0] = '#';
540 textMOD[1] = '#'; 544 textMOD[1] = '#';
541 textMOD[2] = '#'; 545 textMOD[2] = '#';
556 if((deco) || (travel && ccr)) 560 if((deco) || (travel && ccr))
557 { 561 {
558 setEvent(StMOG_ChangeDepth, (uint32_t)OnAction_ChangeDepth); 562 setEvent(StMOG_ChangeDepth, (uint32_t)OnAction_ChangeDepth);
559 setEvent(StMOG_SetToMOD, (uint32_t)OnAction_SetToMOD); 563 setEvent(StMOG_SetToMOD, (uint32_t)OnAction_SetToMOD);
560 } 564 }
561 /* 565 #ifdef ENABLE_ADVANCED_GAS
562 setEvent(StMOG_Bottle, (uint32_t)OnAction_BottleSize); 566 setEvent(StMOG_Bottle, (uint32_t)OnAction_BottleSize);
563 */ 567 #endif
564 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); 568 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext);
565 } 569 }
566 } 570 }
567 571
568 /* surface mode */ 572 /* surface mode */