fix variable name #234

This commit is contained in:
Robert Strouse 2024-01-11 13:04:13 -08:00
parent edc4f103d2
commit e7777b10c1
4 changed files with 4 additions and 4 deletions

View file

@ -83,7 +83,7 @@ class ShadeConfigFile : public ConfigFile {
static bool restore(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);
bool begin(const char *filename, bool readOnly = false);
bool begin(bool readOnly = false);
bool save(SomfyShadeController *sofmy);
bool save(SomfyShadeController *somfy);
bool backup(SomfyShadeController *somfy);
bool loadFile(SomfyShadeController *somfy, const char *filename = "/shades.cfg");
bool restoreFile(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);

Binary file not shown.

Binary file not shown.

View file

@ -1260,7 +1260,7 @@ void Web::begin() {
SomfyShade* shade = nullptr;
if (method == HTTP_POST || method == HTTP_PUT) {
Serial.println("Adding a shade");
DynamicJsonDocument doc(512);
DynamicJsonDocument doc(1024);
DeserializationError err = deserializeJson(doc, server.arg("plain"));
if (err) {
switch (err.code()) {
@ -1285,7 +1285,7 @@ void Web::begin() {
Serial.println("Adding shade");
shade = somfy.addShade(obj);
if (shade) {
DynamicJsonDocument sdoc(512);
DynamicJsonDocument sdoc(1024);
JsonObject sobj = sdoc.to<JsonObject>();
shade->toJSON(sobj);
serializeJson(sdoc, g_content);
@ -1299,7 +1299,7 @@ void Web::begin() {
}
if (shade) {
//Serial.println("Serializing shade");
DynamicJsonDocument doc(256);
DynamicJsonDocument doc(1024);
JsonObject obj = doc.to<JsonObject>();
shade->toJSON(obj);
serializeJson(doc, g_content);