round temperature precision to 1 digit
This commit is contained in:
parent
185c2a743c
commit
8622090cf8
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user