comparison Discovery/Src/t7.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 7e714662b93f
children d32901746950
comparison
equal deleted inserted replaced
856:af035b883382 857:ba1aebc6d5af
1417 if(stateUsed->warnings.newPressure) 1417 if(stateUsed->warnings.newPressure)
1418 { 1418 {
1419 count++; 1419 count++;
1420 } 1420 }
1421 #endif 1421 #endif
1422 #ifdef HAVE_DEBUG_WARNINGS
1423 count += stateUsed->warnings.debug;
1424 #endif
1422 return count; 1425 return count;
1423 } 1426 }
1424 1427
1425 1428
1426 uint8_t t7_test_customview_warnings_surface_mode(void) 1429 uint8_t t7_test_customview_warnings_surface_mode(void)
1488 1491
1489 void t7_show_customview_warnings(void) 1492 void t7_show_customview_warnings(void)
1490 { 1493 {
1491 char text[256]; 1494 char text[256];
1492 uint8_t textpointer, lineFree; 1495 uint8_t textpointer, lineFree;
1496 uint8_t index = 0;
1493 1497
1494 text[0] = '\025'; 1498 text[0] = '\025';
1495 text[1] = '\f'; 1499 text[1] = '\f';
1496 text[2] = '\001'; 1500 text[2] = '\001';
1497 text[3] = TXT_Warning; 1501 text[3] = TXT_Warning;
1571 text[textpointer++] = TXT_2BYTE; 1575 text[textpointer++] = TXT_2BYTE;
1572 text[textpointer++] = TXT2BYTE_WarnCO2High; 1576 text[textpointer++] = TXT2BYTE_WarnCO2High;
1573 text[textpointer++] = '\n'; 1577 text[textpointer++] = '\n';
1574 text[textpointer++] = '\r'; 1578 text[textpointer++] = '\r';
1575 text[textpointer] = 0; 1579 text[textpointer] = 0;
1580 lineFree--;
1581 }
1582 #endif
1583 #ifdef HAVE_DEBUG_WARNINGS
1584 if(lineFree && stateUsed->warnings.debug)
1585 {
1586 for(index=0; index<3; index++)
1587 {
1588 if(((stateUsed->lifeData.extIf_sensor_map[index] == SENSOR_DIGO2M) && (((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data[index]))->status & DVO2_FATAL_ERROR)))
1589 {
1590 textpointer += snprintf(&text[textpointer],32,"\001Debug: %lx\n",((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data[index]))->status);
1591 }
1592 }
1576 lineFree--; 1593 lineFree--;
1577 } 1594 }
1578 #endif 1595 #endif
1579 /* 1596 /*
1580 if(lineFree && stateUsed->warnings.lowBattery) 1597 if(lineFree && stateUsed->warnings.lowBattery)