mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 06:20:21 +00:00
Small JS fixes (#3950)
This commit is contained in:
parent
fbc3b494b7
commit
a6cf08523c
2 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue