From: Nathaniel Wesley Filardo Date: Sat, 3 Jun 2017 22:11:21 +0000 (-0400) Subject: lamp/linux-draw: tmr unregister also stops X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=2bfee836176510d00e1daed05bda574e5ea70223;p=acmetensortoys-esp-lua_lamp lamp/linux-draw: tmr unregister also stops --- diff --git a/linux-draw.lua b/linux-draw.lua index 33251a4..cceffe1 100644 --- a/linux-draw.lua +++ b/linux-draw.lua @@ -48,6 +48,7 @@ function tmr.stop(self) if self.tqe then tq:dequeue(self.tqe); self.tqe = nil end end function tmr.unregister(self) + self:stop() self.fn = nil end function tmr.register(self,period,mode,fn) @@ -77,6 +78,7 @@ cqc:wrap(function() cq.poll({ pollfd = 0, events = 'r' }) local line = io.read() -- XXX :( if line == nil or line == "" then return end + printerr("line: " .. line) dofile("examples/lamp/lamp-remote.lua")(line) end end)