Parcourir la source

Finish sending commands with \r\n (#97)

Paulus Schoutsen il y a 3 ans
Parent
commit
da4a7871e4
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/components/ewt-console.ts

+ 2 - 2
src/components/ewt-console.ts

@@ -186,8 +186,8 @@ export class EwtConsole extends HTMLElement {
     const command = input.value;
     const encoder = new TextEncoder();
     const writer = this.port.writable!.getWriter();
-    await writer.write(encoder.encode(command));
-    this._console!.addLine(`> ${command}\n`);
+    await writer.write(encoder.encode(command + "\r\n"));
+    this._console!.addLine(`> ${command}\r\n`);
     input.value = "";
     input.focus();
     try {