feat(arduino-shell): 在前端过滤掉 serial1/undefined 错误提示

This commit is contained in:
yczpf2019
2026-01-24 21:47:45 +08:00
parent 44b02f4781
commit 708bdc6bf0

View File

@@ -75,6 +75,16 @@ goog.loadJs('web', () => {
} catch (error) {
Debug.error(error);
}
// 过滤掉无关紧要的端口错误(因为已经在本地完成上传了)
if (typeof data === 'string' && (
data.includes('cannot open serial1') ||
data.includes('cannot open device "undefined"') ||
data.includes('No such file or directory, cannot open')
)) {
return;
}
statusBarTerminal.addValue(data);
});
}