Improvements at cmd interface

This commit is contained in:
2019-07-08 14:27:53 +02:00
parent 25bb774a5d
commit 303f4b50f1
11 changed files with 229 additions and 104 deletions

View File

@ -10,6 +10,7 @@ class ScanRateConsideringQueueFeeder(threading.Thread, AbstractNotificationRecei
self.registers = registers
self.queue = queue
self.delayEvent = threading.Event()
self.daemon = True
def getMinimalScanrate(self):
return min([r.scanRate.total_seconds() for r in self.registers if r.scanRate])
@ -29,7 +30,6 @@ class ScanRateConsideringQueueFeeder(threading.Thread, AbstractNotificationRecei
]
registersToBeHandled.sort(key=lambda x : x.scanRate)
for r in registersToBeHandled:
r.setCommand('r')
self.queue.put(r)
r.enqueued = True
self.delayEvent.wait(self.delay)