From a6cf08523ca6bad2c96bdad275c8574aa6526769 Mon Sep 17 00:00:00 2001 From: porta Date: Tue, 15 Oct 2024 20:03:15 +0300 Subject: [PATCH] Small JS fixes (#3950) --- applications/system/js_app/examples/apps/Scripts/uart_echo.js | 4 ++-- applications/system/js_app/types/badusb/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/system/js_app/examples/apps/Scripts/uart_echo.js b/applications/system/js_app/examples/apps/Scripts/uart_echo.js index 2a0159b4690..06d6119fdcb 100644 --- a/applications/system/js_app/examples/apps/Scripts/uart_echo.js +++ b/applications/system/js_app/examples/apps/Scripts/uart_echo.js @@ -2,10 +2,10 @@ let serial = require("serial"); serial.setup("usart", 230400); while (1) { - let rx_data = serial.readBytes(1, 0); + let rx_data = serial.readBytes(1, 1000); if (rx_data !== undefined) { serial.write(rx_data); let data_view = Uint8Array(rx_data); print("0x" + toString(data_view[0], 16)); } -} \ No newline at end of file +} diff --git a/applications/system/js_app/types/badusb/index.d.ts b/applications/system/js_app/types/badusb/index.d.ts index 2107909673c..647382dc0b3 100644 --- a/applications/system/js_app/types/badusb/index.d.ts +++ b/applications/system/js_app/types/badusb/index.d.ts @@ -78,4 +78,4 @@ export declare function print(string: string, delay?: number): void; * @param string The string to print * @param delay How many milliseconds to wait between key presses */ -export declare function println(): void; +export declare function println(string: string, delay?: number): void;