diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 21590a95d..714897f4d 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -12,6 +12,8 @@ * Add support for TSL2561 using adafruit library (#661, #1311) * Add alternative support for SHT3x enabled with define USE_SHT3X_V2 in user_config.h (#1314) * Add alternative support for SHT3x enabled with define USE_SHT3X_V3 in user_config.h (#1314) + * Fix BME680 pressure data (#1356) + * Minor webpage HTML optimizations (#1358) * * 5.10.0 20171201 * Upgrade library ArduinoJson to 5.11.2 diff --git a/sonoff/webserver.ino b/sonoff/webserver.ino index ef17e724b..c7d688ebd 100644 --- a/sonoff/webserver.ino +++ b/sonoff/webserver.ino @@ -273,7 +273,7 @@ const char HTTP_FORM_CMND[] PROGMEM = // "
" ""; const char HTTP_TABLE100[] PROGMEM = - ""; + "
"; const char HTTP_COUNTER[] PROGMEM = "
"; const char HTTP_END[] PROGMEM = @@ -458,7 +458,7 @@ void HandleRoot() page += F(""); for (byte idx = 1; idx <= devices_present; idx++) { snprintf_P(stemp, sizeof(stemp), PSTR(" %d"), idx); - snprintf_P(line, sizeof(line), PSTR(""), + snprintf_P(line, sizeof(line), PSTR(""), 100 / devices_present, idx, (devices_present < 5) ? D_BUTTON_TOGGLE : "", (devices_present > 1) ? stemp : ""); page += line; } @@ -474,8 +474,7 @@ void HandleRoot() } for (byte j = 0; j < 4; j++) { idx++; - snprintf_P(line, sizeof(line), PSTR(""), - idx, idx); + snprintf_P(line, sizeof(line), PSTR(""), idx, idx); page += line; } } @@ -526,7 +525,7 @@ void HandleAjaxStatusRefresh() for (byte idx = 1; idx <= devices_present; idx++) { snprintf_P(svalue, sizeof(svalue), PSTR("%d"), bitRead(power, idx -1)); // snprintf_P(line, sizeof(line), PSTR(""), - snprintf_P(line, sizeof(line), PSTR(""), // {t} = %'>
%s
"), // {t} = %'>
%s
%s
"); + func += F("
"); func += F(D_PROGRAM_VERSION "}2" VERSION_STRING); func += F("}1" D_BUILD_DATE_AND_TIME "}2"); func += GetBuildDateAndTime(); func += F("}1" D_CORE_AND_SDK_VERSION "}2"); func += ESP.getCoreVersion(); func += F("/"); func += String(ESP.getSdkVersion()); diff --git a/sonoff/xsns_09_bmp.ino b/sonoff/xsns_09_bmp.ino index 8f69cb110..742fa71c3 100644 --- a/sonoff/xsns_09_bmp.ino +++ b/sonoff/xsns_09_bmp.ino @@ -426,9 +426,9 @@ void BmpShow(boolean json) #ifdef USE_BME680 case BME680_CHIPID: t = bme680.temperature; - p = bme680.pressure; + p = bme680.pressure / 100.0; h = bme680.humidity; - g = bme680.gas_resistance; + g = bme680.gas_resistance / 1000.0; break; #endif // USE_BME680 } @@ -450,7 +450,7 @@ void BmpShow(boolean json) dtostrfd(h, Settings.flag2.humidity_resolution, humidity); #ifdef USE_BME680 char gas_resistance[10]; - dtostrfd(g / 1000.0, 2, gas_resistance); + dtostrfd(g, 2, gas_resistance); #endif // USE_BME680 if (json) {