Ejemplo n.º 1
0
    def __init__(self, portname, packet_parser):
        self.controllerstate = Event()
        self.controllerdisconnected = Event()
        self.onerror = Event()

        self.packet_parser = packet_parser

        self.serial = SerialMonitor(serial_port=portname)
        self.serial.packet_recv += self.serialmonitor_packetrecv
        self.serial.disconnected += self.serialmonitor_disconnected
Ejemplo n.º 2
0
    def __init__(self, parent):
        Frame.__init__(self, parent, background="white")

        self.monitor = SerialMonitor()

        self.parent = parent

        self.frame = Frame(parent, relief=RAISED, borderwidth=1)

        self.scrollbar = Scrollbar(parent)

        self.receive_box = Text(parent, width=10, height=10, takefocus=0)
        self.transmit_box = Text(parent, width=10, height=10, takefocus=0)

        self.send_button = Button(parent, text="Send", command=self.send_message)

        self.initUI()
        self.process_serial_input()