Skip to content

Commit

Permalink
Trust WiFiManager to handle WiFi
Browse files Browse the repository at this point in the history
Looks like manually setting `WiFi.mode()` made MK6 devices a lot less stable to connect initially.
  • Loading branch information
lptr committed Feb 1, 2024
1 parent ea6615e commit 1a8da6b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/kernel/drivers/WiFiDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ namespace farmhub::kernel::drivers {
class WiFiDriver {
public:
WiFiDriver(StateSource& networkReady, StateSource& configPortalRunning, const String& hostname) {
WiFi.mode(WIFI_STA);
WiFi.setHostname(hostname.c_str());
wifiManager.setHostname(hostname.c_str());
wifiManager.setConfigPortalTimeout(180);
wifiManager.setAPCallback([this, &configPortalRunning](WiFiManager* wifiManager) {
Expand Down

0 comments on commit 1a8da6b

Please sign in to comment.