diff --git a/Mesures/humidity/bolo/boot2.lua b/Mesures/humidity/bolo/boot2.lua index 654fa1c..51500a4 100644 --- a/Mesures/humidity/bolo/boot2.lua +++ b/Mesures/humidity/bolo/boot2.lua @@ -1,6 +1,6 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot2.lua zf191222.1957 \n") +print("\n boot2.lua zf191222.2252 \n") function boot2() second_chance=nil initz=nil boot=nil zLED=nil @@ -17,7 +17,7 @@ function boot2() 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() + boot2_tmr3:alarm(30*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()) diff --git a/Mesures/humidity/bolo/upload_s.sh b/Mesures/humidity/bolo/upload_s.sh index cf4aa24..befae99 100755 --- a/Mesures/humidity/bolo/upload_s.sh +++ b/Mesures/humidity/bolo/upload_s.sh @@ -1,6 +1,6 @@ #!/bin/bash # Petit script pour télécharger facilement tout le binz via le port série -#zf191221.1126 +#zf191222.2329 # S'il y a des erreurs lors d'un téléchargement, il faut simplement augmenter un peu le délai ! # Il est préférable de télécharger en premier les *gros* fichiers .lua ! @@ -19,10 +19,7 @@ chmod +x luatool.py ./luatool.py --port $luatool_tty -l read -p "Est-ce bien vide ?" -./luatool.py --port $luatool_tty --bar -f z_page4.html -./luatool.py --port $luatool_tty --bar -f z_page3.html -./luatool.py --port $luatool_tty --bar -f z_page2.html -./luatool.py --port $luatool_tty --bar -f z_page1.html +./luatool.py --port $luatool_tty --bar -f wifi_clear.html ./luatool.py --port $luatool_tty --bar -f z_index.html ./luatool.py --port $luatool_tty --bar -f wifi_init.lua ./luatool.py --port $luatool_tty --bar -f wifi_info.lua diff --git a/Mesures/humidity/bolo/web_srv2.lua b/Mesures/humidity/bolo/web_srv2.lua index c768b47..15a8048 100644 --- a/Mesures/humidity/bolo/web_srv2.lua +++ b/Mesures/humidity/bolo/web_srv2.lua @@ -1,6 +1,6 @@ -- petit script de serveur WEB avec Active Server Page ZYX -print("\n web_srv2.lua zf191222.2006 \n") +print("\n web_srv2.lua zf191222.2335 \n") -- dû refaire la commande file.readline car elle bug quand ligne longue function zread_line() @@ -27,7 +27,10 @@ function send_file(zclient, zfilename) file_web = file.open(zfilename, "r") if file_web then repeat - local line = zread_line() + local line = file_web:readline() +-- local line = file_web:read('\n') +-- local line = zread_line() +-- print("hello toto",string.len(line)) if line then if string.find(line, "<%%") then -- print("start lua...") @@ -59,7 +62,7 @@ srv:listen(80, function(conn) conn:on("receive", function(client, request) _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP") - print("zrequest: \n---\n"..request.."---") +-- print("zrequest: \n---\n"..request.."---") -- print("method: ", method) print("path: ", path) print("vars: ", vars) diff --git a/Mesures/humidity/bolo/z_page4.html b/Mesures/humidity/bolo/wifi_clear.html similarity index 75% rename from Mesures/humidity/bolo/z_page4.html rename to Mesures/humidity/bolo/wifi_clear.html index 49f7086..57fb2dd 100644 --- a/Mesures/humidity/bolo/z_page4.html +++ b/Mesures/humidity/bolo/wifi_clear.html @@ -3,24 +3,34 @@
-