comparison 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
comparison
equal deleted inserted replaced
950:922ee3d7d2f3 951:e9c37071933b
760 // customview 760 // customview
761 if(stateUsed->warnings.numWarnings) 761 if(stateUsed->warnings.numWarnings)
762 customview_warnings = t3_test_customview_warnings(); 762 customview_warnings = t3_test_customview_warnings();
763 763
764 if(customview_warnings && warning_count_high_time) 764 if(customview_warnings && warning_count_high_time)
765 {
765 t3_basics_show_customview_warnings(&t3c1); 766 t3_basics_show_customview_warnings(&t3c1);
767 }
766 else 768 else
769 {
767 t3_refresh_customview(depth_meter); 770 t3_refresh_customview(depth_meter);
768 771 requestBuzzerActivation(0);
772 }
769 if(stateUsed->warnings.lowBattery) 773 if(stateUsed->warnings.lowBattery)
770 t3_basics_battery_low_customview_extra(&t3r1); //t3c1); 774 t3_basics_battery_low_customview_extra(&t3r1); //t3c1);
771 } 775 }
772 776
773 777
1532 //void t3_show_customview_warnings(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode) 1536 //void t3_show_customview_warnings(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode)
1533 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1) 1537 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1)
1534 { 1538 {
1535 char text[256], textMain[256]; 1539 char text[256], textMain[256];
1536 uint8_t textpointer, textpointerMain, lineFree, more; 1540 uint8_t textpointer, textpointerMain, lineFree, more;
1541 #ifdef HAVE_DEBUG_WARNINGS
1537 uint8_t index = 0; 1542 uint8_t index = 0;
1543 #endif
1538 1544
1539 snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning); 1545 snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning);
1540 GFX_write_string(&FontT42,&t3c1,text,0); 1546 GFX_write_string(&FontT42,&t3c1,text,0);
1541 1547
1542 lineFree = 1; 1548 lineFree = 1;
1678 } 1684 }
1679 if(more) 1685 if(more)
1680 { 1686 {
1681 GFX_write_string(&FontT48,&t3c2,text,0); 1687 GFX_write_string(&FontT48,&t3c2,text,0);
1682 } 1688 }
1689 requestBuzzerActivation(1);
1683 } 1690 }
1684 1691
1685 uint8_t t3_customview_disabled(uint8_t view) 1692 uint8_t t3_customview_disabled(uint8_t view)
1686 { 1693 {
1687 uint8_t i = 0; 1694 uint8_t i = 0;