comparison Discovery/Src/t7.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 c6b858f2e025
children 4e4fbd73e329
comparison
equal deleted inserted replaced
950:922ee3d7d2f3 951:e9c37071933b
1500 1500
1501 void t7_show_customview_warnings(void) 1501 void t7_show_customview_warnings(void)
1502 { 1502 {
1503 char text[256]; 1503 char text[256];
1504 uint8_t textpointer, lineFree; 1504 uint8_t textpointer, lineFree;
1505 #ifdef HAVE_DEBUG_WARNINGS
1505 uint8_t index = 0; 1506 uint8_t index = 0;
1507 #endif
1506 1508
1507 text[0] = '\025'; 1509 text[0] = '\025';
1508 text[1] = '\f'; 1510 text[1] = '\f';
1509 text[2] = '\001'; 1511 text[2] = '\001';
1510 text[3] = TXT_Warning; 1512 text[3] = TXT_Warning;
1612 text[textpointer] = 0; 1614 text[textpointer] = 0;
1613 lineFree--; 1615 lineFree--;
1614 } 1616 }
1615 */ 1617 */
1616 GFX_write_string(&FontT48,&t7cW,text,1); 1618 GFX_write_string(&FontT48,&t7cW,text,1);
1619 requestBuzzerActivation(1);
1617 } 1620 }
1618 1621
1619 1622
1620 void t7_set_customview_to_primary(void) 1623 void t7_set_customview_to_primary(void)
1621 { 1624 {
3215 3218
3216 background.pointer = 0; 3219 background.pointer = 0;
3217 if(customview_warnings && warning_count_high_time) 3220 if(customview_warnings && warning_count_high_time)
3218 t7_show_customview_warnings(); 3221 t7_show_customview_warnings();
3219 else 3222 else
3223 {
3220 t7_refresh_customview(); 3224 t7_refresh_customview();
3225 requestBuzzerActivation(0);
3226 }
3221 3227
3222 /* the frame */ 3228 /* the frame */
3223 draw_frame(1,1, CLUT_DIVE_pluginbox, CLUT_DIVE_FieldSeperatorLines); 3229 draw_frame(1,1, CLUT_DIVE_pluginbox, CLUT_DIVE_FieldSeperatorLines);
3224 } 3230 }
3225 3231