diff Discovery/Src/t3.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 aad1a6b9aaec
children 4e4fbd73e329
line wrap: on
line diff
--- a/Discovery/Src/t3.c	Thu Dec 26 12:03:08 2024 +0100
+++ b/Discovery/Src/t3.c	Sun Dec 29 18:29:56 2024 +0100
@@ -762,10 +762,14 @@
         customview_warnings = t3_test_customview_warnings();
 
     if(customview_warnings && warning_count_high_time)
+    {
         t3_basics_show_customview_warnings(&t3c1);
+    }
     else
+    {
         t3_refresh_customview(depth_meter);
-
+        requestBuzzerActivation(0);
+    }
     if(stateUsed->warnings.lowBattery)
         t3_basics_battery_low_customview_extra(&t3r1); //t3c1);
 }
@@ -1534,7 +1538,9 @@
 {
     char text[256], textMain[256];
     uint8_t textpointer, textpointerMain, lineFree, more;
+#ifdef HAVE_DEBUG_WARNINGS
     uint8_t index = 0;
+#endif
 
     snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning);
     GFX_write_string(&FontT42,&t3c1,text,0);
@@ -1680,6 +1686,7 @@
     {
         GFX_write_string(&FontT48,&t3c2,text,0);
     }
+    requestBuzzerActivation(1);
 }
 
 uint8_t t3_customview_disabled(uint8_t view)