Added setPowerState event to EventGate brick

This commit is contained in:
2019-04-17 00:59:15 -04:00
parent bde7781d04
commit cc7e3a90e9
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
--[[
2019-04-17
Ideally the gate should ignore event set power if its input is connected to a wiregroup.
However I don't know how to do that right now so I'm going to leave it for later
]]
return function(gate, argv)
gate.ports[2]:setstate(toboolean(argv[1]))
end