mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
fix variable name #234
This commit is contained in:
parent
edc4f103d2
commit
e7777b10c1
4 changed files with 4 additions and 4 deletions
|
|
@ -83,7 +83,7 @@ class ShadeConfigFile : public ConfigFile {
|
||||||
static bool restore(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);
|
static bool restore(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);
|
||||||
bool begin(const char *filename, bool readOnly = false);
|
bool begin(const char *filename, bool readOnly = false);
|
||||||
bool begin(bool readOnly = false);
|
bool begin(bool readOnly = false);
|
||||||
bool save(SomfyShadeController *sofmy);
|
bool save(SomfyShadeController *somfy);
|
||||||
bool backup(SomfyShadeController *somfy);
|
bool backup(SomfyShadeController *somfy);
|
||||||
bool loadFile(SomfyShadeController *somfy, const char *filename = "/shades.cfg");
|
bool loadFile(SomfyShadeController *somfy, const char *filename = "/shades.cfg");
|
||||||
bool restoreFile(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);
|
bool restoreFile(SomfyShadeController *somfy, const char *filename, restore_options_t &opts);
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
6
Web.cpp
6
Web.cpp
|
|
@ -1260,7 +1260,7 @@ void Web::begin() {
|
||||||
SomfyShade* shade = nullptr;
|
SomfyShade* shade = nullptr;
|
||||||
if (method == HTTP_POST || method == HTTP_PUT) {
|
if (method == HTTP_POST || method == HTTP_PUT) {
|
||||||
Serial.println("Adding a shade");
|
Serial.println("Adding a shade");
|
||||||
DynamicJsonDocument doc(512);
|
DynamicJsonDocument doc(1024);
|
||||||
DeserializationError err = deserializeJson(doc, server.arg("plain"));
|
DeserializationError err = deserializeJson(doc, server.arg("plain"));
|
||||||
if (err) {
|
if (err) {
|
||||||
switch (err.code()) {
|
switch (err.code()) {
|
||||||
|
|
@ -1285,7 +1285,7 @@ void Web::begin() {
|
||||||
Serial.println("Adding shade");
|
Serial.println("Adding shade");
|
||||||
shade = somfy.addShade(obj);
|
shade = somfy.addShade(obj);
|
||||||
if (shade) {
|
if (shade) {
|
||||||
DynamicJsonDocument sdoc(512);
|
DynamicJsonDocument sdoc(1024);
|
||||||
JsonObject sobj = sdoc.to<JsonObject>();
|
JsonObject sobj = sdoc.to<JsonObject>();
|
||||||
shade->toJSON(sobj);
|
shade->toJSON(sobj);
|
||||||
serializeJson(sdoc, g_content);
|
serializeJson(sdoc, g_content);
|
||||||
|
|
@ -1299,7 +1299,7 @@ void Web::begin() {
|
||||||
}
|
}
|
||||||
if (shade) {
|
if (shade) {
|
||||||
//Serial.println("Serializing shade");
|
//Serial.println("Serializing shade");
|
||||||
DynamicJsonDocument doc(256);
|
DynamicJsonDocument doc(1024);
|
||||||
JsonObject obj = doc.to<JsonObject>();
|
JsonObject obj = doc.to<JsonObject>();
|
||||||
shade->toJSON(obj);
|
shade->toJSON(obj);
|
||||||
serializeJson(doc, g_content);
|
serializeJson(doc, g_content);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue