def add_micropython_plotter(self, name, connection, data_flood_handler): """ Adds a plotter that reads data from a serial connection. """ plotter_pane = PlotterPane() connection.data_received.connect(plotter_pane.process_tty_data) plotter_pane.data_flood.connect(data_flood_handler) self.add_plotter(plotter_pane, name)
def add_micropython_plotter(self, port, name): """ Adds a plotter that reads data from a serial connection. """ if not self.serial: self.open_serial_link(port) plotter_pane = PlotterPane(theme=self.theme) self.data_received.connect(plotter_pane.process_bytes) self.add_plotter(plotter_pane, name)
def add_python3_plotter(self, mode): """ Add a plotter that reads from either the REPL or a running script. Since this function will only be called when either the REPL or a running script are running (but not at the same time), it'll just grab data emitted by the REPL or script via data_received. """ plotter_pane = PlotterPane() self.data_received.connect(plotter_pane.process_bytes) plotter_pane.data_flood.connect(mode.on_data_flood) self.add_plotter(plotter_pane, _('Python3 data tuple'))