round temperature precision to 1 digit

This commit is contained in:
Nicu Hodos 2021-12-30 20:30:11 +01:00
parent 185c2a743c
commit 8622090cf8

View File

@ -10,7 +10,9 @@ namespace Bmp {
float pressure;
float altitude;
float readTemp() {
temp = bmp.readTemperature() - 2;
char buf[10];
sprintf(buf, "%.1f", bmp.readTemperature() - 2);
temp = atof(buf);
return temp;
}
void readAll() {