Skip to content

Commit

Permalink
Small JS fixes (#3950)
Browse files Browse the repository at this point in the history
  • Loading branch information
portasynthinca3 authored Oct 15, 2024
1 parent fbc3b49 commit a6cf085
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions applications/system/js_app/examples/apps/Scripts/uart_echo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
2 changes: 1 addition & 1 deletion applications/system/js_app/types/badusb/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit a6cf085

Please sign in to comment.