Commit fcbaf8e9 authored by Skye Yu's avatar Skye Yu

fix(send schedule info): bodys data concat

parent 424b9093
...@@ -911,7 +911,7 @@ const commonMessageParser = (msg) => { ...@@ -911,7 +911,7 @@ const commonMessageParser = (msg) => {
Jensen.prototype.sendScheduleInfo = function (infos) { Jensen.prototype.sendScheduleInfo = function (infos) {
if (Array.isArray(infos) && infos.length) { if (Array.isArray(infos) && infos.length) {
const bodys = []; let bodys = [];
for (const info of infos) { for (const info of infos) {
let codes = new Array(33).fill(0); let codes = new Array(33).fill(0);
if (shortcutKeys[info.platform] && shortcutKeys[info.platform][info.os]) { if (shortcutKeys[info.platform] && shortcutKeys[info.platform][info.os]) {
...@@ -924,7 +924,7 @@ Jensen.prototype.sendScheduleInfo = function (infos) { ...@@ -924,7 +924,7 @@ Jensen.prototype.sendScheduleInfo = function (infos) {
endDate = formatTime(info.endDate); endDate = formatTime(info.endDate);
} }
const reserved = 0x00; // 预留 const reserved = 0x00; // 预留
bodys.concat([...startDate, ...endDate, reserved, ...codes]); bodys = bodys.concat([...startDate, ...endDate, reserved, ...codes]);
} }
console.log('send schedule info', infos, bodys); console.log('send schedule info', infos, bodys);
return this.send(new Command(SCHEDULE_INFO).body(bodys)); return this.send(new Command(SCHEDULE_INFO).body(bodys));
......
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