Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

fix #224 #242

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Arduino/McLighting/request_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion Arduino/McLighting/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define SKETCH_VERSION "2.1.4"
#define SKETCH_VERSION "2.1.5"
3 changes: 3 additions & 0 deletions Arduino/McLighting/version_info.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/