Mercurial > public > ostc4
diff 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 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditCustom.c Thu Dec 26 12:03:08 2024 +0100 +++ b/Discovery/Src/tMenuEditCustom.c Sun Dec 29 18:29:56 2024 +0100 @@ -56,6 +56,7 @@ void openEdit_BigScreen(void); void openEdit_MotionCtrl(void); void openEdit_ViewPort(void); +void openEdit_WarningBuz(void); void refresh_Customviews(void); void setMenuContentStructure(); char customview_TXT2BYTE_helper(uint8_t customViewId); @@ -126,7 +127,6 @@ tMenuEdit_refresh_field(StMCustom1_CViewAutoFocusBF); - // field corner return textpointer = 0; text[textpointer++] = TXT_2BYTE; @@ -375,8 +375,14 @@ break; case 4: openEdit_CustomviewDivemode(cv_changelist_BS); break; +#ifdef ENABLE_MOTION_CONTROL case 5: openEdit_ViewPort(); break; +#endif +#ifdef ENABLE_GPIO_V2 + case 5: openEdit_WarningBuz(); + break; +#endif } } @@ -450,6 +456,7 @@ void openEdit_ViewPort(void) { +#ifdef ENABLE_MOTION_CONTROL resetMenuEdit(CLUT_MenuPageCustomView); refresh_ViewPort(); @@ -464,8 +471,22 @@ setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); +#endif } +void openEdit_WarningBuz(void) +{ + SSettings *pSettings = settingsGetPointer(); + if(pSettings->warningBuzzer == 0) + { + pSettings->warningBuzzer = 1; + } + else + { + pSettings->warningBuzzer = 0; + } + exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); +} char customview_TXT2BYTE_helper(uint8_t customViewId) {