From 88da81f5a95203301338730c01371d909bc48632 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 26 Jan 2026 09:47:36 -0500 Subject: [PATCH] add decimal place to humi and tmp --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 192df46c..5bc36555 100644 --- a/main.c +++ b/main.c @@ -895,14 +895,14 @@ int main(int argc, char * argv[]) { printf("Temp: %s\n", sensor_string[TEMP]); } else { sensor[PRES] = presP + rnd_float(-1, 1); - sprintf(str_tmp, "%5.0f", presP); + sprintf(str_tmp, "%6.1f", presP); strcpy(sensor_string[PRES], str_tmp); printf("Pres: %s\n", sensor_string[PRES]); sensor[ALT] = altGP; sprintf(str_tmp, "%5.0f", altGP); strcpy(sensor_string[ALT], str_tmp); sensor[HUMI] = humiP + rnd_float(-1, 1); - sprintf(str_tmp, "%3.0f", sensor[HUMI]); + sprintf(str_tmp, "%4.1f", sensor[HUMI]); strcpy(sensor_string[HUMI], str_tmp); sensor[TEMP] = tempS + rnd_float(-0.7, 0.7); sprintf(str_tmp, "%4.1f",sensor[TEMP]);