@ray-js/robot-data-stream 0.0.13-beta-2 → 0.0.13-beta-4
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/lib/api/sweeperP2p.js
CHANGED
|
@@ -515,12 +515,14 @@ export class SweeperP2p extends P2pApi {
|
|
|
515
515
|
if (this.cacheData[type] !== hexValue) {
|
|
516
516
|
if (type === 0 || type === 6) {
|
|
517
517
|
this.onReceiveMapData(hexValue);
|
|
518
|
+
this.cacheData[type] = hexValue;
|
|
518
519
|
}
|
|
519
520
|
if (type === 1) {
|
|
520
521
|
logger('info', {
|
|
521
522
|
msg: `push new path data`
|
|
522
523
|
}, this.onLogger);
|
|
523
524
|
this.onReceivePathData(hexValue);
|
|
525
|
+
this.cacheData[type] = hexValue;
|
|
524
526
|
}
|
|
525
527
|
if (type === 4) {
|
|
526
528
|
this.onReceiveAIPicData(hexValue);
|
|
@@ -528,7 +530,6 @@ export class SweeperP2p extends P2pApi {
|
|
|
528
530
|
if (type === 5) {
|
|
529
531
|
this.onReceiveAIPicHDData(hexValue);
|
|
530
532
|
}
|
|
531
|
-
this.cacheData[type] = hexValue;
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
}
|
|
@@ -7,6 +7,7 @@ type ScheduleItem = Pick<RoomPreference, 'suctions' | 'cisterns' | 'cleanCounts'
|
|
|
7
7
|
interface Schedule {
|
|
8
8
|
list: Array<ScheduleItem>;
|
|
9
9
|
num: number;
|
|
10
|
+
version?: string;
|
|
10
11
|
}
|
|
11
12
|
type Response = BaseResponse & Schedule;
|
|
12
13
|
export declare const useSchedule: (devId: string) => {
|
package/lib/mqtt/useSchedule.js
CHANGED
|
@@ -21,10 +21,14 @@ export const useSchedule = devId => {
|
|
|
21
21
|
// 下发定时数据
|
|
22
22
|
|
|
23
23
|
return {
|
|
24
|
-
requestSchedule: ()
|
|
24
|
+
requestSchedule: function () {
|
|
25
|
+
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
26
|
+
version: '1.0.0'
|
|
27
|
+
};
|
|
25
28
|
const params = createSetCommonParams({
|
|
26
29
|
deviceId: devId,
|
|
27
|
-
reqType: ScheduleEnum.query
|
|
30
|
+
reqType: ScheduleEnum.query,
|
|
31
|
+
message
|
|
28
32
|
});
|
|
29
33
|
ty.device.sendMqttMessage(params);
|
|
30
34
|
const {
|