From 9e3fedb23f4fd8f1d02b71eb006c1fcaa435726a Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Thu, 8 Aug 2019 15:42:24 +0200 Subject: [PATCH] =?UTF-8?q?Corrig=C3=A9=20le=20bug=20du=20timer=20dans=20l?= =?UTF-8?q?e=20btn=5Fled=20du=20workshop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Workshop/181015/btn_led_remote/btn/btn_led.lua | 4 ++-- Workshop/181015/btn_led_remote/btn/initz.lua | 6 +++--- Workshop/181015/btn_led_remote/btn/start_boot.lua | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Workshop/181015/btn_led_remote/btn/btn_led.lua b/Workshop/181015/btn_led_remote/btn/btn_led.lua index cf16ebf..5b7b9f4 100644 --- a/Workshop/181015/btn_led_remote/btn/btn_led.lua +++ b/Workshop/181015/btn_led_remote/btn/btn_led.lua @@ -1,7 +1,7 @@ -- Programme qui allume la led bleue quand on appuie le bouton flash -- zf181011.1749 -print("\n btn_led.lua zf181011.2342 \n") +print("\n btn_led.lua zf190808.1540 \n") zledbleue=0 --led bleue @@ -18,7 +18,7 @@ function zbtn() gpio.write(zledbleue, gpio.HIGH) end print("btn_led: "..zled_state) - disp_send() +-- disp_send() end gpio.trig(zswitch, "both", zbtn) diff --git a/Workshop/181015/btn_led_remote/btn/initz.lua b/Workshop/181015/btn_led_remote/btn/initz.lua index 97951ca..8a34525 100644 --- a/Workshop/181015/btn_led_remote/btn/initz.lua +++ b/Workshop/181015/btn_led_remote/btn/initz.lua @@ -1,7 +1,7 @@ --Script de bootstrap, en appuyant sur le bouton ça démarre start_boot, -- autrement en attendant 8 secondes cela démarre start_boot -print("\n init.lua zf181017.1026\n") +print("\n init.lua zf190808.1537\n") zswitch=3 --switch flash gpio.mode(zswitch, gpio.INT, gpio.PULLUP) @@ -9,14 +9,14 @@ initalarme=tmr.create() function hvbouton() gpio.trig(zswitch, "none") - tmr.unregister(initalarme) + initalarme:unregister() dofile("start_boot.lua") -- dofile("start_job.lua") end gpio.trig(zswitch, "both", hvbouton) -tmr.alarm(initalarme, 8000, tmr.ALARM_SINGLE, function() +initalarme:alarm(8000, tmr.ALARM_SINGLE, function() print("\nStart\n") dofile("start_boot.lua") -- dofile("start_job.lua") diff --git a/Workshop/181015/btn_led_remote/btn/start_boot.lua b/Workshop/181015/btn_led_remote/btn/start_boot.lua index b4754ac..c717cf9 100644 --- a/Workshop/181015/btn_led_remote/btn/start_boot.lua +++ b/Workshop/181015/btn_led_remote/btn/start_boot.lua @@ -1,10 +1,10 @@ -- Scripts à charger au moment du boot afin de pouvoir travailler avec le robot à distance -print("\n start_boot.lua zf181015.1642 \n") +print("\n start_boot.lua zf1908.1539 \n") -dofile("wifi_ap_stop.lua") -dofile("wifi_cli_conf.lua") -dofile("wifi_cli_start.lua") -dofile("web_cli.lua") +--dofile("wifi_ap_stop.lua") +--dofile("wifi_cli_conf.lua") +--dofile("wifi_cli_start.lua") +--dofile("web_cli.lua") dofile("btn_led.lua") -dofile("flash_led_xfois.lua") +--dofile("flash_led_xfois.lua")