From 188f93b374dee768e74377579c83ed0a45251000 Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Fri, 21 Feb 2020 12:04:21 +0100 Subject: [PATCH] =?UTF-8?q?Yeah,=20mon=20client=20zdyndns=20commence=20enf?= =?UTF-8?q?in=20=C3=A0=20fonctionner,=20maintenant=20il=20faut=20nettoyer?= =?UTF-8?q?=20tout=20le=20code=20de=20debug=20;-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mesures/ADC/ADS1115/0_tst3_socat.lua | 3 ++- Mesures/ADC/ADS1115/0_zdyndns.lua | 12 ++++++------ Mesures/ADC/ADS1115/boot.lua | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Mesures/ADC/ADS1115/0_tst3_socat.lua b/Mesures/ADC/ADS1115/0_tst3_socat.lua index 435a738..1592c86 100644 --- a/Mesures/ADC/ADS1115/0_tst3_socat.lua +++ b/Mesures/ADC/ADS1115/0_tst3_socat.lua @@ -10,7 +10,7 @@ socat TCP-LISTEN:23047,reuseaddr,fork TCP-LISTEN:24047,reuseaddr,bind=127.0.0.1 telnet -r localhost 24047 ]] -print("\n 0_tst3_socat.lua zf200219.1621 \n") +print("\n 0_tst3_socat.lua zf200220.0926 \n") local node, table, tmr, wifi, uwrite, tostring = node, table, tmr, wifi, uart.write, tostring @@ -135,6 +135,7 @@ rt_connect() --[[ +tmr_socat1:unregister() for k,v in pairs(_G) do print(k,v) end print(srv_rt:getpeer()) diff --git a/Mesures/ADC/ADS1115/0_zdyndns.lua b/Mesures/ADC/ADS1115/0_zdyndns.lua index ffb65e7..a18896d 100644 --- a/Mesures/ADC/ADS1115/0_zdyndns.lua +++ b/Mesures/ADC/ADS1115/0_zdyndns.lua @@ -1,12 +1,11 @@ -- Petit script pour s'inregistrer sur zdyndns function send_zdyndns() - if verbose then print("\n 0_zdyndns.lua zf200220.0944 \n") end + if verbose then print("\n 0_zdyndns.lua zf200221.1202 \n") end zip = wifi.sta.getip() - zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip - if verbose then print("zdyndns_str: "..zdyndns_str) end - + zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip.."\n" + if verbose then print("zdyndns_str: /"..zdyndns_str.."/") end srv_zdyndns = net.createConnection(net.TCP, 0) @@ -18,17 +17,18 @@ function send_zdyndns() srv_zdyndns:on("connection", function(sck) print("connected...") print("sending...") + print("server: ",zdyndns_port,zdyndns_host) + if verbose then print("zdyndns_str: /"..zdyndns_str.."/") end sck:send(zdyndns_str, function(sk) sk:close() print("close...") end) + zdyndns_str=nil zip=nil send_zdyndns=nil end) srv_zdyndns:connect(zdyndns_port,zdyndns_host) - - zdyndns_str=nil zip=nil send_zdyndns=nil if verbose then print(node.heap()) end collectgarbage() if verbose then print(node.heap()) end diff --git a/Mesures/ADC/ADS1115/boot.lua b/Mesures/ADC/ADS1115/boot.lua index 3a68f1b..90334f3 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 zf200217.0423 \n") +print("\n boot.lua zf200221.1133 \n") function boot() verbose = true @@ -13,7 +13,7 @@ function boot() --f="0_cron.lua" if file.exists(f) then dofile(f) end f="0_btn_flipflop.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 --f = "web_ide2.lua" if file.exists(f) then dofile(f) end print("verbose:",verbose)