Remove double text encoder in SerialPort.
This commit is contained in:
@@ -83,8 +83,7 @@ class SerialPort {
|
|||||||
/// Send data to port
|
/// Send data to port
|
||||||
send(data) {
|
send(data) {
|
||||||
if (!this.writer) throw new Error('Port not connected');
|
if (!this.writer) throw new Error('Port not connected');
|
||||||
const encoder = new TextEncoder();
|
return this.writer.write(data);
|
||||||
return this.writer.write(encoder.encode(data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async forgetDevice() {}
|
async forgetDevice() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user