Commit 47b45b87 authored by Skye Yu's avatar Skye Yu

fix(send schedule info): send data size adjust to 52 bits

parent 2c149765
...@@ -917,13 +917,15 @@ Jensen.prototype.sendScheduleInfo = function (infos) { ...@@ -917,13 +917,15 @@ Jensen.prototype.sendScheduleInfo = function (infos) {
if (shortcutKeys[info.platform] && shortcutKeys[info.platform][info.os]) { if (shortcutKeys[info.platform] && shortcutKeys[info.platform][info.os]) {
codes = shortcutKeys[info.platform][info.os]; codes = shortcutKeys[info.platform][info.os];
} }
let startDate = new Array(7).fill(0); let startDate = new Array(8).fill(0);
let endDate = new Array(7).fill(0); let endDate = new Array(8).fill(0);
if (info.startDate && info.endDate) { if (info.startDate && info.endDate) {
startDate = sliceTime(formatTime(info.startDate)); startDate = sliceTime(formatTime(info.startDate));
endDate = sliceTime(formatTime(info.endDate)); endDate = sliceTime(formatTime(info.endDate));
startDate.push(0x00);
endDate.push(0x00);
} }
const reserved = 0x00; // 预留 const reserved = [0x00, 0x00]; // 预留
bodys = 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);
......
...@@ -174,7 +174,7 @@ const enterKeyCode = (answer = 0, hangup = 0, reject = 0, micMute = 0) => { ...@@ -174,7 +174,7 @@ const enterKeyCode = (answer = 0, hangup = 0, reject = 0, micMute = 0) => {
if (hangup) code |= 0x01 << 1; if (hangup) code |= 0x01 << 1;
if (reject) code |= 0x01 << 2; if (reject) code |= 0x01 << 2;
if (micMute) code |= 0x01 << 3; if (micMute) code |= 0x01 << 3;
return code; return [0x00, code];
}; };
const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0]; const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0];
...@@ -182,129 +182,147 @@ const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0]; ...@@ -182,129 +182,147 @@ const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0];
export const shortcutKeys = { export const shortcutKeys = {
zoom: { zoom: {
Windows: [ Windows: [
enterKeyCode(0, 1), ...enterKeyCode(0, 1),
...HotKeyBuilder.build(0x04, 0x01), ...HotKeyBuilder.build(0x04, 0x01),
...HotKeyBuilder.withAlt().withKey('Q').build(), ...HotKeyBuilder.withAlt().withKey('Q').build(),
...HotKeyBuilder.build(0x04, 0x10), ...HotKeyBuilder.build(0x04, 0x10),
...HotKeyBuilder.withAlt().withKey('A').build() ...HotKeyBuilder.withAlt().withKey('A').build()
], ],
Mac: [ Mac: [
enterKeyCode(0, 1), ...enterKeyCode(0, 1),
...HotKeyBuilder.build(0x04, 0x01), ...HotKeyBuilder.build(0x04, 0x01),
...HotKeyBuilder.withGuiKey().withKey('W').build(), ...HotKeyBuilder.withGuiKey().withKey('W').build(),
...HotKeyBuilder.build(0x04, 0x10), ...HotKeyBuilder.build(0x04, 0x10),
...HotKeyBuilder.withGuiKey().withShift().withKey('A').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('A').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
teams: { teams: {
Windows: [ Windows: [
enterKeyCode(), ...enterKeyCode(),
...HotKeyBuilder.withControl().withShift().withKey('A').build(), ...HotKeyBuilder.withControl().withShift().withKey('A').build(),
...HotKeyBuilder.withControl().withShift().withKey('H').build(), ...HotKeyBuilder.withControl().withShift().withKey('H').build(),
...HotKeyBuilder.withControl().withShift().withKey('D').build(), ...HotKeyBuilder.withControl().withShift().withKey('D').build(),
...HotKeyBuilder.withControl().withShift().withKey('M').build() ...HotKeyBuilder.withControl().withShift().withKey('M').build()
], ],
Mac: [ Mac: [
enterKeyCode(), ...enterKeyCode(),
...HotKeyBuilder.withGuiKey().withShift().withKey('A').build(), ...HotKeyBuilder.withGuiKey().withShift().withKey('A').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('H').build(), ...HotKeyBuilder.withGuiKey().withShift().withKey('H').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('D').build(), ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('M').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('M').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
'google-meeting': { 'google-meeting': {
Windows: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withControl().withKey('D').build()], Windows: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withControl().withKey('D').build()],
Mac: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withKey('D').build()], Mac: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withKey('D').build()],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
webex: { webex: {
Windows: [ Windows: [
enterKeyCode(), ...enterKeyCode(),
...HotKeyBuilder.withControl().withShift().withKey('C').build(), ...HotKeyBuilder.withControl().withShift().withKey('C').build(),
...HotKeyBuilder.withControl().withKey('L').build(), ...HotKeyBuilder.withControl().withKey('L').build(),
...HotKeyBuilder.withControl().withKey('D').build(), ...HotKeyBuilder.withControl().withKey('D').build(),
...HotKeyBuilder.withControl().withKey('M').build() ...HotKeyBuilder.withControl().withKey('M').build()
], ],
Mac: [ Mac: [
enterKeyCode(), ...enterKeyCode(),
...HotKeyBuilder.withControl().withShift().withKey('C').build(), ...HotKeyBuilder.withControl().withShift().withKey('C').build(),
...HotKeyBuilder.withGuiKey().withKey('L').build(), ...HotKeyBuilder.withGuiKey().withKey('L').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('D').build(), ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('M').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('M').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
feishu: { feishu: {
Windows: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withControl().withShift().withKey('D').build()], Windows: [
Mac: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build()], ...enterKeyCode(),
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] ...emptyCodes,
...emptyCodes,
...emptyCodes,
...HotKeyBuilder.withControl().withShift().withKey('D').build()
],
Mac: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build()],
Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
lark: { lark: {
Windows: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withControl().withShift().withKey('D').build()], Windows: [
Mac: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build()], ...enterKeyCode(),
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] ...emptyCodes,
...emptyCodes,
...emptyCodes,
...HotKeyBuilder.withControl().withShift().withKey('D').build()
],
Mac: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withShift().withKey('D').build()],
Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
weChat: { weChat: {
Windows: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes], Windows: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes],
Mac: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes], Mac: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
line: { line: {
Windows: [ Windows: [
enterKeyCode(0, 1, 1), ...enterKeyCode(0, 1, 1),
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withKey('ESCAPE').build(), ...HotKeyBuilder.withKey('ESCAPE').build(),
...HotKeyBuilder.withKey('ESCAPE').build(), ...HotKeyBuilder.withKey('ESCAPE').build(),
...HotKeyBuilder.withControl().withShift().withKey('A').build() ...HotKeyBuilder.withControl().withShift().withKey('A').build()
], ],
Mac: [ Mac: [
enterKeyCode(0, 1, 1), ...enterKeyCode(0, 1, 1),
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withKey('ESCAPE').build(), ...HotKeyBuilder.withKey('ESCAPE').build(),
...HotKeyBuilder.withKey('ESCAPE').build(), ...HotKeyBuilder.withKey('ESCAPE').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('A').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('A').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
'whats-app': { 'whats-app': {
Windows: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes], Windows: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes],
Mac: [ Mac: [
enterKeyCode(), ...enterKeyCode(),
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withGuiKey().withKey('W').build(), ...HotKeyBuilder.withGuiKey().withKey('W').build(),
...HotKeyBuilder.withGuiKey().withKey('W').build(), ...HotKeyBuilder.withGuiKey().withKey('W').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('M').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('M').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
slack: { slack: {
Windows: [ Windows: [
enterKeyCode(), ...enterKeyCode(),
...emptyCodes, ...emptyCodes,
...emptyCodes, ...emptyCodes,
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withControl().withShift().withKey('SPACE').build() ...HotKeyBuilder.withControl().withShift().withKey('SPACE').build()
], ],
Mac: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...HotKeyBuilder.withGuiKey().withShift().withKey('SPACE').build()], Mac: [
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] ...enterKeyCode(),
...emptyCodes,
...emptyCodes,
...emptyCodes,
...HotKeyBuilder.withGuiKey().withShift().withKey('SPACE').build()
],
Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
}, },
discord: { discord: {
Windows: [ Windows: [
enterKeyCode(), ...enterKeyCode(),
HotKeyBuilder.withControl().withKey('ENTER').build(), HotKeyBuilder.withControl().withKey('ENTER').build(),
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withKey('ESCAPE').build(), ...HotKeyBuilder.withKey('ESCAPE').build(),
...HotKeyBuilder.withControl().withShift().withKey('M').build() ...HotKeyBuilder.withControl().withShift().withKey('M').build()
], ],
Mac: [ Mac: [
enterKeyCode(), ...enterKeyCode(),
...HotKeyBuilder.withGuiKey().withKey('ENTER').build(), ...HotKeyBuilder.withGuiKey().withKey('ENTER').build(),
...emptyCodes, ...emptyCodes,
...HotKeyBuilder.withGuiKey().withKey('ESCAPE').build(), ...HotKeyBuilder.withGuiKey().withKey('ESCAPE').build(),
...HotKeyBuilder.withGuiKey().withShift().withKey('M').build() ...HotKeyBuilder.withGuiKey().withShift().withKey('M').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [...enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
} }
}; };
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