Version Bump to 2.2.4
Version Bump to 2.2.4
This commit is contained in:
@@ -1708,17 +1708,17 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
||||
strcpy(HOSTNAME, root["hostname"]);
|
||||
#if defined(ENABLE_MQTT)
|
||||
strcpy(mqtt_host, root["mqtt_host"]);
|
||||
mqtt_port = (uint16_t) root["mqtt_port"];
|
||||
mqtt_port = root["mqtt_port"].as<uint16_t>();
|
||||
strcpy(mqtt_user, root["mqtt_user"]);
|
||||
strcpy(mqtt_pass, root["mqtt_pass"]);
|
||||
#endif
|
||||
WS2812FXStripSettings.stripSize = constrain ((uint16_t) root["ws_cnt"], 1, MAXLEDS);
|
||||
WS2812FXStripSettings.stripSize = constrain(root["ws_cnt"].as<uint16_t>(), 1, MAXLEDS);
|
||||
char tmp_rgbOrder[5];
|
||||
strcpy(tmp_rgbOrder, root["ws_rgbo"]);
|
||||
checkRGBOrder(tmp_rgbOrder);
|
||||
uint8_t temp_pin;
|
||||
checkPin((uint8_t) root["ws_pin"]);
|
||||
WS2812FXStripSettings.fxoptions = ((constrain((uint8_t) root["ws_fxopt"], 0, 255)>>1)<<1);
|
||||
checkPin((uint8_t) root["ws_pin"]);
|
||||
WS2812FXStripSettings.fxoptions = ((constrain(root["ws_fxopt"].as<uint8_t>(), 0, 255) >> 1) << 1);
|
||||
jsonBuffer.clear();
|
||||
return true;
|
||||
} else {
|
||||
@@ -1785,22 +1785,22 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
||||
JsonObject root = jsonBuffer.as<JsonObject>();
|
||||
serializeJson(root, DBG_OUTPUT_PORT);
|
||||
DBG_OUTPUT_PORT.println("");
|
||||
mode = static_cast<MODE>((int) root["mode"]);
|
||||
ws2812fx_mode = root["ws2812fx_mode"];
|
||||
ws2812fx_speed = root["speed"];
|
||||
brightness = root["brightness"];
|
||||
main_color.white = (uint8_t) root["color"][0];
|
||||
main_color.red = (uint8_t) root["color"][1];
|
||||
main_color.green = (uint8_t) root["color"][2];
|
||||
main_color.blue = (uint8_t) root["color"][3];
|
||||
back_color.white = (uint8_t) root["color"][4];
|
||||
back_color.red = (uint8_t) root["color"][5];
|
||||
back_color.green = (uint8_t) root["color"][6];
|
||||
back_color.blue = (uint8_t) root["color"][7];
|
||||
xtra_color.white = (uint8_t) root["color"][8];
|
||||
xtra_color.red = (uint8_t) root["color"][9];
|
||||
xtra_color.green = (uint8_t) root["color"][10];
|
||||
xtra_color.blue = (uint8_t) root["color"][11];
|
||||
mode = static_cast<MODE>(root["mode"].as<uint8_t>());
|
||||
ws2812fx_mode = root["ws2812fx_mode"].as<uint8_t>();
|
||||
ws2812fx_speed = root["speed"].as<uint8_t>();
|
||||
brightness = root["brightness"];
|
||||
main_color.white = root["color"][0].as<uint8_t>();
|
||||
main_color.red = root["color"][1].as<uint8_t>();
|
||||
main_color.green = root["color"][2].as<uint8_t>();
|
||||
main_color.blue = root["color"][3].as<uint8_t>();
|
||||
back_color.white = root["color"][4].as<uint8_t>();
|
||||
back_color.red = root["color"][5].as<uint8_t>();
|
||||
back_color.green = root["color"][6].as<uint8_t>();
|
||||
back_color.blue = root["color"][7].as<uint8_t>();
|
||||
xtra_color.white = root["color"][8].as<uint8_t>();
|
||||
xtra_color.red = root["color"][9].as<uint8_t>();
|
||||
xtra_color.green = root["color"][10].as<uint8_t>();
|
||||
xtra_color.blue = root["color"][11].as<uint8_t>();
|
||||
convertColors();
|
||||
jsonBuffer.clear();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user