mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
limit WebUI log to 25 if no psram
This commit is contained in:
@@ -361,9 +361,15 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
||||
EMSESP::system_.bool_dashboard(settings.bool_dashboard);
|
||||
|
||||
settings.weblog_level = root["weblog_level"] | EMSESP_DEFAULT_WEBLOG_LEVEL;
|
||||
settings.weblog_buffer = root["weblog_buffer"] | EMSESP_DEFAULT_WEBLOG_BUFFER;
|
||||
settings.weblog_compact = root["weblog_compact"] | EMSESP_DEFAULT_WEBLOG_COMPACT;
|
||||
|
||||
// if no psram limit weblog buffer to 25 messages
|
||||
if (EMSESP::system_.PSram() > 0) {
|
||||
settings.weblog_buffer = root["weblog_buffer"] | EMSESP_DEFAULT_WEBLOG_BUFFER;
|
||||
} else {
|
||||
settings.weblog_buffer = root["weblog_buffer"] | 25;
|
||||
}
|
||||
|
||||
// save the settings
|
||||
if (get_flags() == WebSettings::ChangeFlags::RESTART) {
|
||||
return StateUpdateResult::CHANGED_RESTART; // tell WebUI that a restart is needed
|
||||
|
||||
Reference in New Issue
Block a user