From 20984878ead1099de49e0b93ce124368abb5dc60 Mon Sep 17 00:00:00 2001 From: RaffaelW Date: Tue, 5 Nov 2024 09:15:45 +0100 Subject: [PATCH] added values in config that i forgot --- src/routes/config.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/routes/config.cpp b/src/routes/config.cpp index f212e07..fe68a5a 100644 --- a/src/routes/config.cpp +++ b/src/routes/config.cpp @@ -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(); @@ -143,10 +143,13 @@ void onPutConfig(AsyncWebServerRequest *request, uint8_t *data, size_t len, size } Direction direction1 = parseDirection(doc["direction-1"].as()); - config.putInt("direction-1", direction1); + config.putUInt("direction-1", direction1); Direction direction2 = parseDirection(doc["direction-2"].as()); - 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();