Skip to content

Linebreak set to LF as per SerialPlotterProtocol #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function App() {
monitorUISettings: {
lineEnding: isEOL(urlParams.get("lineEnding"))
? (urlParams.get("lineEnding") as EOL)
: "\r\n",
: "\n",
darkTheme: urlParams.get("darkTheme") === "true",
wsPort: parseInt(urlParams.get("wsPort") || "3030"),
interpolate: urlParams.get("interpolate") === "true",
Expand Down
7 changes: 4 additions & 3 deletions src/fakeMessagsGenerators.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const separator = "\n";
// format1: <value1> <value2> <value3>
export const generateRandomMessages = () => {
const messages: string[] = [];
Expand All @@ -10,7 +11,7 @@ export const generateRandomMessages = () => {
}
let line = variables.join(" ");

messages.push(line + "\r\n");
messages.push(line + separator);
}

return messages;
Expand All @@ -30,7 +31,7 @@ export const namedVariables = () => {
let pair = genNamedVarValPair(i);
messages.push(pair);
}
return [messages.join(",") + "\r\n"];
return [messages.join(",") + separator];
};

export const namedVariablesMulti = () => {
Expand Down Expand Up @@ -67,5 +68,5 @@ export const jumpyNamedVariables = () => {
let pair = genNamedVarValPair(i);
messages.push(pair);
}
return [messages.join(",") + "\r\n"];
return [messages.join(",") + separator];
};
2 changes: 1 addition & 1 deletion src/msgAggregatorWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ctx.addEventListener("message", (event) => {

let buffer = "";
let discardFirstLine = true;
const separator = "\r\n";
const separator = "\n";
var re = new RegExp(`(${separator})`, "g");

export const parseSerialMessages = (
Expand Down