- try to fix the way brightness is processed
This commit is contained in:
Debashish Sahu 2018-10-02 10:06:59 -04:00
parent 6fc7a3a02e
commit 6d8269f99c
3 changed files with 5 additions and 4 deletions

View file

@ -852,9 +852,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
}
if (root.containsKey("brightness")) {
const char * brightness_json = root["brightness"];
uint8_t b = (uint8_t) strtol((const char *) &brightness_json[0], NULL, 10);
brightness = constrain(b, 0, 255);
brightness = constrain((uint8_t) root["brightness"], 0, 255); //fix #224
mode = BRIGHTNESS;
}

View file

@ -1 +1 @@
#define SKETCH_VERSION "2.1.4"
#define SKETCH_VERSION "2.1.5"

View file

@ -17,4 +17,7 @@
*
* 10 Jul 2018 v 2.1.4
* - Fixes measureJson() as pointed in #206
*
* 2 Oct 2018 v 2.1.5
* - Try fixing #224 HA brightness causes reboot
*/