4.1.3 20170410
* Add user configuarble GPIO to module S20 Socket and Slampher
* Add support for Sonoff SC (#112)
* Set PWM frequency from 1000Hz to 910Hz as used on iTead Sonoff Led
firmware (#122)
* Set Sonoff Led unconfigured floating outputs to 0 to reduce exceptions
due to power supply instabilities (#122)
* Add Access Point Mac Address to Status 11 and Telemetry (#329)
* Fix DS18B20 negative temperature readings (#334)
This commit is contained in:
arendst 2017-04-10 17:33:57 +02:00
parent 824368125b
commit 79b63858b9
2 changed files with 6 additions and 5 deletions

View File

@ -268,11 +268,11 @@ const char HTTP_SNS_HUM[] PROGMEM =
const char HTTP_SNS_PRESSURE[] PROGMEM = const char HTTP_SNS_PRESSURE[] PROGMEM =
"<tr><th>%s Pressure</th><td>%s hPa</td></tr>"; "<tr><th>%s Pressure</th><td>%s hPa</td></tr>";
const char HTTP_SNS_LIGHT[] PROGMEM = const char HTTP_SNS_LIGHT[] PROGMEM =
"<tr><th>%s Light</th><td>%d of 10</td></tr>"; "<tr><th>%s Light</th><td>%d%</td></tr>";
const char HTTP_SNS_NOISE[] PROGMEM = const char HTTP_SNS_NOISE[] PROGMEM =
"<tr><th>%s Noise</th><td>%d of 10</td></tr>"; "<tr><th>%s Noise</th><td>%d%</td></tr>";
const char HTTP_SNS_DUST[] PROGMEM = const char HTTP_SNS_DUST[] PROGMEM =
"<tr><th>%s Air quality</th><td>%d of 10</td></tr>"; "<tr><th>%s Air quality</th><td>%d%</td></tr>";
const char HTTP_END[] PROGMEM = const char HTTP_END[] PROGMEM =
"</div>" "</div>"
"</body>" "</body>"

View File

@ -78,8 +78,9 @@ void sc_rcvstat(char *rcvstat)
for (str = strtok_r(rcvstat, ":", &p); str && i < 5; str = strtok_r(NULL, ":", &p)) value[i++] = atoi(str); for (str = strtok_r(rcvstat, ":", &p); str && i < 5; str = strtok_r(NULL, ":", &p)) value[i++] = atoi(str);
if (value[0] > 0) { if (value[0] > 0) {
for (byte i = 0; i < 5; i++) sc_value[i] = value[i]; for (byte i = 0; i < 5; i++) sc_value[i] = value[i];
sc_value[2] = 11 - sc_value[2]; // Invert light level sc_value[2] = (11 - sc_value[2]) * 10; // Invert light level
sc_value[4] = 11 - sc_value[4]; // Invert dust level sc_value[3] *= 10;
sc_value[4] = (11 - sc_value[4]) * 10; // Invert dust level
Serial.write("AT+SEND=ok\e"); Serial.write("AT+SEND=ok\e");
} else { } else {
Serial.write("AT+SEND=fail\e"); Serial.write("AT+SEND=fail\e");