Explorar o código

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

Paulus Schoutsen %!s(int64=3) %!d(string=hai) anos
pai
achega
da4a7871e4
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 {