Skip to content

Commit

Permalink
fix wifi when eth enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Jul 5, 2024
1 parent 886c76a commit 9a36713
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ ImplementSingleton(WifiComponent)

void WifiComponent::updateInternal()
{
#ifndef USE_ETHERNET
#ifdef USE_ETHERNET
if (mode == MODE_ETH)
return;
#endif

long curTime = millis();
if (curTime > lastConnectTime + timeBetweenTries)
{
Expand Down Expand Up @@ -68,7 +72,6 @@ void WifiComponent::updateInternal()
break;
}
}
#endif
}

void WifiComponent::clearInternal()
Expand Down Expand Up @@ -183,7 +186,8 @@ void WifiComponent::WiFiEvent(WiFiEvent_t event)
break;

case ARDUINO_EVENT_ETH_CONNECTED:
setState(Connected);
NDBG("Ethernet connected, getting IP...");
// setState(Connected);
break;

case ARDUINO_EVENT_ETH_GOT_IP:
Expand Down

0 comments on commit 9a36713

Please sign in to comment.