From 0e2e09c8d5fa71ab3ac33e091f71e19a460e2f02 Mon Sep 17 00:00:00 2001 From: ali-f Date: Thu, 17 Oct 2024 19:06:48 +0330 Subject: [PATCH] 1 --- services/serialPortService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/serialPortService.js b/services/serialPortService.js index 427b66d..caff0cf 100644 --- a/services/serialPortService.js +++ b/services/serialPortService.js @@ -23,7 +23,7 @@ async function serialPortList(req, res) { console.log(111111, serialPort) const buff = Buffer.allocUnsafe(4); - buff.writeUInt8(`#0${req.params.id}$`); + buff.write(`#0${req.params.id}$`); serialPort.write(buff) }