Commit 81209962 authored by martin hou's avatar martin hou

feat: 增加webusb写超时设置指令

parent 302baabc
......@@ -768,7 +768,12 @@ Jensen.prototype.getBluetoothStatus = async function (seconds) {
Jensen.prototype.setWebUSBTimeout = async function (timeout, seconds)
{
return this.send(new Command(WRITE_WEBUSB_TIMEOUT).body([timeout]), seconds);
let data = [];
data.push((timeout >> 24) & 0xff);
data.push((timeout >> 16) & 0xff);
data.push((timeout >> 8) & 0xff);
data.push((timeout >> 0) & 0xff);
return this.send(new Command(WRITE_WEBUSB_TIMEOUT).body(data), seconds);
};
Jensen.prototype.getWebUSBTimeout = async function (seconds)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment