debugging code
This commit is contained in:
parent
a9d0698031
commit
c41e244b96
33
voting.lua
33
voting.lua
@ -1,5 +1,38 @@
|
||||
-- The machine requires _two_ touch screens connected: one set to channel "vote", other set to "admin"
|
||||
|
||||
function pp(t)
|
||||
out = ""
|
||||
if type(t) == 'table' then
|
||||
out = "{"
|
||||
for k,v in pairs(t) do
|
||||
out = out .. k .. ": " .. pp(v) .. ", "
|
||||
end
|
||||
out = out .. "}"
|
||||
elseif type(t) == 'string' then
|
||||
out = '"' .. t .. '"'
|
||||
else
|
||||
out = tostring(t)
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
function dbg(s)
|
||||
digiline_send('dbg',
|
||||
{
|
||||
{command = "clear"},
|
||||
{command = "set",
|
||||
width = 16,
|
||||
height = 12,
|
||||
real_coordinates = true,
|
||||
locked = true, -- does not prevent someone from looking at it :(
|
||||
},
|
||||
{command = "addtextarea", name = "blan", default = s, X = 0, Y = 0, W = 16, H = 12},
|
||||
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
-- FIXME: "results" view not opening when there are no votes?
|
||||
-- TODO: title of the vote (what are we voting for?)
|
||||
-- TODO: button to reset results
|
||||
|
Loading…
Reference in New Issue
Block a user