Skip to content

Commit

Permalink
added values in config that i forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
RaffaelW committed Nov 5, 2024
1 parent f0204c2 commit 2098487
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/routes/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ void onGetConfig(AsyncWebServerRequest *request)
doc["ip"] = ip.toString();
doc["subnet"] = subnet.toString();
doc["gateway"] = gateway.toString();
doc["universe-1"] = config.getUChar("universe-1", 1);
doc["universe-1"] = config.getUInt("universe-1", 1);
doc["direction-1"] = config.getUInt("direction-1", Output);
doc["universe-2"] = config.getUChar("universe-2", 1);
doc["universe-2"] = config.getUInt("universe-2", 1);
doc["direction-2"] = config.getUInt("direction-2", Input);

config.end();
Expand Down Expand Up @@ -143,10 +143,13 @@ void onPutConfig(AsyncWebServerRequest *request, uint8_t *data, size_t len, size
}

Direction direction1 = parseDirection(doc["direction-1"].as<uint8_t>());
config.putInt("direction-1", direction1);
config.putUInt("direction-1", direction1);

Direction direction2 = parseDirection(doc["direction-2"].as<uint8_t>());
config.putInt("direction-2", direction2);
config.putUInt("direction-2", direction2);

config.putUInt("universe-1", doc["universe-1"]);
config.putUInt("universe-2", doc["universe-2"]);

config.end();

Expand Down

0 comments on commit 2098487

Please sign in to comment.