comparison Discovery/Src/t3.c @ 828:107c29934671 Evo_2_23

Added CO2 display to T3 Bigfont view: If the CO2 sensor is detected and enabled then the CO2 values will be shown in the PPO2 Sensor view of T3 (middle position, parallel to scrubber timer).
author Ideenmodellierer
date Sun, 05 Nov 2023 20:21:42 +0100
parents 4abfb8a2a435
children 717b460294cd
comparison
equal deleted inserted replaced
827:ffb1036c27c2 828:107c29934671
1293 text[textpointer++] = '\025'; 1293 text[textpointer++] = '\025';
1294 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppO2Sensor_bar[i]); 1294 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppO2Sensor_bar[i]);
1295 } 1295 }
1296 GFX_write_string(&FontT105,tXc1,text,0); 1296 GFX_write_string(&FontT105,tXc1,text,0);
1297 1297
1298 if((pSettings->co2_sensor_active) && isLoopMode(pSettings->dive_mode))
1299 {
1300 snprintf(text,TEXTSIZE,"\032\001\f%c",TXT_CO2Sensor);
1301 GFX_write_string(&FontT42,tXc1,text,0);
1302 textpointer = 0;
1303 if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_WARNING_LEVEL_PPM)
1304 {
1305 text[textpointer++] = '\020';
1306 }
1307 else if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_ALARM_LEVEL_PPM)
1308 {
1309 text[textpointer++] = '\024'; /* yellow */
1310 }
1311 else
1312 {
1313 text[textpointer++] = '\025'; /* red */
1314 }
1315 snprintf(&text[textpointer],TEXTSIZE,"\001%5ld",stateUsed->lifeData.CO2_data.CO2_ppm);
1316 GFX_write_string(&FontT105,tXc1,text,1);
1317 }
1298 1318
1299 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && isLoopMode(pSettings->dive_mode)) 1319 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && isLoopMode(pSettings->dive_mode))
1300 { 1320 {
1301 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime); 1321 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime);
1302 GFX_write_string(&FontT42,tXc1,text,0); 1322 GFX_write_string(&FontT42,tXc1,text,0);