Commencé à refactorisé la procédure de configuration du wifi quand il se trouve sur un autre AP
This commit is contained in:
@@ -1,20 +1,25 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot2.lua zf191221.1554 \n")
|
||||
print("\n boot2.lua zf191222.1827 \n")
|
||||
|
||||
function boot2()
|
||||
second_chance=nil initz=nil boot=nil zLED=nil
|
||||
boot2_tmr=nil secrets_wifi=nil wifi_init=nil
|
||||
cli_ssid=nil cli_pwd=nil ap_ssid=nil ap_pwd=nil
|
||||
cli_ssid=nil cli_pwd=nil
|
||||
boot2_tmr1=nil wifi_init1=nil wifi_info=nil boot2_go=nil
|
||||
|
||||
f= "secrets_project.lua" if file.exists(f) then dofile(f) end
|
||||
f= "set_time.lua" if file.exists(f) then dofile(f) end
|
||||
collectgarbage()
|
||||
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
|
||||
|
||||
wifi.setmode(wifi.STATIONAP,true)
|
||||
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
|
||||
|
||||
--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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user