add network options, IPv6 for mqtt

This commit is contained in:
MichaelDvP
2021-07-08 10:17:50 +02:00
parent 3ea53a8012
commit 2d7449aeba
17 changed files with 180 additions and 27 deletions

View File

@@ -206,6 +206,9 @@ void System::get_settings() {
// ADC
analog_enabled_ = settings.analog_enabled;
// Sysclock
low_clock_ = settings.low_clock;
// Syslog
syslog_enabled_ = settings.syslog_enabled;
syslog_level_ = settings.syslog_level;
@@ -275,6 +278,12 @@ void System::start(uint32_t heap_start) {
// load in all the settings first
get_settings();
#ifndef EMSESP_STANDALONE
if (low_clock_) {
setCpuFrequencyMhz(160);
}
#endif
EMSESP::esp8266React.getNetworkSettingsService()->read([&](NetworkSettings & networkSettings) {
hostname(networkSettings.hostname.c_str()); // sets the hostname
LOG_INFO(F("System name: %s"), hostname().c_str());