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

Commit

Permalink
Hotfix:
Browse files Browse the repository at this point in the history
  • Loading branch information
toblum committed Jul 5, 2019
1 parent dd05148 commit e10cf44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Arduino/McLighting/McLighting.ino
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void setup() {
sprintf(strip_size, "%d", WS2812FXStripSettings.stripSize);
sprintf(led_pin, "%d", WS2812FXStripSettings.pin);

WiFiManagerParameter custom_strip_size("strip_size", "Number of LEDs", strip_size, 3);
WiFiManagerParameter custom_strip_size("strip_size", "Number of LEDs", strip_size, 5);
WiFiManagerParameter custom_led_pin("led_pin", "LED GPIO", led_pin, 2);

//Local intialization. Once its business is done, there is no need to keep it around
Expand Down
8 changes: 4 additions & 4 deletions Arduino/McLighting/request_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1492,12 +1492,12 @@ bool readStripConfigFS(void) {
configFile.readBytes(buf.get(), size);
DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(4)+300);
DeserializationError error = deserializeJson(jsonBuffer, buf.get());
DBG_OUTPUT_PORT.print("Config: ");
DBG_OUTPUT_PORT.print("neoconfig.json: ");
if (!error) {
DBG_OUTPUT_PORT.println(" Parsed!");
DBG_OUTPUT_PORT.println("Parsed!");
JsonObject json = jsonBuffer.as<JsonObject>();
serializeJson(json, DBG_OUTPUT_PORT);
WS2812FXStripSettings.stripSize = (json["pixel_count"].as<int>()) ? json["pixel_count"].as<int>() : NUMLEDS;
WS2812FXStripSettings.stripSize = (json["pixel_count"].as<uint16_t>()) ? json["pixel_count"].as<uint16_t>() : NUMLEDS;
WS2812FXStripSettings.RGBOrder = json["rgb_order"].as<int>();
WS2812FXStripSettings.pin = json["pin"].as<int>();
updateFS = false;
Expand All @@ -1510,7 +1510,7 @@ bool readStripConfigFS(void) {
DBG_OUTPUT_PORT.println("Failed to open /config.json");
}
} else {
DBG_OUTPUT_PORT.println("Coudnt find config.json");
DBG_OUTPUT_PORT.println("Couldn't find config.json");
}
//end read
updateFS = false;
Expand Down

0 comments on commit e10cf44

Please sign in to comment.