end
end
-local function drawfailsafe(t,fb,g,r,b) fb:fill(0,0,0) end
+local function drawfailsafe(t,fb,p) fb:fill(0,0,0) end
function loaddrawfn(name)
local f = loadfile (string.format("draw-%s.lua",name))
local fn = f and f()
if fn
- then return function(t,fb,g,r,b) fn(t,fb,g,r,b) end
+ then return function(t,fb,p) return fn(t,fb,p) end
else return drawfailsafe
end
end
io.write("\n\n") -- XXX? WTF?
io.flush()
end
-doremotedraw = function() remotetmr:start(); dodraw() end
tmr.register(self,period,mode,fn)
tmr.start(self)
end
+function tmr.interval(self, period)
+ self.period = period
+ if self.tqe == nil then return end -- just update interval
+ self:start() -- otherwise, re-schedule
+end
tmr_mt = { __index = tmr }
function tmr.create()
return setmetatable({}, tmr_mt)