@gaidalou/control 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/control.js +2 -2
- package/dist/es/control.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/es/control.js
CHANGED
|
@@ -46413,7 +46413,7 @@ const Ec = class Ec {
|
|
|
46413
46413
|
}
|
|
46414
46414
|
static async sendMsg(t) {
|
|
46415
46415
|
try {
|
|
46416
|
-
if (!this.instance)
|
|
46416
|
+
if (!this.instance || !this.instance.serialPort)
|
|
46417
46417
|
return;
|
|
46418
46418
|
let n = this.instance.serialPort.writable.getWriter(), { value: o } = t;
|
|
46419
46419
|
await n.write(new Uint8Array(o)), n.releaseLock();
|
|
@@ -46529,7 +46529,7 @@ const _c = class _c {
|
|
|
46529
46529
|
}
|
|
46530
46530
|
// 发送距离
|
|
46531
46531
|
async sendBlueDistance(t) {
|
|
46532
|
-
let o = [90, 165, 0, 6, 0, 12, ...this.numberToBytes(t), 248, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
46532
|
+
let o = [90, 165, 0, 6, 0, 12, ...this.numberToBytes(t * 10), 248, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
46533
46533
|
await Qo.sendMsg({
|
|
46534
46534
|
characteristic: "0000ff04",
|
|
46535
46535
|
value: o
|