浏览代码

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

Paulus Schoutsen 3 年之前
父节点
当前提交
da4a7871e4
共有 1 个文件被更改,包括 2 次插入2 次删除
  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 {