From 79b63858b9c67f8bd33b8b5ce417702a294f6bc8 Mon Sep 17 00:00:00 2001 From: arendst Date: Mon, 10 Apr 2017 17:33:57 +0200 Subject: [PATCH] v4.1.3 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) --- sonoff/webserver.ino | 6 +++--- sonoff/xdrv_snfsc.ino | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sonoff/webserver.ino b/sonoff/webserver.ino index fcc832b47..aaf9f5dcc 100644 --- a/sonoff/webserver.ino +++ b/sonoff/webserver.ino @@ -268,11 +268,11 @@ const char HTTP_SNS_HUM[] PROGMEM = const char HTTP_SNS_PRESSURE[] PROGMEM = "%s Pressure%s hPa"; const char HTTP_SNS_LIGHT[] PROGMEM = - "%s Light%d of 10"; + "%s Light%d%"; const char HTTP_SNS_NOISE[] PROGMEM = - "%s Noise%d of 10"; + "%s Noise%d%"; const char HTTP_SNS_DUST[] PROGMEM = - "%s Air quality%d of 10"; + "%s Air quality%d%"; const char HTTP_END[] PROGMEM = "" "" diff --git a/sonoff/xdrv_snfsc.ino b/sonoff/xdrv_snfsc.ino index e3f387eea..ef21363f4 100644 --- a/sonoff/xdrv_snfsc.ino +++ b/sonoff/xdrv_snfsc.ino @@ -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");