Skip to content

Commit

Permalink
added error handling if serial connection lost
Browse files Browse the repository at this point in the history
  • Loading branch information
klues committed Apr 12, 2024
1 parent 5841c7e commit ce5e3ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/uart.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
</head>
<body>
<script src="../uart.min.js"></script>
<script src="../uart.js"></script>

<h1>Bluetooth</h1>
<button onclick="sendBluetooth('LED1.set();\n');">LED On!</button>
Expand Down
3 changes: 3 additions & 0 deletions uart.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ ChangeLog:
} else {
readLoop();
}
}).catch(function(error) {
log(0, 'ERROR: ' + error);
disconnected();
});
}
readLoop();
Expand Down
2 changes: 1 addition & 1 deletion uart.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce5e3ef

Please # to comment.