소스 검색

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 {