|
@@ -127,20 +127,20 @@ export default {
|
|
|
*/
|
|
|
sendControlClose() {
|
|
|
let that = this
|
|
|
+ // 打开LED
|
|
|
+ that.SendLedOrder("01");
|
|
|
+ // 断开教具及蓝牙连接
|
|
|
+ that.SendOrder("31");
|
|
|
+ // 兼容二代脑机,不能退出循环
|
|
|
control_close = false;
|
|
|
control_close_intv = setInterval(() => {
|
|
|
if (!control_close) {
|
|
|
// 关闭脑控
|
|
|
that.SendOrder('09')
|
|
|
- // 打开LED
|
|
|
- that.SendLedOrder("01");
|
|
|
- // 断开教具及蓝牙连接
|
|
|
- that.SendOrder("31");
|
|
|
//如果是jellyfish则发送00教具
|
|
|
if (!is_new) {
|
|
|
that.sendConnectOneToMore('00')
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
//设置打开脑控为false
|
|
|
FlagOpenControl = false;
|
|
@@ -448,7 +448,6 @@ export default {
|
|
|
const that = this;
|
|
|
let DeviceId = game_store.getters.getDeviceId();
|
|
|
wx.onBLECharacteristicValueChange((characteristic) => {
|
|
|
-
|
|
|
// 获取脑机信号值
|
|
|
wx.getBLEDeviceRSSI({
|
|
|
deviceId: DeviceId,
|
|
@@ -568,8 +567,8 @@ export default {
|
|
|
let toy_list_pre = {'01': "SW", '02': "KL", '04': "SC", '05': "PP", '06': "SU", '09': "UF", '12': "JM"}
|
|
|
let $sn = toy_list_pre[current_toy_id] + $number;
|
|
|
$this.toy_sn = $sn;
|
|
|
- //获取教具电量
|
|
|
- // that.SendOrder('8a')
|
|
|
+ //保存教具sn
|
|
|
+ game_store.setters.setToySn($sn);
|
|
|
console.log("获取教具名称hexStr",hexStr)
|
|
|
console.log("获取教具名称$sn",$sn)
|
|
|
}
|