Init display
This commit is contained in:
parent
30dcd9cd23
commit
4178ea1775
@ -1,5 +1,6 @@
|
|||||||
import serial
|
import serial
|
||||||
import logging
|
import logging
|
||||||
|
import time as sleep
|
||||||
|
|
||||||
from prometheus_async.aio import time
|
from prometheus_async.aio import time
|
||||||
|
|
||||||
@ -18,8 +19,16 @@ class SerialNotifier(BarcodeNotifier):
|
|||||||
self.inputDevicePathA = None
|
self.inputDevicePathA = None
|
||||||
self.inputDevicePathB = None
|
self.inputDevicePathB = None
|
||||||
self.usbA = serial.Serial(pathA, 9600, timeout=2)
|
self.usbA = serial.Serial(pathA, 9600, timeout=2)
|
||||||
|
sleep.sleep(3);
|
||||||
|
self.usbA.write(b'Initialize - A')
|
||||||
|
sleep.sleep(1);
|
||||||
|
self.usbA.write(b'1tInitialize - A')
|
||||||
if pathB is not None:
|
if pathB is not None:
|
||||||
self.usbB = serial.Serial(pathB, 9600, timeout=2)
|
self.usbB = serial.Serial(pathB, 9600, timeout=2)
|
||||||
|
sleep.sleep(3);
|
||||||
|
self.usbB.write(b'Initialize - B')
|
||||||
|
sleep.sleep(1);
|
||||||
|
self.usbB.write(b'1tInitialize - B')
|
||||||
|
|
||||||
@time(SERIAL_NOTIFIER_TIME)
|
@time(SERIAL_NOTIFIER_TIME)
|
||||||
async def _send_event(self, event: BarcodeEvent):
|
async def _send_event(self, event: BarcodeEvent):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user