Mercurial > public > ostc4
changeset 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 | ffb1036c27c2 |
children | d5e68cc08f9a |
files | Discovery/Src/t3.c |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/t3.c Sun Nov 05 20:19:08 2023 +0100 +++ b/Discovery/Src/t3.c Sun Nov 05 20:21:42 2023 +0100 @@ -1295,6 +1295,26 @@ } GFX_write_string(&FontT105,tXc1,text,0); + if((pSettings->co2_sensor_active) && isLoopMode(pSettings->dive_mode)) + { + snprintf(text,TEXTSIZE,"\032\001\f%c",TXT_CO2Sensor); + GFX_write_string(&FontT42,tXc1,text,0); + textpointer = 0; + if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_WARNING_LEVEL_PPM) + { + text[textpointer++] = '\020'; + } + else if(stateUsed->lifeData.CO2_data.CO2_ppm < CO2_ALARM_LEVEL_PPM) + { + text[textpointer++] = '\024'; /* yellow */ + } + else + { + text[textpointer++] = '\025'; /* red */ + } + snprintf(&text[textpointer],TEXTSIZE,"\001%5ld",stateUsed->lifeData.CO2_data.CO2_ppm); + GFX_write_string(&FontT105,tXc1,text,1); + } if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && isLoopMode(pSettings->dive_mode)) {