round temperature precision to 1 digit
This commit is contained in:
parent
185c2a743c
commit
8622090cf8
@ -10,7 +10,9 @@ namespace Bmp {
|
|||||||
float pressure;
|
float pressure;
|
||||||
float altitude;
|
float altitude;
|
||||||
float readTemp() {
|
float readTemp() {
|
||||||
temp = bmp.readTemperature() - 2;
|
char buf[10];
|
||||||
|
sprintf(buf, "%.1f", bmp.readTemperature() - 2);
|
||||||
|
temp = atof(buf);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
void readAll() {
|
void readAll() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user