You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great terminal application. Nice and simple for quick understanding of the Serial Api.
When testing with my device which that outputs upto 100K xml text, I quickly ran into problems with buffer overruns and lost characters. I turned on hardware flow control as follows as my device supports RTS & CTS handshake. Other samples suggest checkboxes for hardware flow control on/off. For a quick test I was happy to hardcode it.
function escapeXml(unsafe) {
return unsafe.replace(/[<>&'"]/g, function (c) {
switch (c) {
case '<': return '<';
case '>': return '>';
case '&': return '&';
case '\'': return ''';
case '"': return '"';
}
});
}
and then change append to escape the string being stuffed into the page for all characters to be rendered in a readable form.
// value is a string. escape characters as needed
appendToTerminal(escapeXml(value));
The text was updated successfully, but these errors were encountered:
doingnz
changed the title
Suggestions to add hardware flow control and HTML escape
Suggestions to add hardware flow control and XML escape
May 20, 2021
Great terminal application. Nice and simple for quick understanding of the Serial Api.
When testing with my device which that outputs upto 100K xml text, I quickly ran into problems with buffer overruns and lost characters. I turned on hardware flow control as follows as my device supports RTS & CTS handshake. Other samples suggest checkboxes for hardware flow control on/off. For a quick test I was happy to hardcode it.
As my device outputs XML, I had to define
and then change append to escape the string being stuffed into the page for all characters to be rendered in a readable form.
The text was updated successfully, but these errors were encountered: