Je suis à nouveau en train de refactoriser ma procédure de boot, car j'ai toujours des problèmes de mémoire. Cela ne fonctionne pas encore :-(
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- Scripts à charger après le boot pour démarrer le core system
|
||||
|
||||
print("\n boot.lua zf200106.1815 \n")
|
||||
print("\n boot.lua zf200106.2313 \n")
|
||||
|
||||
function boot()
|
||||
if zswitch ~= nill then
|
||||
@@ -9,5 +9,6 @@ function boot()
|
||||
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,10 +1,9 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot2.lua zf200106.1817 \n")
|
||||
print("\n boot2.lua zf200106.2331 \n")
|
||||
|
||||
function boot2()
|
||||
print("boot2 starting...")
|
||||
second_chance=nil initz=nil boot=nil
|
||||
boot2_tmr=nil boot2_tmr1=nil boot2_go=nil
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
@@ -16,20 +15,7 @@ function boot2()
|
||||
|
||||
verbose = true
|
||||
|
||||
boot2_tmr2=tmr.create()
|
||||
boot2_tmr2:alarm(4*1000, tmr.ALARM_SINGLE, function()
|
||||
print("BOOOOUM, y'a plus de boot2 !")
|
||||
boot2=nil boot2_tmr2=nil
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
--tmr.create():alarm(7*1000, tmr.ALARM_SINGLE, function()
|
||||
-- print("MUOOOOB !")
|
||||
-- collectgarbage()
|
||||
-- print(node.heap())
|
||||
--f= "web_ide2.lua" if file.exists(f) then dofile(f) end
|
||||
-- f=nil
|
||||
--end)
|
||||
end)
|
||||
boot2=nil
|
||||
end
|
||||
|
||||
boot2_tmr1=tmr.create()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Petit script pour initaliser la couche WIFI
|
||||
|
||||
function wifi_init()
|
||||
print("\n wifi_init.lua zf200106.1846 \n")
|
||||
print("\n wifi_init.lua zf200106.2322 \n")
|
||||
|
||||
function wifi_init_end()
|
||||
wifi_init1:unregister() zLED=nil i=nil
|
||||
@@ -48,6 +48,11 @@ function wifi_init()
|
||||
gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH)
|
||||
if wifi.sta.getip() == nil then
|
||||
print("Connecting to AP...")
|
||||
|
||||
|
||||
print(node.heap()) collectgarbage() print(node.heap())
|
||||
|
||||
|
||||
i=i+1
|
||||
if i > 15 then
|
||||
print("pas de wifi :-(")
|
||||
@@ -65,5 +70,6 @@ wifi_init()
|
||||
|
||||
--[[
|
||||
file.putcontents("_setup_wifi_", "")
|
||||
boot2_go = true
|
||||
]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user