def __init__(self, serial, stopevent, logbytes, mousemove, mousemaxspeed, mouseacceleration, mouseevents, *args): self.serial = serial self.stopevent = stopevent self.logbytes = logbytes self.TriggerEvent = TriggerEventHandler(self, logbytes, mouseevents, *args) self.mousemove = float(mousemove) self.mousemaxspeed = float(mousemaxspeed) self.mouseacceleration = float(mouseacceleration) self.mouseevents = mouseevents self.speed = float(mousemaxspeed) self.accel = float(mouseacceleration) serial.setRTS() super(SerialThread, self).__init__() self.EVENT = threading.Event() self.comBytes = () self.lastDirection = None self.timer = eg.ResettableTimer(self.MouseMoveTimeout) self.receiveQueue = eg.plugins.Mouse.plugin.thread.receiveQueue self.mousebutton = None
def __init__(self, serial, stopevent, logbytes, *args): self.serial = serial self.stopevent = stopevent self.logbytes = logbytes self.TriggerEvent = TriggerEventHandler(*args) serial.setRTS() super(SerialThread, self).__init__() self.EVENT = threading.Event() self.comBytes = []
def __init__(self, prefix, timeout, triggerevent, serial, stopevent): serial.timeout = timeout serial.setRTS() self.prefix = prefix self.TriggerEvent = triggerevent self.serial = serial self.stopevent = stopevent super(SerialThread, self).__init__() self.EVENT = threading.Event() self.comBytes = []