Commit 550771b5 authored by Skye Yu's avatar Skye Yu

feat: send schedule info

parent 7e26c76b
......@@ -116,7 +116,7 @@ declare class JensenType {
seconds?: number,
) => Promise<ReturnStruct["common"]>;
writeSerialNumber: (sn: string) => Promise<ReturnStruct["common"]>;
sendScheduleIngo: (info: ScheduleInfo) => Promise<ReturnStruct["common"]>;
sendScheduleInfo: (info: ScheduleInfo) => Promise<ReturnStruct["common"]>;
}
//@ts-ignore
......
import { Logger, Logger as internalLogger } from './utils/utils';
import { Logger, Logger as internalLogger, getTimeStr } from './utils/utils';
const QUERY_DEVICE_INFO = 0x01;
const QUERY_DEVICE_TIME = 0x02;
......@@ -902,7 +902,7 @@ const commonMessageParser = (msg) => {
return { result: msg.body[0] === 0x00 ? 'success' : 'failed' };
};
Jensen.prototype.sendSchedule = function (info) {
Jensen.prototype.sendScheduleInfo = function (info) {
const startDate = this.to_bcd(getTimeStr(info.startDate));
const endDate = this.to_bcd(getTimeStr(info.endDate));
const keyAnswer = [3, 7, 4, 0, 0, 0, 0, 0];
......
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