Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditCustom.c @ 1005:85f7e19c6688 GasConsumption
Switch menu position of Buzzer and flipdisplay option:
The Buzzer is an HW option while the flipdisplay is a SW function => exchange the position in order to clean up categories.
| author | Ideenmodellierer |
|---|---|
| date | Sat, 03 May 2025 17:47:53 +0200 |
| parents | 8507a87f6401 |
| children | 5b913cdaa9dc |
comparison
equal
deleted
inserted
replaced
| 1004:efb7d18cc564 | 1005:85f7e19c6688 |
|---|---|
| 55 /* Private function prototypes -----------------------------------------------*/ | 55 /* Private function prototypes -----------------------------------------------*/ |
| 56 void openEdit_Customview(void); | 56 void openEdit_Customview(void); |
| 57 void openEdit_BigScreen(void); | 57 void openEdit_BigScreen(void); |
| 58 void openEdit_MotionCtrl(void); | 58 void openEdit_MotionCtrl(void); |
| 59 void openEdit_ViewPort(void); | 59 void openEdit_ViewPort(void); |
| 60 void openEdit_WarningBuz(void); | 60 void openEdit_FlipDisplay(void); |
| 61 void refresh_Customviews(void); | 61 void refresh_Customviews(void); |
| 62 void setMenuContentStructure(); | 62 void setMenuContentStructure(); |
| 63 char customview_TXT2BYTE_helper(uint8_t customViewId); | 63 char customview_TXT2BYTE_helper(uint8_t customViewId); |
| 64 char customviewBF_TXT2BYTE_helper(uint8_t customViewId); | 64 char customviewBF_TXT2BYTE_helper(uint8_t customViewId); |
| 65 /* Announced function prototypes -----------------------------------------------*/ | 65 /* Announced function prototypes -----------------------------------------------*/ |
| 378 break; | 378 break; |
| 379 #ifdef ENABLE_MOTION_CONTROL | 379 #ifdef ENABLE_MOTION_CONTROL |
| 380 case 5: openEdit_ViewPort(); | 380 case 5: openEdit_ViewPort(); |
| 381 break; | 381 break; |
| 382 #endif | 382 #endif |
| 383 case 5: if(isNewDisplay()) | 383 case 5: |
| 384 { | 384 openEdit_FlipDisplay(); |
| 385 openEdit_WarningBuz(); | 385 break; |
| 386 } | 386 |
| 387 break; | |
| 388 } | 387 } |
| 389 } | 388 } |
| 390 | 389 |
| 391 /* Private functions ---------------------------------------------------------*/ | 390 /* Private functions ---------------------------------------------------------*/ |
| 392 void openEdit_Customview(void) | 391 void openEdit_Customview(void) |
| 473 setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); | 472 setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); |
| 474 setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); | 473 setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); |
| 475 setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); | 474 setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); |
| 476 #endif | 475 #endif |
| 477 } | 476 } |
| 478 void openEdit_WarningBuz(void) | 477 void openEdit_FlipDisplay(void) |
| 479 { | 478 { |
| 480 SSettings *pSettings = settingsGetPointer(); | 479 /* does not work like this resetEnterPressedToStateBeforeButtonAction(); */ |
| 481 | 480 |
| 482 if(pSettings->warningBuzzer == 0) | 481 bool oldValue = settingsGetPointer()->FlipDisplay; |
| 483 { | 482 |
| 484 pSettings->warningBuzzer = 1; | 483 setFlipDisplay(!oldValue); |
| 485 requestBuzzerActivation(REQUEST_BUZZER_ONCE); | 484 |
| 486 } | 485 exitEditWithUpdate(); |
| 487 else | 486 exitMenuEdit_to_Home(); |
| 488 { | |
| 489 pSettings->warningBuzzer = 0; | |
| 490 deactivateBuzzer(); | |
| 491 } | |
| 492 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); | |
| 493 } | 487 } |
| 494 | 488 |
| 495 char customview_TXT2BYTE_helper(uint8_t customViewId) | 489 char customview_TXT2BYTE_helper(uint8_t customViewId) |
| 496 { | 490 { |
| 497 char text = 0; | 491 char text = 0; |
