Skip to content

Commit a0e1283

Browse files
authored
Merge pull request #1 from esp-cpp/feature/clear-log-on-reset
feat: clear log string on reset/reopen serial port
2 parents 4ed4df7 + bb55666 commit a0e1283

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main_window.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __init__(self):
5454
self.serial_port_thread = None
5555
self.serial_port = None
5656
self.port = None
57+
self.output_editor = None
5758
self.baudrate = 115200
5859
self.baudrate_values = [
5960
110,
@@ -529,6 +530,9 @@ def __reopen_serial_port__(self):
529530
# if auto clear plot is enabled, clear the plot
530531
if self.auto_clear_plot_on_header_change:
531532
self.__clear_plot__()
533+
if self.output_editor:
534+
# and also clear the output editor
535+
self.output_editor.clear()
532536

533537
# start a thread to open and read from the serial port
534538
self.serial_port_thread = threading.Thread(target = self.__read_serial_port__)

0 commit comments

Comments
 (0)