comparison Discovery/Src/tMenuEdit.c @ 788:4abfb8a2a435

Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
author heinrichsweikamp
date Tue, 04 Jul 2023 14:39:06 +0200
parents 19ab6f3ed52a
children 17d9d6eddd8d
comparison
equal deleted inserted replaced
787:aeb72882f30a 788:4abfb8a2a435
571 571
572 set_globalState(event[evid].callerID); 572 set_globalState(event[evid].callerID);
573 block = 0; 573 block = 0;
574 subBlockPosition = 0; 574 subBlockPosition = 0;
575 575
576
577 if(ident[id].maintype == FIELD_NUMBERS) 576 if(ident[id].maintype == FIELD_NUMBERS)
578 { 577 {
579 change_CLUT_entry(CLUT_MenuEditLineSelected, CLUT_MenuEditCursor); 578 change_CLUT_entry(CLUT_MenuEditLineSelected, CLUT_MenuEditCursor);
580 // old stuff? hw 150916, reactivated 150923, this shows which digit will be changed now as it marks the other grey/black 579 // old stuff? hw 150916, reactivated 150923, this shows which digit will be changed now as it marks the other grey/black
581 // now fixed for button settings with newContent <= '0'+99 condition 580 // now fixed for button settings with newContent <= '0'+99 condition
666 665
667 break; 666 break;
668 } 667 }
669 break; 668 break;
670 case FIELD_BUTTON: 669 case FIELD_BUTTON:
671 set_globalState(menuID);
672 break;
673 case FIELD_ON_OFF: 670 case FIELD_ON_OFF:
674 set_globalState(menuID); 671 set_globalState(menuID);
672
675 break; 673 break;
676 case FIELD_SYMBOL: 674 case FIELD_SYMBOL:
677 ident[id].input[0] += 1; 675 ident[id].input[0] += 1;
678 if(ident[id].input[0] >= ident[id].input[1]) 676 if(ident[id].input[0] >= ident[id].input[1])
679 ident[id].input[0] = 0; 677 ident[id].input[0] = 0;
680 ident[id].newText[0] = ident[id].orgText[ident[id].input[0]]; 678 ident[id].newText[0] = ident[id].orgText[ident[id].input[0]];
681 write_content_of_actual_Id(); 679 write_content_of_actual_Id();
682 set_globalState(menuID); 680 set_globalState(menuID);
683 break; 681 break;
682 case FIELD_SELECT:
683 write_buttonTextline(TXT2BYTE_ButtonMinus, TXT2BYTE_ButtonEnter, TXT2BYTE_ButtonPlus);
684
685 break;
684 } 686 }
685 } 687 }
686 688
687 689
688 void exitMenuEditField(void) 690 void exitMenuEditField(void)
723 exitMenuEdit_to_Home(); 725 exitMenuEdit_to_Home();
724 return; 726 return;
725 } 727 }
726 728
727 } 729 }
730
731
732 static void startNextEdit(void)
733 {
734 EnterPressed = 1;
735 nextMenuEditField();
736 enterMenuEditField();
737 }
738
728 739
729 void nextMenuEditFieldDigit(void) 740 void nextMenuEditFieldDigit(void)
730 { 741 {
731 uint8_t action; 742 uint8_t action;
732 uint8_t newContent; 743 uint8_t newContent;
764 } 775 }
765 776
766 if((newContent == EXIT_TO_HOME) || (newContent == UPDATE_AND_EXIT_TO_HOME)) 777 if((newContent == EXIT_TO_HOME) || (newContent == UPDATE_AND_EXIT_TO_HOME))
767 { 778 {
768 exitMenuEdit_to_Home(); 779 exitMenuEdit_to_Home();
780 return;
781 }
782
783 if (newContent == EXIT_TO_NEXT_MENU) {
784 startNextEdit();
785
769 return; 786 return;
770 } 787 }
771 } 788 }
772 789
773 if((ident[id].maintype == FIELD_NUMBERS) && (ident[id].subtype == FIELD_3DIGIT) && (action == ACTION_BUTTON_ENTER) &&(newContent >= '0') && (newContent <= '0' + 99)) 790 if((ident[id].maintype == FIELD_NUMBERS) && (ident[id].subtype == FIELD_3DIGIT) && (action == ACTION_BUTTON_ENTER) &&(newContent >= '0') && (newContent <= '0' + 99))
1674 EnterPressed = 1; 1691 EnterPressed = 1;
1675 helperGotoMenuEditField(0); 1692 helperGotoMenuEditField(0);
1676 enterMenuEditField(); 1693 enterMenuEditField();
1677 } 1694 }
1678 1695
1696
1679 void exitEditWithUpdate(void) 1697 void exitEditWithUpdate(void)
1680 { 1698 {
1681 createDiveSettings(); 1699 createDiveSettings();
1682 EnterPressed = 1; 1700 EnterPressed = 1;
1683 exitMenuEdit(1); 1701 exitMenuEdit(1);