Compare commits

...

2 Commits

Author SHA1 Message Date
2baf53a80c Read temperatures every 10ms 2023-02-22 21:15:11 +01:00
66aa66f844 Read data from load controller
I suspect the load controller at some point hung up because it couldn't
write more data to the PC.
2023-02-22 21:11:31 +01:00
2 changed files with 4 additions and 1 deletions

View File

@ -42,3 +42,6 @@ class Load(QObject):
msb = curr_quants >> 8
lsb = curr_quants & 0xFF
self.dev.write(bytes((msb, lsb)))
r = self.dev.read_all()
read_bytes = 0 if r is None else len(r)
print(f"Read {read_bytes} bytes from load controller")

View File

@ -22,7 +22,7 @@ class Temperatures(QObject):
def run(self):
while True:
time.sleep(0.1)
time.sleep(0.01)
self.dev.read_until(START_OF_TEMPS)
data = self.dev.read(N_SENSORS * 2)
temps = struct.unpack(f">{N_SENSORS}h", data)