Mercurial > public > ostc4
comparison Discovery/Src/tMenu.c @ 981:c6c781a2e85b default
Merge into default
| author | heinrichsweikamp |
|---|---|
| date | Tue, 11 Feb 2025 18:12:00 +0100 |
| parents | e9c37071933b |
| children | 8507a87f6401 |
comparison
equal
deleted
inserted
replaced
| 871:f7318457df4d | 981:c6c781a2e85b |
|---|---|
| 259 { | 259 { |
| 260 menu.disableLineMask[idList.page] |= (1 << idList.line); | 260 menu.disableLineMask[idList.page] |= (1 << idList.line); |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 uint8_t getLineMask(uint32_t lineId) | |
| 265 { | |
| 266 SStateList idList; | |
| 267 get_idSpecificStateList(lineId, &idList); | |
| 268 return(menu.disableLineMask[idList.page]); | |
| 269 } | |
| 270 | |
| 264 void resetLineMask(uint32_t lineId) | 271 void resetLineMask(uint32_t lineId) |
| 265 { | 272 { |
| 266 SStateList idList; | 273 SStateList idList; |
| 267 get_idSpecificStateList(lineId, &idList); | 274 get_idSpecificStateList(lineId, &idList); |
| 268 if(idList.page < MAXPAGES) | 275 if(idList.page < MAXPAGES) |
| 589 // } | 596 // } |
| 590 | 597 |
| 591 if((isLoopMode(pSettings->dive_mode)) || (stateUsed->diveSettings.ccrOption == 1)) | 598 if((isLoopMode(pSettings->dive_mode)) || (stateUsed->diveSettings.ccrOption == 1)) |
| 592 { | 599 { |
| 593 tM_add(StMCG); | 600 tM_add(StMCG); |
| 594 tM_add(StMSP); | 601 if((stateUsed->diveSettings.diveMode != DIVEMODE_PSCR) || (actual_menu_content != MENU_SURFACE)) |
| 602 { | |
| 603 tM_add(StMSP); | |
| 604 } | |
| 595 if (actual_menu_content == MENU_SURFACE) /* StMOG is now accessed using StMCG in CCR mode*/ | 605 if (actual_menu_content == MENU_SURFACE) /* StMOG is now accessed using StMCG in CCR mode*/ |
| 596 { | 606 { |
| 597 tM_add(StMXTRA); | 607 tM_add(StMXTRA); |
| 598 tM_addShadow(StMOG); | 608 tM_addShadow(StMOG); |
| 599 } | 609 } |
| 852 | 862 |
| 853 findValidPosition(&page, &line); | 863 findValidPosition(&page, &line); |
| 854 if((page == 0) || (line == 0)) | 864 if((page == 0) || (line == 0)) |
| 855 return; | 865 return; |
| 856 | 866 |
| 867 requestBuzzerActivation(0); | |
| 868 | |
| 857 menu.pageMemoryForNavigation = page; | 869 menu.pageMemoryForNavigation = page; |
| 858 /* new test for 3button design */ | 870 /* new test for 3button design */ |
| 859 if(freshWithFlipPages) | 871 if(freshWithFlipPages) |
| 860 { | 872 { |
| 861 menu.lineMemoryForNavigationForPage[page] = 0; | 873 menu.lineMemoryForNavigationForPage[page] = 0; |
| 929 void unblock_diluent_page(void) | 941 void unblock_diluent_page(void) |
| 930 { | 942 { |
| 931 block_diluent_handler(1); | 943 block_diluent_handler(1); |
| 932 } | 944 } |
| 933 | 945 |
| 946 static void checkLineStatus() | |
| 947 { | |
| 948 switch(get_globalState()) | |
| 949 { | |
| 950 case StMSYS: tMSystem_checkLineStatus(); | |
| 951 break; | |
| 952 case StMXTRA: tMXtra_checkLineStatus(); | |
| 953 break; | |
| 954 default: | |
| 955 break; | |
| 956 } | |
| 957 } | |
| 934 | 958 |
| 935 static void nextPage(void) | 959 static void nextPage(void) |
| 936 { | 960 { |
| 937 uint8_t page, line; | 961 uint8_t page, line; |
| 938 | 962 |
| 947 //menu.lineMemoryForNavigationForPage[page] = line; | 971 //menu.lineMemoryForNavigationForPage[page] = line; |
| 948 menu.lineMemoryForNavigationForPage[page] = 0; | 972 menu.lineMemoryForNavigationForPage[page] = 0; |
| 949 menu.modeFlipPages = 1; | 973 menu.modeFlipPages = 1; |
| 950 | 974 |
| 951 set_globalState_Menu_Page(page); | 975 set_globalState_Menu_Page(page); |
| 976 | |
| 977 checkLineStatus(); /* some lines may be enabled / disabled depending on condition occuring outside the page scope => check if update is necessary */ | |
| 952 | 978 |
| 953 change_CLUT_entry(CLUT_MenuLineSelectedSides, (CLUT_MenuPageGasOC + page - 1)); | 979 change_CLUT_entry(CLUT_MenuLineSelectedSides, (CLUT_MenuPageGasOC + page - 1)); |
| 954 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 1)); | 980 change_CLUT_entry(CLUT_MenuLineSelectedSeperator, (CLUT_MenuPageGasOC + page - 1)); |
| 955 | 981 |
| 956 GFX_SetFrameTop(menu.StartAddressForPage[page]); | 982 GFX_SetFrameTop(menu.StartAddressForPage[page]); |
