mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Update network status after boot when no action was needed
When it already was connected to a WiFi network or it already was a access point.
This commit is contained in:
parent
2d0254dc1e
commit
eedc6d3c6b
10
src/main.lua
10
src/main.lua
@ -73,6 +73,15 @@ local function setupAutoWifiMode()
|
||||
|
||||
-- if the currently active network is client mode and is also visible, do nothing since it will connect automatically further along the boot process
|
||||
if netMode == 'sta' and netName ~= nil and netName ~= "" and findSsidInList(scanList, netName) then
|
||||
-- signin to connect.doodle3d.com
|
||||
local success, output = Signin.signin()
|
||||
if success then
|
||||
log:info("Signed in")
|
||||
else
|
||||
log:info("Signing in failed")
|
||||
end
|
||||
-- report we are connected after signin attempt
|
||||
netconf.setStatus(netconf.CONNECTED,"Connected");
|
||||
return true, "autowifi: no action - existing configuration found for currently wifi visible network (" .. netName .. ")"
|
||||
end
|
||||
|
||||
@ -102,6 +111,7 @@ local function setupAutoWifiMode()
|
||||
return nil, "autowifi: failed to configure as access point with ssid '" .. apSsid .. "' (" .. msg .. ")"
|
||||
end
|
||||
else
|
||||
netconf.setStatus(netconf.CREATED,"Access point created");
|
||||
return true, "autowifi: no action - no known networks found, already in access point mode"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user