Cela ne fonctionne pas encore :-(
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
-- Scripts à charger après le boot pour démarrer le core system
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot.lua zf200107.1443 \n")
|
||||
print("\n boot.lua zf200108.1751 \n")
|
||||
|
||||
function boot()
|
||||
|
||||
print("booooooooooot...")
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
initalarme2=tmr.create()
|
||||
initalarme2:alarm(30*1000, tmr.ALARM_SINGLE, function()
|
||||
f= "boot2.lua" if file.exists(f) then dofile(f) end
|
||||
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
|
||||
--f= "0_cron.lua" if file.exists(f) then dofile(f) end
|
||||
--f= "web_ide2.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
f=nil boot=nil
|
||||
verbose = true
|
||||
|
||||
|
||||
|
||||
if zswitch ~= nill then
|
||||
gpio.trig(zswitch, "none") hvbouton=nil zswitch=nil reset_reason=nil
|
||||
end
|
||||
f= "wifi_init.lua" if file.exists(f) then dofile(f) end
|
||||
f= "telnet_srv2.lua" if file.exists(f) then dofile(f) end
|
||||
f= "web_srv2.lua" if file.exists(f) then dofile(f) end
|
||||
second_chance=nil initz=nil f=nil boot=nil
|
||||
end
|
||||
boot()
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
|
||||
ATTENTION: n'existe plus depuis le 190108.1747 !
|
||||
|
||||
|
||||
print("\n boot2.lua zf200106.2331 \n")
|
||||
|
||||
function boot2()
|
||||
|
||||
@@ -1,18 +1,32 @@
|
||||
-- Petit script pour initaliser la couche WIFI
|
||||
|
||||
function wifi_init()
|
||||
print("\n wifi_init.lua zf200107.1530 \n")
|
||||
print("\n wifi_init.lua zf200108.1756 \n")
|
||||
|
||||
function wifi_init_end()
|
||||
wifi_init1:unregister() zLED=nil i=nil
|
||||
f= "wifi_info.lua" if file.exists(f) then dofile(f) end
|
||||
f=nil secrets_wifi=nil cli_pwd=nil cli_ssid=nil
|
||||
wifi_init1=nil wifi_init=nil
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
|
||||
|
||||
f= "telnet_srv2.lua" if file.exists(f) then dofile(f) end
|
||||
f= "web_srv2.lua" if file.exists(f) then dofile(f) end
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
zdelay=1 if reset_reason=="seconde_chance" then zdelay=10 end
|
||||
wifi_init3=tmr.create()
|
||||
wifi_init3:alarm(zdelay*1000, tmr.ALARM_SINGLE, function()
|
||||
f= "boot.lua" if file.exists(f) then dofile(f) end
|
||||
wifi_init3:unregister() wifi_init3=nil wifi_init_end=nil
|
||||
reset_reason=nil zdelay=nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
--boot2_go = true
|
||||
|
||||
wifi_init_end=nil
|
||||
end
|
||||
|
||||
if file.exists("_setup_wifi_") then
|
||||
@@ -36,10 +50,10 @@ function wifi_init()
|
||||
ap_ssid=nil ap_pwd=nil
|
||||
|
||||
wifi_init2=tmr.create()
|
||||
wifi_init2:alarm(60*1000, tmr.ALARM_SINGLE, function()
|
||||
wifi_init2:alarm(60*1000, tmr.ALARM_SINGLE, function()
|
||||
print("BOOOOUM, y'a plus de AP WIFI !")
|
||||
wifi.setmode(wifi.STATION,true) wifi_init2=nil
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
end)
|
||||
|
||||
zLED=4 -- NodeMCU
|
||||
|
||||
Reference in New Issue
Block a user