From e735e06a5e89951269daff642d2ff071a9524784 Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sat, 29 Feb 2020 23:16:06 +0100 Subject: [PATCH] Yeah ! Y'a mon luatool.py qui fonctionne super bien avec le rtelnet, une bonne chose de faite --- Mesures/ADC/ADS1115/00test_cmd.lua | 14 ++++++++++++++ Mesures/ADC/ADS1115/_zremote_cmd.txt | 19 +++++++++++-------- Mesures/ADC/ADS1115/boot.lua | 4 ++-- 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 Mesures/ADC/ADS1115/00test_cmd.lua diff --git a/Mesures/ADC/ADS1115/00test_cmd.lua b/Mesures/ADC/ADS1115/00test_cmd.lua new file mode 100644 index 0000000..41972d0 --- /dev/null +++ b/Mesures/ADC/ADS1115/00test_cmd.lua @@ -0,0 +1,14 @@ +print("getpeer",srv_rt:getpeer()) +print("srv_rt",srv_rt) +srv_rt=nil +rt_connect=nil +telnet_listener=nil +package=nil +d=nil +require=nil +pairs=nil +ipairs=nil +telnet_listener=nil + +rt_retry=3 +rt_connect() diff --git a/Mesures/ADC/ADS1115/_zremote_cmd.txt b/Mesures/ADC/ADS1115/_zremote_cmd.txt index a6ab632..edab240 100644 --- a/Mesures/ADC/ADS1115/_zremote_cmd.txt +++ b/Mesures/ADC/ADS1115/_zremote_cmd.txt @@ -1,5 +1,5 @@ # Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom -# zf200229.2300 +# zf200229.2315 Todo à faire pour ce projet ! @@ -73,7 +73,9 @@ collectgarbage() for k,v in pairs(_G) do print(k,v) end -# commandes lua pour ce projet +################################ +# commandes lua pour ce projet # +################################ ssh ubuntu@www.zuzutest.ml killall -9 socat killall -9 ssh ssh ubuntu@www.zuzutest.ml socat TCP-LISTEN:23047,reuseaddr,fork TCP-LISTEN:23000,reuseaddr,bind=127.0.0.1 & @@ -85,7 +87,9 @@ export zport="23000" telnet -rN $zIP $zport for k,v in pairs(_G) do print(k,v) end ~. +zdyn +./luatool.py --ip $zIP:$zport -f boot.lua ./luatool.py --ip $zIP:$zport -f z_index.html ./luatool.py --ip $zIP:$zport -f 0_send_data.lua @@ -112,8 +116,12 @@ for k,v in pairs(_G) do print(k,v) end dofile("wifi_info.lua") node.restart() -ping -c 10 $zIP +~. +./luatool.py --ip $zIP:$zport -f head.lua +telnet -rN $zIP $zport +dofile("head.lua") +zhead("boot.lua") @@ -196,11 +204,6 @@ ztmr_tst_err:unregister() -~. -./luatool.py --ip $zIP:$zport -f head.lua -telnet -rN $zIP $zport -dofile("head.lua") -zhead("c.lua") ztmr_tst_err:unregister() for k,v in pairs(_G) do print(k,v) end diff --git a/Mesures/ADC/ADS1115/boot.lua b/Mesures/ADC/ADS1115/boot.lua index 26fd65a..52609f5 100644 --- a/Mesures/ADC/ADS1115/boot.lua +++ b/Mesures/ADC/ADS1115/boot.lua @@ -1,6 +1,6 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot.lua zf200229.1737 \n") +print("\n boot.lua zf200229.2303 \n") function boot() verbose = true @@ -12,7 +12,7 @@ function boot() --f="0_send_data.lua" if file.exists(f) then dofile(f) end f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end --- f="0_cron.lua" if file.exists(f) then dofile(f) end + f="0_cron.lua" if file.exists(f) then dofile(f) end f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end --f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end