comparison Discovery/Src/tMenuEditXtra.c @ 748:be25ab2d902c

Added display of co2 ppm values: Updated output functions for CO2 visualization and added the CO2 measurement to the lower left corner selection field. The sensor provides the value as factor 10 of ppm that's why the data type had to be changed to 32bit if ppm should be available without scaling every time. Cleanup sensor dialog: The HUD battery was displayed by default and some sensor combinations were not displayed correctly. The refresh function was updated to fix these issues.
author Ideenmodellierer
date Sun, 05 Mar 2023 22:14:53 +0100
parents 621265ec3d23
children b6d8a6fbf4fd
comparison
equal deleted inserted replaced
747:df0d43da1614 748:be25ab2d902c
374 char text[32]; 374 char text[32];
375 375
376 snprintf(text,32,"\001%c",TXT_CO2Sensor); 376 snprintf(text,32,"\001%c",TXT_CO2Sensor);
377 write_topline(text); 377 write_topline(text);
378 378
379 snprintf(text,32,"CO2: %d ppm",stateUsed->lifeData.CO2_data.CO2_ppm); 379 snprintf(text,32,"CO2: %ld ppm",stateUsed->lifeData.CO2_data.CO2_ppm);
380 write_label_var( 30, 800, ME_Y_LINE1, &FontT48, text); 380 write_label_var( 30, 800, ME_Y_LINE1, &FontT48, text);
381 381
382 snprintf(text,32,"Signal: %d",stateUsed->lifeData.CO2_data.signalStrength); 382 snprintf(text,32,"Signal: %d",stateUsed->lifeData.CO2_data.signalStrength);
383 write_label_var( 30, 800, ME_Y_LINE2, &FontT48, text); 383 write_label_var( 30, 800, ME_Y_LINE2, &FontT48, text);
384 384