From 7c37e2790bfc9a36c285e7c7920c56ffa6c870e9 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Wed, 12 Jun 2024 13:17:42 +1000 Subject: [PATCH] Auto refresh ports when USB hotplugged --- renderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderer.js b/renderer.js index bd9babd..c2795eb 100644 --- a/renderer.js +++ b/renderer.js @@ -706,7 +706,6 @@ window.onload = function () { refreshBasetunes(); refreshSerialPorts(); checkForUpdates(); - }; $(function(){ @@ -767,4 +766,8 @@ $(function(){ } }); + //Detect devices hotplug + usb.usb.on('attach', refreshSerialPorts); + usb.usb.on('detach', refreshSerialPorts); + }); \ No newline at end of file