Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ You can adjust each property in the JSON object according to your preferences. I
| `HUM_COL` | string/array of ints | Text color of the humidity app. Use 0 for global text color. | RGB array or hex color | N/A |
| `BAT_COL` | string/array of ints | Text color of the battery app. Use 0 for global text color. | RGB array or hex color | N/A |
| `SSPEED` | integer | Scroll speed modification. | Percentage of original scroll speed | 100 |
| `TIM` | boolean | Enable or disable the native time app (requires reboot). | `true`/`false` | true |
| `DAT` | boolean | Enable or disable the native date app (requires reboot). | `true`/`false` | true |
| `HUM` | boolean | Enable or disable the native humidity app (requires reboot). | `true`/`false` | true |
| `TEMP` | boolean | Enable or disable the native temperature app (requires reboot). | `true`/`false` | true |
| `BAT` | boolean | Enable or disable the native battery app (requires reboot). | `true`/`false` | true |
| `TIM` | boolean | Enable or disable the native time app. | `true`/`false` | true |
| `DAT` | boolean | Enable or disable the native date app. | `true`/`false` | true |
| `HUM` | boolean | Enable or disable the native humidity app. | `true`/`false` | true |
| `TEMP` | boolean | Enable or disable the native temperature app. | `true`/`false` | true |
| `BAT` | boolean | Enable or disable the native battery app. | `true`/`false` | true |
| `MATP` | boolean | Enable or disable the matrix. Similar to `power` endpoint but without the animation. | `true`/`false` | true |
| `VOL` | integer | Allows to set the volume of the buzzer and DFplayer. | 0–30 | true |
| `OVERLAY` | string | Sets a global effect overlay (cannot be used with app specific overlays). | Varies (see below) | N/A |
Expand Down
3 changes: 3 additions & 0 deletions src/DisplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,7 @@ void DisplayManager_::setNewSettings(const char *json)
UPPERCASE_LETTERS = doc.containsKey("UPPERCASE") ? doc["UPPERCASE"].as<bool>() : UPPERCASE_LETTERS;
SHOW_WEEKDAY = doc.containsKey("WD") ? doc["WD"].as<bool>() : SHOW_WEEKDAY;
BLOCK_NAVIGATION = doc.containsKey("BLOCKN") ? doc["BLOCKN"].as<bool>() : BLOCK_NAVIGATION;
bool nativeAppsChanged = doc.containsKey("TIM") || doc.containsKey("DAT") || doc.containsKey("HUM") || doc.containsKey("TEMP") || doc.containsKey("BAT");
SHOW_TIME = doc.containsKey("TIM") ? doc["TIM"].as<bool>() : SHOW_TIME;
SHOW_DATE = doc.containsKey("DAT") ? doc["DAT"].as<bool>() : SHOW_DATE;
SHOW_HUM = doc.containsKey("HUM") ? doc["HUM"].as<bool>() : SHOW_HUM;
Expand Down Expand Up @@ -2249,6 +2250,8 @@ void DisplayManager_::setNewSettings(const char *json)
}
doc.clear();
applyAllSettings();
if (nativeAppsChanged)
loadNativeApps();
saveSettings();
if (DEBUG_MODE)
DEBUG_PRINTLN("Settings loaded");
Expand Down