Last active
August 29, 2015 14:01
-
-
Save vindolin/208bf7bce63350fb72f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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