Skip to content

Commit

Permalink
remove restart network task at hostname change
Browse files Browse the repository at this point in the history
  • Loading branch information
KipK committed Feb 25, 2023
1 parent 12a5b5c commit 2e5e593
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ void config_changed(String name)

if(name == "time_zone") {
config_set_timezone(time_zone);
} else if(name == "hostname") {
// restart network if not in ap mode
if (!net.isWifiModeApOnly()) {
net.end();
net.begin();
}
} else if(name == "flags") {
divert.setMode((config_divert_enabled() && 1 == config_charge_mode()) ? DivertMode::Eco : DivertMode::Normal);
if(mqtt_connected() != config_mqtt_enabled()) {
Expand Down
8 changes: 0 additions & 8 deletions src/net_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ void NetManagerTask::begin()
}
}

void NetManagerTask::end()
{
if(NULL != _instance)
{
MicroTask.stopTask(_instance);
}
}

// -------------------------------------------------------------------
// Start Access Point
// Access point is used for wifi network selection
Expand Down
1 change: 0 additions & 1 deletion src/net_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class NetManagerTask : public MicroTasks::Task
NetManagerTask(LcdTask &lcd, LedManagerTask &led, TimeManager &time);

void begin();
void end();

void wifiScan();

Expand Down

0 comments on commit 2e5e593

Please sign in to comment.