Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditCustom.c @ 951:e9c37071933b Evo_2_23
Added vibration warning:
The internal buzzer of the GPIO_V2 may now be used as additional warning notificator. It can be activated using the check button in the customer view menu. The vibration will be active while the warning message is displayed in the dive window. In case the diver is in the menu then the warning will be active for a shorter duration.
author | Ideenmodellierer |
---|---|
date | Sun, 29 Dec 2024 18:29:56 +0100 |
parents | 2225c467f1e9 |
children |
comparison
equal
deleted
inserted
replaced
950:922ee3d7d2f3 | 951:e9c37071933b |
---|---|
54 /* Private function prototypes -----------------------------------------------*/ | 54 /* Private function prototypes -----------------------------------------------*/ |
55 void openEdit_Customview(void); | 55 void openEdit_Customview(void); |
56 void openEdit_BigScreen(void); | 56 void openEdit_BigScreen(void); |
57 void openEdit_MotionCtrl(void); | 57 void openEdit_MotionCtrl(void); |
58 void openEdit_ViewPort(void); | 58 void openEdit_ViewPort(void); |
59 void openEdit_WarningBuz(void); | |
59 void refresh_Customviews(void); | 60 void refresh_Customviews(void); |
60 void setMenuContentStructure(); | 61 void setMenuContentStructure(); |
61 char customview_TXT2BYTE_helper(uint8_t customViewId); | 62 char customview_TXT2BYTE_helper(uint8_t customViewId); |
62 char customviewBF_TXT2BYTE_helper(uint8_t customViewId); | 63 char customviewBF_TXT2BYTE_helper(uint8_t customViewId); |
63 /* Announced function prototypes -----------------------------------------------*/ | 64 /* Announced function prototypes -----------------------------------------------*/ |
123 text[textpointer++] = TXT2BYTE_ExtraDisplay; | 124 text[textpointer++] = TXT2BYTE_ExtraDisplay; |
124 textpointer += snprintf(&text[textpointer],20," %c%c",TXT_2BYTE, TXT2BYTE_Autofocus); | 125 textpointer += snprintf(&text[textpointer],20," %c%c",TXT_2BYTE, TXT2BYTE_Autofocus); |
125 write_label_var( 30, 700, ME_Y_LINE4, &FontT48, text); | 126 write_label_var( 30, 700, ME_Y_LINE4, &FontT48, text); |
126 | 127 |
127 tMenuEdit_refresh_field(StMCustom1_CViewAutoFocusBF); | 128 tMenuEdit_refresh_field(StMCustom1_CViewAutoFocusBF); |
128 | |
129 | 129 |
130 // field corner return | 130 // field corner return |
131 textpointer = 0; | 131 textpointer = 0; |
132 text[textpointer++] = TXT_2BYTE; | 132 text[textpointer++] = TXT_2BYTE; |
133 text[textpointer++] = TXT2BYTE_CornerTimeout; | 133 text[textpointer++] = TXT2BYTE_CornerTimeout; |
373 break; | 373 break; |
374 case 3: openEdit_CustomviewDivemode(cv_changelist); | 374 case 3: openEdit_CustomviewDivemode(cv_changelist); |
375 break; | 375 break; |
376 case 4: openEdit_CustomviewDivemode(cv_changelist_BS); | 376 case 4: openEdit_CustomviewDivemode(cv_changelist_BS); |
377 break; | 377 break; |
378 #ifdef ENABLE_MOTION_CONTROL | |
378 case 5: openEdit_ViewPort(); | 379 case 5: openEdit_ViewPort(); |
379 break; | 380 break; |
381 #endif | |
382 #ifdef ENABLE_GPIO_V2 | |
383 case 5: openEdit_WarningBuz(); | |
384 break; | |
385 #endif | |
380 } | 386 } |
381 } | 387 } |
382 | 388 |
383 /* Private functions ---------------------------------------------------------*/ | 389 /* Private functions ---------------------------------------------------------*/ |
384 void openEdit_Customview(void) | 390 void openEdit_Customview(void) |
448 | 454 |
449 | 455 |
450 | 456 |
451 void openEdit_ViewPort(void) | 457 void openEdit_ViewPort(void) |
452 { | 458 { |
459 #ifdef ENABLE_MOTION_CONTROL | |
453 resetMenuEdit(CLUT_MenuPageCustomView); | 460 resetMenuEdit(CLUT_MenuPageCustomView); |
454 refresh_ViewPort(); | 461 refresh_ViewPort(); |
455 | 462 |
456 write_field_button(StMCustom5_CViewPortCalib, 400, 700, ME_Y_LINE2, &FontT48, ""); | 463 write_field_button(StMCustom5_CViewPortCalib, 400, 700, ME_Y_LINE2, &FontT48, ""); |
457 write_field_button(StMCustom5_CViewPortSpotSize,400, 700, ME_Y_LINE3, &FontT48, ""); | 464 write_field_button(StMCustom5_CViewPortSpotSize,400, 700, ME_Y_LINE3, &FontT48, ""); |
462 setEvent(StMCustom5_CViewPortCalib, (uint32_t)OnAction_CViewPortCalib); | 469 setEvent(StMCustom5_CViewPortCalib, (uint32_t)OnAction_CViewPortCalib); |
463 setEvent(StMCustom5_CViewPortSpotSize, (uint32_t)OnAction_CViewPortSpot); | 470 setEvent(StMCustom5_CViewPortSpotSize, (uint32_t)OnAction_CViewPortSpot); |
464 setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); | 471 setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); |
465 setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); | 472 setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); |
466 setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); | 473 setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); |
467 } | 474 #endif |
468 | 475 } |
476 void openEdit_WarningBuz(void) | |
477 { | |
478 SSettings *pSettings = settingsGetPointer(); | |
479 | |
480 if(pSettings->warningBuzzer == 0) | |
481 { | |
482 pSettings->warningBuzzer = 1; | |
483 } | |
484 else | |
485 { | |
486 pSettings->warningBuzzer = 0; | |
487 } | |
488 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); | |
489 } | |
469 | 490 |
470 char customview_TXT2BYTE_helper(uint8_t customViewId) | 491 char customview_TXT2BYTE_helper(uint8_t customViewId) |
471 { | 492 { |
472 char text = 0; | 493 char text = 0; |
473 | 494 |