summaryrefslogtreecommitdiffstats
path: root/assets/js/serialUtil.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/js/serialUtil.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/assets/js/serialUtil.js b/assets/js/serialUtil.js
index c4d6d84..6e9d155 100644
--- a/assets/js/serialUtil.js
+++ b/assets/js/serialUtil.js
@@ -2,14 +2,8 @@ function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
-async function openPortLineBreak(port, baudRate, outputErrorCallback) {
- try {
- await port.open({ baudRate: baudRate });
- } catch (err) {
- outputErrorCallback(`Error: ${err.message}`);
- return;
- }
-
+async function openPortLineBreak(port, baudRate) {
+ await port.open({ baudRate: baudRate });
const textDecoder = new TextDecoderStream();
const readableStreamClosed = port.readable.pipeTo(textDecoder.writable);
const reader = await textDecoder.readable.pipeThrough(new TransformStream(new LineBreakTransformer())).getReader();