summaryrefslogtreecommitdiff
path: root/interface/dummy.py
diff options
context:
space:
mode:
authorBen Connors <benconnors@outlook.com>2019-11-14 14:22:45 -0500
committerBen Connors <benconnors@outlook.com>2019-11-14 14:22:45 -0500
commit20da984d08c414f49f6a64cd3d68be68fd0246bb (patch)
tree2bf39de13c03e5a192f90bd3e46e5767e52c8f69 /interface/dummy.py
parente49202ba923b9a7f9171df1967652320222b69db (diff)
Some bugfixes
Diffstat (limited to 'interface/dummy.py')
-rw-r--r--interface/dummy.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/interface/dummy.py b/interface/dummy.py
index ab03ae0..901722f 100644
--- a/interface/dummy.py
+++ b/interface/dummy.py
@@ -5,13 +5,22 @@ import socket
import threading
class DummyOutput:
+ name = "Dummy"
+
def set_values(self, values):
v = {c.address[1]: v for c, v in values.items()}
with self._lock:
self.s.sendall(array.array('B', ((0 if i not in v else v[i]) for i in range(64))).tobytes())
+ @property
+ def ok(self):
+ return True
+
+ @property
+ def status(self):
+ return "Everything's good"
+
def __init__(self):
self._lock = threading.RLock()
self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.s.connect(("", 6969))
-