Skip to content

Commit

Permalink
FS_Buffer to 8k for customizations
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jul 12, 2022
1 parent 39feb25 commit fc3224c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/framework/StatefulService.h
Expand Up @@ -14,7 +14,7 @@
#endif

#ifndef FS_BUFFER_SIZE
#define FS_BUFFER_SIZE 4096
#define FS_BUFFER_SIZE 8192
#endif

enum class StateUpdateResult {
Expand Down
2 changes: 1 addition & 1 deletion lib_standalone/StatefulService.h
Expand Up @@ -12,7 +12,7 @@
#endif

#ifndef FS_BUFFER_SIZE
#define FS_BUFFER_SIZE 4096
#define FS_BUFFER_SIZE 8192
#endif

enum class StateUpdateResult {
Expand Down
2 changes: 1 addition & 1 deletion src/system.cpp
Expand Up @@ -940,7 +940,7 @@ void System::extractSettings(const char * filename, const char * section, JsonOb
#ifndef EMSESP_STANDALONE
File settingsFile = LittleFS.open(filename);
if (settingsFile) {
DynamicJsonDocument jsonDocument = DynamicJsonDocument(EMSESP_JSON_SIZE_XLARGE_DYN);
DynamicJsonDocument jsonDocument = DynamicJsonDocument(FS_BUFFER_SIZE);
DeserializationError error = deserializeJson(jsonDocument, settingsFile);
if (error == DeserializationError::Ok && jsonDocument.is<JsonObject>()) {
JsonObject jsonObject = jsonDocument.as<JsonObject>();
Expand Down
4 changes: 2 additions & 2 deletions src/web/WebAPIService.cpp
Expand Up @@ -158,7 +158,7 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {
}

void WebAPIService::getSettings(AsyncWebServerRequest * request) {
auto * response = new AsyncJsonResponse(false, EMSESP_JSON_SIZE_XLARGE_DYN);
auto * response = new AsyncJsonResponse(false, FS_BUFFER_SIZE);
JsonObject root = response->getRoot();

root["type"] = "settings";
Expand All @@ -179,7 +179,7 @@ void WebAPIService::getSettings(AsyncWebServerRequest * request) {
}

void WebAPIService::getCustomizations(AsyncWebServerRequest * request) {
auto * response = new AsyncJsonResponse(false, EMSESP_JSON_SIZE_XLARGE_DYN);
auto * response = new AsyncJsonResponse(false, FS_BUFFER_SIZE);
JsonObject root = response->getRoot();

root["type"] = "customizations";
Expand Down

0 comments on commit fc3224c

Please sign in to comment.