wip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot2.lua zf191222.1827 \n")
|
||||
print("\n boot2.lua zf191222.1957 \n")
|
||||
|
||||
function boot2()
|
||||
second_chance=nil initz=nil boot=nil zLED=nil
|
||||
@@ -16,6 +16,13 @@ function boot2()
|
||||
wifi.ap.config({ ssid = ap_ssid.."_"..node_id, pwd = ap_pwd, save=true })
|
||||
ap_ssid=nil ap_pwd=nil
|
||||
f= "web_srv2.lua" if file.exists(f) then dofile(f) end
|
||||
boot2_tmr3=tmr.create()
|
||||
boot2_tmr3:alarm(300*1000, tmr.ALARM_SINGLE, function()
|
||||
print("BOOOOUM, y'a plus de AP WIFI !")
|
||||
wifi.setmode(wifi.STATION,true) boot2_tmr3=nil
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
end)
|
||||
|
||||
|
||||
--f= "0_htu21d.lua" if file.exists(f) then dofile(f) end
|
||||
--f= "0_send_data.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
-- petit script de serveur WEB avec Active Server Page ZYX
|
||||
|
||||
print("\n web_srv2.lua zf191124.2225 \n")
|
||||
|
||||
ztemp=12
|
||||
print("\n web_srv2.lua zf191222.2006 \n")
|
||||
|
||||
-- dû refaire la commande file.readline car elle bug quand ligne longue
|
||||
function zread_line()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Petit script pour initaliser la couche WIFI
|
||||
|
||||
function wifi_init()
|
||||
print("\n wifi_init.lua zf191222.1825 \n")
|
||||
print("\n wifi_init.lua zf191222.2008 \n")
|
||||
-- charge les secrets pour le wifi
|
||||
f= "secrets_wifi.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
@@ -19,21 +19,18 @@ function wifi_init()
|
||||
print("Connecting to AP...")
|
||||
i=i+1
|
||||
if i > 7 then
|
||||
wifi_init1:unregister()
|
||||
i=nil wifi_init1:unregister()
|
||||
print("booum!")
|
||||
enduser_setup.start(function()
|
||||
node.restart()
|
||||
end)
|
||||
end
|
||||
else
|
||||
wifi_init1:unregister() zLED=nil
|
||||
wifi_init1:unregister() zLED=nil i=nil
|
||||
f= "wifi_info.lua" if file.exists(f) then dofile(f) end
|
||||
boot2_go = true
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
wifi_init()
|
||||
|
||||
Reference in New Issue
Block a user