comparison Discovery/Src/t3.c @ 857:ba1aebc6d5af Evo_2_23

Developer feature debug warning: The debug warnings are only available to developers who activate the feature via compile switch. After that it is possible to define a condition and a content of a warning which will be shown if a special situation occure (visualized in the main view as already done for other warnings like ppo2). In the first implementation details regarding the error state of the DiveO2 will be shown in case the sensor reports a problem. Feel free to change the implementation in case you want to observe another behavior.
author Ideenmodellierer
date Sun, 05 May 2024 17:27:28 +0200
parents 70092f552f5a
children db92692c014f
comparison
equal deleted inserted replaced
856:af035b883382 857:ba1aebc6d5af
1512 //void t3_show_customview_warnings(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode) 1512 //void t3_show_customview_warnings(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode)
1513 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1) 1513 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1)
1514 { 1514 {
1515 char text[256], textMain[256]; 1515 char text[256], textMain[256];
1516 uint8_t textpointer, textpointerMain, lineFree, more; 1516 uint8_t textpointer, textpointerMain, lineFree, more;
1517 uint8_t index = 0;
1517 1518
1518 snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning); 1519 snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning);
1519 GFX_write_string(&FontT42,&t3c1,text,0); 1520 GFX_write_string(&FontT42,&t3c1,text,0);
1520 1521
1521 lineFree = 1; 1522 lineFree = 1;
1633 text[textpointer++] = '\r'; 1634 text[textpointer++] = '\r';
1634 text[textpointer++] = '\n'; 1635 text[textpointer++] = '\n';
1635 more++; 1636 more++;
1636 } 1637 }
1637 } 1638 }
1638 1639 #ifdef HAVE_DEBUG_WARNINGS
1640 if(lineFree && stateUsed->warnings.debug)
1641 {
1642 for(index=0; index<3; index++)
1643 {
1644 if(((stateUsed->lifeData.extIf_sensor_map[index] == SENSOR_DIGO2M) && (((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data[index]))->status & DVO2_FATAL_ERROR)))
1645 {
1646 textpointer += snprintf(&text[textpointer],32,"\001Debug: %lx\n",((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data[index]))->status);
1647 }
1648 }
1649 lineFree--;
1650 }
1651 #endif
1639 text[textpointer] = 0; 1652 text[textpointer] = 0;
1640 textMain[textpointerMain] = 0; 1653 textMain[textpointerMain] = 0;
1641 1654
1642 if(lineFree == 0) 1655 if(lineFree == 0)
1643 { 1656 {