local function drawfailsafe(t,fb,g,r,b) fb:fill(0,0,0) end
function loaddrawfn(name)
- local f = loadfile (string.format("examples/lamp/draw-%s.lua",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
cq = require "cqueues"
local cqs = require "cqueues.signal"
cqc = cq.new()
-package.loaded["fifo"] = dofile("fifo/fifo.lua") -- ick, but hey, it works!
+package.loaded["fifo"] = require "fifo/fifo"
function printerr(...)
local s = "", i, v
-- laying around, and they might accumulate without bound. So we have a
-- notion of which callback was registered last and the others turn into
-- NOPs by comparing the current callback against the value we closed over.
-tq = dofile("tq/tq.lua")(nil)
+tq = require("tq/tq")(nil)
tq.__emu_lastcb = 0
tq.now = function() return cq.monotime() * 1000000 end
tq.arm = function(self,t,et)
local line = io.read() -- XXX :(
if line == nil or line == "" then return end
printerr("line: " .. line)
- dofile("examples/lamp/lamp-remote.lua")(line)
+ dofile("lamp-remote.lua")(line)
end
end)
io.stdout:setvbuf("no")