diff --git a/include/bmp.h b/include/bmp.h index 5c4f5c4..164d187 100644 --- a/include/bmp.h +++ b/include/bmp.h @@ -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() {