Merge pull request #242 from toblum/develop

fix #224
This commit is contained in:
Debashish Sahu 2018-10-02 15:41:02 -04:00 committed by GitHub
commit 1821f39bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
*/