|
@@ -22,22 +22,22 @@ class BtCmd {
|
|
|
constructor() { }
|
|
|
|
|
|
// 获取版本号
|
|
|
- static get queryVersion() {
|
|
|
+ static queryVersion() {
|
|
|
return this._build(CmdBase.queryVersion, [0x0]);
|
|
|
}
|
|
|
|
|
|
// 查询电量 电量值 0-9,0对应10%,9对应100%,10充电
|
|
|
- static get queryKwh() {
|
|
|
+ static queryKwh() {
|
|
|
return this._build(CmdKwh.queryKwh, [0x0]);
|
|
|
}
|
|
|
|
|
|
// 查询耳机电量
|
|
|
- static get queryKwhEarPhone() {
|
|
|
+ static queryKwhEarPhone() {
|
|
|
return this._build(CmdEarPhone.queryEarPhoneKwh, [0x0]);
|
|
|
}
|
|
|
|
|
|
// 查询EQ音效
|
|
|
- static get queryEQ() {
|
|
|
+ static queryEQ() {
|
|
|
return this._build(CmdEarPhone.queryEQ, [0x0]);
|
|
|
}
|
|
|
|
|
@@ -47,7 +47,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// B5耳机-低电耗模式
|
|
|
- static get queryLowPower() {
|
|
|
+ static queryLowPower() {
|
|
|
return this._build(CmdEarPhone.queryLowPower, [0x0]);
|
|
|
}
|
|
|
|
|
@@ -56,7 +56,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// B5耳机-自定义操作手势
|
|
|
- static get queryCtrlStatus() {
|
|
|
+ static queryCtrlStatus() {
|
|
|
return this._build(CmdEarPhone.queryCtrlStatus, [0x0]);
|
|
|
}
|
|
|
|
|
@@ -65,7 +65,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 查询低延时模式
|
|
|
- static get queryLowDelayMode() {
|
|
|
+ static queryLowDelayMode() {
|
|
|
return this._build(CmdEarPhone.queryLowDelayMode, [0x0]);
|
|
|
}
|
|
|
|
|
@@ -75,7 +75,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 低电量提示音
|
|
|
- static get queryLowKwhWarningTone() {
|
|
|
+ static queryLowKwhWarningTone() {
|
|
|
return this._build(CmdKwh.queryLowKwhWarningTone, [0x00]);
|
|
|
}
|
|
|
|
|
@@ -88,12 +88,12 @@ class BtCmd {
|
|
|
return this._build(CmdBase.setAutoPlay, [switchStatus]);
|
|
|
}
|
|
|
|
|
|
- static get getAutoPlay() {
|
|
|
+ static AutoPlay() {
|
|
|
return this._build(CmdBase.getAutoPlay, [0x00]);
|
|
|
}
|
|
|
|
|
|
// 查询音量
|
|
|
- static get queryVolume() {
|
|
|
+ static queryVolume() {
|
|
|
return this._build(CmdBase.queryVolume, [0x00]);
|
|
|
}
|
|
|
|
|
@@ -102,7 +102,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 查询闹钟
|
|
|
- static get queryAlarm() {
|
|
|
+ static queryAlarm() {
|
|
|
return this._build(CmdRtc.queryAlarm, [0x00]);
|
|
|
}
|
|
|
|
|
@@ -113,11 +113,11 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 查询休眠
|
|
|
- static get querySleep() {
|
|
|
+ static querySleep() {
|
|
|
return this._build(CmdRtc.querySleep, [0x00]);
|
|
|
}
|
|
|
|
|
|
- static get querySleepAfterPlayPause() {
|
|
|
+ static querySleepAfterPlayPause() {
|
|
|
return this._build(CmdRtc.querySleepAfterPlayPause, [0x00]);
|
|
|
}
|
|
|
|
|
@@ -131,7 +131,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 设置时间
|
|
|
- static get setDevTime() {
|
|
|
+ static setDevTime() {
|
|
|
const now = new Date();
|
|
|
const y = now.getFullYear();
|
|
|
const year = Math.floor(y / 100);
|
|
@@ -151,7 +151,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 查询时间
|
|
|
- static get queryTime() {
|
|
|
+ static queryTime() {
|
|
|
return this._build(CmdRtc.queryTime, [0x00]);
|
|
|
}
|
|
|
|
|
@@ -161,7 +161,7 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 查询RGB
|
|
|
- static get queryRGB() {
|
|
|
+ static queryRGB() {
|
|
|
return this._build(CmdRgb.query, [0x0]);
|
|
|
}
|
|
|
|
|
@@ -181,33 +181,33 @@ class BtCmd {
|
|
|
}
|
|
|
|
|
|
// 杰理语音开始回应
|
|
|
- static get jlStartVoiceResponse() {
|
|
|
+ static jlStartVoiceResponse() {
|
|
|
return this._build(CmdVoice.jlStartVoiceResponse);
|
|
|
}
|
|
|
|
|
|
// 杰理语音结束回应
|
|
|
- static get jlStopVoiceResponse() {
|
|
|
+ static jlStopVoiceResponse() {
|
|
|
return this._build(CmdVoice.jlStopVoiceResponse);
|
|
|
}
|
|
|
|
|
|
// 领芯语音
|
|
|
- static get lxStartVoiceResponse() {
|
|
|
+ static lxStartVoiceResponse() {
|
|
|
return this._build(CmdVoice.lxStartVoiceResponse);
|
|
|
}
|
|
|
|
|
|
// 杰理语音结束回应
|
|
|
- static get lxStopVoiceResponse() {
|
|
|
+ static lxStopVoiceResponse() {
|
|
|
return this._build(CmdVoice.lxStopVoiceResponse);
|
|
|
}
|
|
|
|
|
|
// b1开始语音回调
|
|
|
- static get b1StartVoiceResponse() {
|
|
|
+ static b1StartVoiceResponse() {
|
|
|
const data = [0x04, 0x80, 0x01, 0x00, 0x02];
|
|
|
return new Uint8Array(data);
|
|
|
}
|
|
|
|
|
|
// b1结束语音回调
|
|
|
- static get b1StopVoiceResponse() {
|
|
|
+ static b1StopVoiceResponse() {
|
|
|
const data = [0x05, 0x80, 0x01, 0x00, 0x02];
|
|
|
return new Uint8Array(data);
|
|
|
}
|