]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_lamp/commitdiff
lamp/linux-draw: tmr unregister also stops
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sat, 3 Jun 2017 22:11:21 +0000 (18:11 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Wed, 7 Jun 2017 20:09:13 +0000 (16:09 -0400)
linux-draw.lua

index 33251a4059c5df401225fd0a9e7f7a186a7cc9f9..cceffe11792c9ed60d39b651dba04665b0523618 100644 (file)
@@ -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)