Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class SerialThreadTX(SerialThread):
def run(self):
self.msggen.directdisplay('==== Started TX Thread')
self.tracemanager.start_trace()
while(True):
if self.timeToQuit.isSet():
break
# The maximum TX buffer for the COM-port driver set in w32Serial.py.
serial_bytes = self.port.read(50000000)
if serial_bytes:
pkt = Packet(serial_bytes, self.config)
# Get representation of the packet that can be printed to the
# user.
readable_pkt = pkt.get_readable_repr()
self.do_something_to_packet(readale_pkt, pkt.timestamp...)
self.msggen.displayMessages()
self.port.close()
class SerialThreadTX_final(SerialThreadTX):
def do_something_to_packet(self, parameters...):
pass # ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment