Skip to content

Commit

Permalink
v4.1.3
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
arendst committed Apr 10, 2017
1 parent 8243681 commit 79b6385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions sonoff/webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ const char HTTP_SNS_HUM[] PROGMEM =
const char HTTP_SNS_PRESSURE[] PROGMEM =
"<tr><th>%s Pressure</th><td>%s hPa</td></tr>";
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 =
"<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 =
"<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 =
"</div>"
"</body>"
Expand Down
5 changes: 3 additions & 2 deletions sonoff/xdrv_snfsc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (value[0] > 0) {
for (byte i = 0; i < 5; i++) sc_value[i] = value[i];
sc_value[2] = 11 - sc_value[2]; // Invert light level
sc_value[4] = 11 - sc_value[4]; // Invert dust level
sc_value[2] = (11 - sc_value[2]) * 10; // Invert light level
sc_value[3] *= 10;
sc_value[4] = (11 - sc_value[4]) * 10; // Invert dust level
Serial.write("AT+SEND=ok\e");
} else {
Serial.write("AT+SEND=fail\e");
Expand Down

0 comments on commit 79b6385

Please sign in to comment.