Merge branch 'arendst/development' into development

This commit is contained in:
reloxx13 2017-12-14 19:15:33 +01:00
commit 5dbb7737cb
3 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -273,7 +273,7 @@ const char HTTP_FORM_CMND[] PROGMEM =
// "<br/><button type='submit'>Send command</button>"
"</form>";
const char HTTP_TABLE100[] PROGMEM =
"<table style='width:100%'>";
"<table width='100%'>";
const char HTTP_COUNTER[] PROGMEM =
"<br/><div id='t' name='t' style='text-align:center;'></div>";
const char HTTP_END[] PROGMEM =
@ -458,7 +458,7 @@ void HandleRoot()
page += F("<tr>");
for (byte idx = 1; idx <= devices_present; idx++) {
snprintf_P(stemp, sizeof(stemp), PSTR(" %d"), idx);
snprintf_P(line, sizeof(line), PSTR("<td style='width:%d%'><button onclick='la(\"?o=%d\");'>%s%s</button></td>"),
snprintf_P(line, sizeof(line), PSTR("<td width='%d%'><button onclick='la(\"?o=%d\");'>%s%s</button></td>"),
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("<td style='width:25%'><button onclick='la(\"?k=%d\");'>%d</button></td>"),
idx, idx);
snprintf_P(line, sizeof(line), PSTR("<td width='25%'><button onclick='la(\"?k=%d\");'>%d</button></td>"), 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("<td style='width:%d%'><div style='text-align:center;font-weight:%s;font-size:%dpx'>%s</div></td>"),
snprintf_P(line, sizeof(line), PSTR("<td style='width:%d{t}%s;font-size:%dpx'>%s</div></td>"), // {t} = %'><div style='text-align:center;font-weight:
snprintf_P(line, sizeof(line), PSTR("<td width='%d{t}%s;font-size:%dpx'>%s</div></td>"), // {t} = %'><div style='text-align:center;font-weight:
100 / devices_present, (bitRead(power, idx -1)) ? "bold" : "normal", fsize, (devices_present < 5) ? GetStateText(bitRead(power, idx -1)) : svalue);
page += line;
}
@ -1480,7 +1479,7 @@ void HandleInformation()
// }1 = </td></tr><tr><th>
// }2 = </th><td>
String func = FPSTR(HTTP_SCRIPT_INFO_BEGIN);
func += F("<table style'width:100%;'><tr><th>");
func += F("<table width='100%'><tr><th>");
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());

View File

@ -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) {