Update: 更新主进程

This commit is contained in:
王立帮
2024-07-30 13:48:48 +08:00
parent bbd9e4ae6b
commit 9937f1de70

View File

@@ -23,12 +23,12 @@ let cloudSoftwareJson = null;
const usbDetection = require('usb-detection');
usbDetection.startMonitoring();
usbDetection.on('change', (device) => {
usbDetection.on('add', (device) => {
setTimeout(() => {
sendCommand({
obj: 'Mixly.Electron.Serial',
func: 'refreshPorts',
args: []
args: [device]
});
}, 1000);
});
@@ -38,7 +38,7 @@ usbDetection.on('remove', (device) => {
sendCommand({
obj: 'Mixly.Electron.Serial',
func: 'refreshPorts',
args: []
args: [device]
});
}, 1000);
});