Commit 78430c8d authored by davide's avatar davide

add support for dmled1 status

parent 3a1812be
...@@ -287,6 +287,33 @@ class DomIkaBaseProtocol(object): ...@@ -287,6 +287,33 @@ class DomIkaBaseProtocol(object):
self.core.updateBoardLastStatus(host, port, ptype, src) self.core.updateBoardLastStatus(host, port, ptype, src)
if msg_fwtype==C.FWTYPE_DMLED4:
rawio=list("".join(
["".join(revlist(list(bin(x).replace("0b", "").zfill(8)))) for x in iter(astr[5:9])]))
rawinp=rawio[16:28]
map(lambda x,y: reactor.callLater(0.05,
self.core.setInputStatus, src, host, port, ptype, x, str(int(y))),
xrange(1, 11), iter(rawinp))
larg=len(arg)
self.core.updateBoardLastStatus(host, port, ptype, src)
if msg_fwtype==C.FWTYPE_DMLED:
rawio=list("".join(
["".join(revlist(list(bin(x).replace("0b", "").zfill(8)))) for x in iter(astr[5:9])]))
rawinp=rawio[16:28]
map(lambda x,y: reactor.callLater(0.05,
self.core.setInputStatus, src, host, port, ptype, x, str(int(y))),
xrange(1, 4), iter(rawinp))
larg=len(arg)
self.core.updateBoardLastStatus(host, port, ptype, src)
if msg_fwtype==C.FWTYPE_RELAYMASTERANA: if msg_fwtype==C.FWTYPE_RELAYMASTERANA:
rawio=list("".join( rawio=list("".join(
["".join(revlist(list(bin(x).replace("0b", "").zfill(8)))) for x in iter(astr[5:9])])) ["".join(revlist(list(bin(x).replace("0b", "").zfill(8)))) for x in iter(astr[5:9])]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment