cleanup/fixes of scada common code

This commit is contained in:
Mikayla Fischler
2022-05-10 11:35:52 -04:00
parent 25558df22d
commit cd0d7aa5a3
6 changed files with 41 additions and 37 deletions

View File

@@ -29,11 +29,11 @@ mqueue.new = function ()
local ready = function ()
return #queue ~= 0
end
local _push = function (qtype, message)
insert(queue, { qtype = qtype, message = message })
end
local push_command = function (message)
_push(TYPE.COMMAND, message)
end
@@ -49,7 +49,7 @@ mqueue.new = function ()
local pop = function ()
if #queue > 0 then
return remove(queue, 1)
else
else
return nil
end
end