Fixed compiling

This commit is contained in:
CommanderRedYT
2021-11-14 14:40:38 +01:00
parent bce722eec0
commit b81afae5be
2 changed files with 8 additions and 0 deletions

View File

@ -14,18 +14,22 @@
using namespace espgui;
#ifdef FEATURE_DNS_NS
class ResendDNSRequest : public virtual ActionInterface
{
public:
void triggered() override { dns_lastIpAddress_v4 = "---"; dns_lastIpAddress_v6 = "---"; dns_lastIpAddress_v6_global = "---"; }
};
#endif
WifiSettingsMenu::WifiSettingsMenu()
{
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GENERICWIFISETTINGS>, SwitchScreenAction<GenericWifiSettingsMenu>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATIONWIFISETTINGS>, SwitchScreenAction<StationWifiSettingsMenu>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ACCESSPOINTWIFISETTINGS>, SwitchScreenAction<AccessPointWifiSettingsMenu>>>();
#ifdef FEATURE_DNS_NS
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_RESEND_DNS>, ResendDNSRequest>>();
#endif
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
}

View File

@ -43,6 +43,8 @@ struct StringSettings
std::array<ConfiguredOtaServer, 5> otaServers;
std::string otaServerUrl;
#endif
#ifdef FEATURE_DNS_NS
std::string dns_key;
#endif
};
@ -109,7 +111,9 @@ void StringSettings::executeForEveryCommonSetting(T &&callable)
callable("otaserver", otaServerUrl);
#endif
#ifdef FEATURE_DNS_NS
callable("dnskey", dns_key);
#endif
}
template<typename T>