From 9d484b3d4dc99084bd5c62319d23a408e47aaabe Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sun, 21 Jun 2020 19:48:55 +0200 Subject: [PATCH] =?UTF-8?q?Ouf=20j'ai=20bien=20l'impression=20que=20j'ai?= =?UTF-8?q?=20trouv=C3=A9=20ma=20fuite=20m=C3=A9moire=20dans=20le=20socat,?= =?UTF-8?q?=20maintenant=20cela=20fonctionne=20ceomme=20je=20veux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../energy/transfo_courant_clip_1p_1/0_btn_flipflop.lua | 8 ++++---- Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua | 4 ++-- Mesures/energy/transfo_courant_clip_1p_1/0_rtelnet1.lua | 2 +- Mesures/energy/transfo_courant_clip_1p_1/0_tst5_socat.lua | 6 +++--- Mesures/energy/transfo_courant_clip_1p_1/boot.lua | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_btn_flipflop.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_btn_flipflop.lua index 3298c93..ee16a78 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_btn_flipflop.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_btn_flipflop.lua @@ -3,16 +3,16 @@ -- dans la variable b se trouve l'heure à laquelle l'interruption est arrivée, -- il suffit juste alors de lui mettre un petit délai de 300mS -print("\n 0_btn_flipflop.lua zf200611.1919 \n") +print("\n 0_btn_flipflop.lua zf200621.1942 \n") gpio.write(zLED,1) gpio.mode(zLED,gpio.OUTPUT) gpio.mode(zBTN,gpio.INT) -d=tmr.now() +btn_time=tmr.now() function z_btn_led (a,b,c) --print("a: "..a..",b: "..b..",c: "..c) - if b-d > 300*1000 then + if b-btn_time > 300*1000 then if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH) verbose=false @@ -20,7 +20,7 @@ function z_btn_led (a,b,c) gpio.write(zLED, gpio.LOW) tmr.delay(200000) gpio.write(zLED, gpio.HIGH) verbose=true end - d=b + btn_time=b print("verbose:",verbose) end end diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua index 7a6f24b..a01b696 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua @@ -1,5 +1,5 @@ -- Petit script pour faire office de crontab pour les mesures -print("\n 0_cron.lua zf200621.1350 \n") +print("\n 0_cron.lua zf200621.1936 \n") cron1=tmr.create() cron1:alarm(10*1000, tmr.ALARM_AUTO, function() @@ -7,7 +7,7 @@ cron1:alarm(10*1000, tmr.ALARM_AUTO, function() -- if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH) end - -- rt_launch() + rt_launch() -- http_post(influxdb_url,"energy,value=test1_"..yellow_id.." val=1") diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_rtelnet1.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_rtelnet1.lua index 2850169..a95e77f 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_rtelnet1.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_rtelnet1.lua @@ -1,7 +1,7 @@ -- script telnet pour le socat function telnet_listener(socket) - print("\n 0_rtelnet1.lua zf200621.1603 \n") + print("\n 0_rtelnet1.lua zf200621.1943 \n") -- node, table, tmr, uwrite, tostring = -- node, table, tmr, uart.write, tostring diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_tst5_socat.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_tst5_socat.lua index a52593d..015f262 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_tst5_socat.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_tst5_socat.lua @@ -26,14 +26,14 @@ ou sur MAC telnet -rN localhost 23000 ]] -print("\n 0_tst5_socat.lua zf200621.1603 \n") +print("\n 0_tst5_socat.lua zf200621.1944 \n") function rt_connect() print("................rt_connect") collectgarbage() local zlaps=tmr.now()/1000000-ztime_connect - print("durée de retry connect... "..zlaps) - -- if debug_rec~=nil then debug_rec("durée de retry connect... "..zlaps..", "..node.heap()) end + print("time of retry connect... "..zlaps) + -- if debug_rec~=nil then debug_rec("time of retry connect... "..zlaps..", "..node.heap()) end if zlaps>1.5 then local zstr="trying connect to "..console_host..":"..console_port..", "..node.heap() -- if debug_rec~=nil then debug_rec(zstr) end diff --git a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua index 31d880c..3ab146a 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua @@ -1,7 +1,7 @@ -- Scripts à charger après le boot pour démarrer son projet function boot() - print("\n boot.lua zf200621.1232 \n") + print("\n boot.lua zf200621.1939 \n") print("On lance le boot...") collectgarbage() print(node.heap()) local f @@ -29,7 +29,7 @@ function boot() verbose = true print("verbose: ",verbose,"\nle boot est lancé...") gpio.write(zLED, gpio.HIGH) - boot=nil + f=nil boot=nil end -- function debug_rec(zdebug)