Commit 56c1b57c authored by martin hou's avatar martin hou

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

parent 6c0b9342
...@@ -707,7 +707,12 @@ Jensen.prototype.getBluetoothStatus = async function (seconds) { ...@@ -707,7 +707,12 @@ Jensen.prototype.getBluetoothStatus = async function (seconds) {
Jensen.prototype.setWebUSBTimeout = async function (timeout, 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) 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