Files
bobbycar-boardcomputer-firm…/main/presets.cpp
T

64 lines
2.0 KiB
C++
Raw Normal View History

2021-11-01 20:44:57 +01:00
#include "presets.h"
2021-12-02 15:04:56 +01:00
#include "macros_bobbycar.h"
2021-11-01 20:44:57 +01:00
namespace presets {
StringSettings makeDefaultStringSettings()
{
using ConfiguredWifi = StringSettings::ConfiguredWifi;
#ifdef FEATURE_OTA
using ConfiguredOtaServer = StringSettings::ConfiguredOtaServer;
#endif
return {
.wifis = std::array<ConfiguredWifi, 10> {
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} },
ConfiguredWifi { .ssid = {}, .key = {} }
},
#ifdef FEATURE_CLOUD
.cloudUrl = {},
2021-11-21 01:37:51 +01:00
.udpCloudUrl = {},
2021-11-01 20:44:57 +01:00
#endif
#ifdef FEATURE_OTA
.otaUrl = {},
#endif
#ifdef FEATURE_GARAGE
.garageUrl = {},
#endif
#ifdef FEATURE_NTP
.timeServer = "europe.pool.ntp.org",
#endif
#ifdef FEATURE_OTA
.otaServers = std::array<ConfiguredOtaServer, 5> {
ConfiguredOtaServer { .name = {}, .url = {} },
ConfiguredOtaServer { .name = {}, .url = {} },
ConfiguredOtaServer { .name = {}, .url = {} },
ConfiguredOtaServer { .name = {}, .url = {} },
ConfiguredOtaServer { .name = {}, .url = {} },
// ConfiguredOtaServer { .name = {}, .url = {} },
// ConfiguredOtaServer { .name = {}, .url = {} },
// ConfiguredOtaServer { .name = {}, .url = {} },
// ConfiguredOtaServer { .name = {}, .url = {} },
// ConfiguredOtaServer { .name = {}, .url = {} },
},
.otaServerUrl = {},
#endif
2021-12-08 22:50:30 +01:00
#ifdef AP_PASSWORD
2021-12-02 15:04:56 +01:00
.ap_password = STRING(AP_PASSWORD),
2021-12-08 22:50:30 +01:00
#else
.ap_password = "Bobbycar_123",
#endif
#ifdef FEATURE_OTA
.otaServerBranch = {},
#endif
2021-12-09 14:56:06 +01:00
.webserver_password = {},
2021-11-01 20:44:57 +01:00
};
}
} // namespace presets