Ouf j'ai bien l'impression que j'ai trouvé ma fuite mémoire dans le socat, maintenant cela fonctionne ceomme je veux
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user