Explorar el Código

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

Paulus Schoutsen hace 3 años
padre
commit
da4a7871e4
Se han modificado 1 ficheros con 2 adiciones y 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 {