Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Bixkitts committed Dec 7, 2024
1 parent 40b08fc commit 180ea4b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,16 +606,10 @@ void networkStart()
WiFi.onEvent(NetworkEvent);
if (networkCfg.ethEnable){
initLan();
writeDefaultDeviceId (vars.deviceId, true); // need for mqtt, vpn, mdns, wifi ap and so on
}
else {
writeDefaultDeviceId (vars.deviceId, false); // need for mqtt, vpn, mdns, wifi ap and so on
}

if (networkCfg.wifiEnable)
connectWifi();

writeDeviceId (systemCfg, vpnCfg, mqttCfg);

//}
// if (!systemCfg.disableWeb && ((systemCfg.workMode != WORK_MODE_USB) || systemCfg.keepWeb))
// updWeb = true; // handle web server
Expand Down Expand Up @@ -789,6 +783,9 @@ void setup()

networkStart();

writeDefaultDeviceId(vars.deviceId, networkCfg.ethEnable); // need for mqtt, vpn, mdns, wifi ap and so on
writeDeviceId(systemCfg, vpnCfg, mqttCfg);


/*while (WiFi.status() != WL_CONNECTED && !vars.connectedEther)
{
Expand Down

0 comments on commit 180ea4b

Please sign in to comment.