Stop monitor serial when the panel is closed
@@ -35,6 +35,15 @@ class DeviotListener(sublime_plugin.EventListener):
#
pass
+ def on_close(self, view):
+ from .libraries import serial
+ if(serial.serials_in_use):
+ for port_id in serial.serials_in_use:
+ serial_monitor = serial.serial_monitor_dict.get(port_id, None)
+ serial_monitor.stop()
+ serial.serials_in_use.remove(port_id)
+ del serial.serial_monitor_dict[port_id]
+
class DeviotNewSketch(sublime_plugin.WindowCommand):
def run(self):
from .libraries.I18n import I18n
