Merge pull request #20 from Thomas--S/lua-controller-fix

Lua Controller: Fix $display and $set_filter not working
This commit is contained in:
Joachim Stolberg 2020-07-26 16:39:03 +02:00 committed by GitHub
commit eac2cef4c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ techage.lua_ctlr.register_action("set_filter", {
slot = tostring(slot or "red")
val = tostring(val or "on")
if not_protected(self.meta.owner, num) then
techage.send_single(self.meta.number, num, "filter", {slot=slot, val=val})
techage.send_single(self.meta.number, num, "port", slot.."="..val)
end
end,
help = " $set_filter(num, slot, val)\n"..
@ -120,7 +120,10 @@ techage.lua_ctlr.register_action("display", {
if row == 0 then -- add line?
techage.send_single(self.meta.number, num, "add", text)
else
techage.send_single(self.meta.number, num, "set", {row = row, str = text})
local payload = safer_lua.Store()
payload.set("row", row)
payload.set("str", text)
techage.send_single(self.meta.number, num, "set", payload)
end
end
end,