Load new settings on boot
This commit is contained in:
@ -75,6 +75,7 @@ using namespace std::chrono_literals;
|
|||||||
#include "dnsannounce.h"
|
#include "dnsannounce.h"
|
||||||
#endif
|
#endif
|
||||||
#include "drivingstatistics.h"
|
#include "drivingstatistics.h"
|
||||||
|
#include "newsettings.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::optional<espchrono::millis_clock::time_point> lastWifiUpdate;
|
std::optional<espchrono::millis_clock::time_point> lastWifiUpdate;
|
||||||
@ -119,6 +120,10 @@ extern "C" void app_main()
|
|||||||
initScreen();
|
initScreen();
|
||||||
|
|
||||||
bootLabel.redraw("settings");
|
bootLabel.redraw("settings");
|
||||||
|
|
||||||
|
if (const auto result = configs.init("bobbycar"); result != ESP_OK)
|
||||||
|
ESP_LOGE(TAG, "config_init_settings() failed with %s", esp_err_to_name(result));
|
||||||
|
|
||||||
settings = presets::defaultSettings;
|
settings = presets::defaultSettings;
|
||||||
stringSettings = presets::makeDefaultStringSettings();
|
stringSettings = presets::makeDefaultStringSettings();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user