updates to previous fix
* updates to previous fix, solves https://github.com/toblum/McLighting/issues/128
This commit is contained in:
parent
a7cce99be3
commit
ed5e4783be
1 changed files with 4 additions and 3 deletions
|
@ -587,7 +587,8 @@ void setup() {
|
|||
});
|
||||
|
||||
server.on("/get_color", []() {
|
||||
String rgbcolor = String(main_color.red, HEX) + String(main_color.green, HEX) + String(main_color.blue, HEX);
|
||||
char rgbcolor[7];
|
||||
snprintf(rgbcolor, sizeof(rgbcolor), "%02X%02X%02X", main_color.red, main_color.green, main_color.blue);
|
||||
server.send(200, "text/plain", rgbcolor );
|
||||
DBG_OUTPUT_PORT.print("/get_color: ");
|
||||
DBG_OUTPUT_PORT.println(rgbcolor);
|
||||
|
@ -882,7 +883,7 @@ void loop() {
|
|||
}
|
||||
if (mode == SETSPEED) {
|
||||
strip.setSpeed(convertSpeed(ws2812fx_speed));
|
||||
mode = HOLD;
|
||||
mode = BRIGHTNESS;
|
||||
}
|
||||
if (mode == BRIGHTNESS) {
|
||||
strip.setBrightness(brightness);
|
||||
|
|
Loading…
Reference in a new issue