|
@@ -99,8 +99,9 @@
|
|
|
<!-- 用于定位 -->
|
|
<!-- 用于定位 -->
|
|
|
<!-- <view id="boxingHitID" style="position: absolute;top: 180rpx; pointer-events: none;" ></view> -->
|
|
<!-- <view id="boxingHitID" style="position: absolute;top: 180rpx; pointer-events: none;" ></view> -->
|
|
|
<view id="boxingHitID" v-if="currentModeIndex == 0" class="charts-pring-bottom">
|
|
<view id="boxingHitID" v-if="currentModeIndex == 0" class="charts-pring-bottom">
|
|
|
- <boxing-hit ref="boxingPostRef" :bUpdate="!bHide && cIndex!=-1 && BLEConnectDevice!=null &&
|
|
|
|
|
- (BLEConnectDevice.deviceType == 'mySelf'||BLEConnectDevice.deviceType == 'BLEHandle' || BLEConnectDevice.deviceType == 'BLERope' )"
|
|
|
|
|
|
|
+ <!-- 添加一个 ConnectBindingDevice 测试 -->
|
|
|
|
|
+ <boxing-hit ref="boxingPostRef" :bUpdate="!bHide&&(ConnectBindingDevice!=null)||(cIndex!=-1 && BLEConnectDevice!=null &&
|
|
|
|
|
+ (BLEConnectDevice.deviceType == 'mySelf'||BLEConnectDevice.deviceType == 'BLEHandle' || BLEConnectDevice.deviceType == 'BLERope' ))"
|
|
|
:showTime="localSportTime" :bRebound="BLEConnectDevice&&BLEConnectDevice.limitType == 'rebound'"
|
|
:showTime="localSportTime" :bRebound="BLEConnectDevice&&BLEConnectDevice.limitType == 'rebound'"
|
|
|
@updateCalorie="boxingUpdateCalorie" @boxingPostCheck="onPersonalCheck" @shake="onScreenShake"
|
|
@updateCalorie="boxingUpdateCalorie" @boxingPostCheck="onPersonalCheck" @shake="onScreenShake"
|
|
|
@updateSportTime="onUpdateSportTime" @boxingGuideFinish="onBoxingGuideFinish" @boxingPostControlPlay="onBoxingPostControlPlay"
|
|
@updateSportTime="onUpdateSportTime" @boxingGuideFinish="onBoxingGuideFinish" @boxingPostControlPlay="onBoxingPostControlPlay"
|
|
@@ -224,11 +225,27 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
|
|
+ <!-- 开启手机加速计和陀螺仪数据 -->
|
|
|
|
|
+ <!-- <view class="container-device" id="openAccGyroView">
|
|
|
|
|
+ <view class="width-device flex align-center" v-for="(item, index) in DeviceBindingList" @tap="onBindingDevice(item, 0)"
|
|
|
|
|
+ :key="'key-'+index" :id="'bing-'+item.ename">
|
|
|
|
|
+
|
|
|
|
|
+ <view style="position: relative; height: 100%;">
|
|
|
|
|
+ <image :src="ConnectBindingDevice? '/static/deviceBg.png' : '/static/deviceBg_off.png'" class="data-png-64"
|
|
|
|
|
+ mode="aspectFit"></image>
|
|
|
|
|
+ <image :src="ConnectBindingDevice?item.icon:item.mIcon" class="data-png-add" mode="aspectFit"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="flex-sub text-center">
|
|
|
|
|
+ <image :src="ConnectBindingDevice? '/static/wifi_on.png' : '/static/wifi_off.png'" class="data-png-32" mode="aspectFit"></image>
|
|
|
|
|
+ <view class="text-gray">{{ item.cname }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view> -->
|
|
|
<!-- 隐藏设备处 -->
|
|
<!-- 隐藏设备处 -->
|
|
|
<view class="container-device">
|
|
<view class="container-device">
|
|
|
<view class="width-device flex align-center" v-for="(item, index) in BLEDeviceShowList" :key="index" @tap="onDevice(item, $event)"
|
|
<view class="width-device flex align-center" v-for="(item, index) in BLEDeviceShowList" :key="index" @tap="onDevice(item, $event)"
|
|
|
:data-index="index">
|
|
:data-index="index">
|
|
|
- <!-- "/static/trampolineS.png" -->
|
|
|
|
|
<view style="position: relative; height: 100%;">
|
|
<view style="position: relative; height: 100%;">
|
|
|
<image :src="index == cIndex ? '/static/deviceBg.png' : '/static/deviceBg_off.png'" class="data-png-64" mode="aspectFit"></image>
|
|
<image :src="index == cIndex ? '/static/deviceBg.png' : '/static/deviceBg_off.png'" class="data-png-64" mode="aspectFit"></image>
|
|
|
<image :src="item.mIcon" class="data-png-add" mode="aspectFit"></image>
|
|
<image :src="item.mIcon" class="data-png-add" mode="aspectFit"></image>
|
|
@@ -255,11 +272,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 游戏推荐 -->
|
|
<!-- 游戏推荐 -->
|
|
|
- <view class="card-view" v-if="cIndex != -1 && versionCodeState&&versionCodeState.showGame && gameList.length !== 0">
|
|
|
|
|
|
|
+ <view class="card-view" v-if="ConnectBindingDevice || (cIndex != -1 && versionCodeState&&versionCodeState.showGame && gameList.length !== 0)">
|
|
|
<view class="text-left padding margin-xs flex justify-between">
|
|
<view class="text-left padding margin-xs flex justify-between">
|
|
|
<text class="text-black text-15px margin-left">游戏推荐</text>
|
|
<text class="text-black text-15px margin-left">游戏推荐</text>
|
|
|
<view data-type="game" @tap="onNavToGameMore" class="flex text-center justify-center align-center margin-right">
|
|
<view data-type="game" @tap="onNavToGameMore" class="flex text-center justify-center align-center margin-right">
|
|
@@ -291,8 +307,11 @@
|
|
|
<!-- <button class="margin" @click="getBLEDeviceServices">getBLEDeviceServices</button> -->
|
|
<!-- <button class="margin" @click="getBLEDeviceServices">getBLEDeviceServices</button> -->
|
|
|
|
|
|
|
|
<!-- <keyboard-listener @keydown="onKeyDown"></keyboard-listener> -->
|
|
<!-- <keyboard-listener @keydown="onKeyDown"></keyboard-listener> -->
|
|
|
|
|
+ <!-- <button type="primary" @click="testAsyncFunc">testAsyncFunc</button>
|
|
|
|
|
+ <button type="primary" @click="startSyncFunc">startSyncFunc</button>
|
|
|
|
|
+ <button type="primary" @click="stopSyncFunc">stopSyncFunc</button> -->
|
|
|
<!-- 视频推荐 -->
|
|
<!-- 视频推荐 -->
|
|
|
- <view class="card-view" v-if="cIndex != -1 && versionCodeState&&versionCodeState.showVideo && videoList.length !== 0">
|
|
|
|
|
|
|
+ <view class="card-view" v-if="ConnectBindingDevice || (cIndex != -1 && versionCodeState&&versionCodeState.showVideo && videoList.length !== 0)">
|
|
|
<view class="text-left padding margin-xs flex justify-between">
|
|
<view class="text-left padding margin-xs flex justify-between">
|
|
|
<text class="text-black text-15px margin-left">视频推荐</text>
|
|
<text class="text-black text-15px margin-left">视频推荐</text>
|
|
|
<view data-type="video" @tap="onNavToGameMore" class="flex text-center justify-center align-center margin-right">
|
|
<view data-type="video" @tap="onNavToGameMore" class="flex text-center justify-center align-center margin-right">
|
|
@@ -463,6 +482,10 @@
|
|
|
|
|
|
|
|
import keyboardListener from '@/components/keyboard-listener/keyboard-listener.vue'
|
|
import keyboardListener from '@/components/keyboard-listener/keyboard-listener.vue'
|
|
|
|
|
|
|
|
|
|
+ // 获取 module
|
|
|
|
|
+ // var testModule = uni.requireNativePlugin("MyAttitude")
|
|
|
|
|
+ // const modal = uni.requireNativePlugin('modal');
|
|
|
|
|
+
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
mapState,
|
|
mapState,
|
|
@@ -890,11 +913,41 @@
|
|
|
// }, 5000)
|
|
// }, 5000)
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ //如果是测试数据
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ if (this.$refs.boxingPostRef) {
|
|
|
|
|
+ this.$refs.boxingPostRef.onSetMode('pkMode');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$refs.boxingPostRef.onSetMode('pkMode');
|
|
|
|
|
+ }, 500)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
console.log('personal show');
|
|
console.log('personal show');
|
|
|
|
|
|
|
|
this.bLimitReconnection = false;
|
|
this.bLimitReconnection = false;
|
|
|
|
|
|
|
|
|
|
+ //测试环境检测,给个modal提示 active
|
|
|
|
|
+ if (config.active == 'dev') {
|
|
|
|
|
+ function thanDate(date2) {
|
|
|
|
|
+ var oDate1 = new Date();
|
|
|
|
|
+ console.log("检测日期", oDate1);
|
|
|
|
|
+ var oDate2 = new Date(date2);
|
|
|
|
|
+ if (oDate1.getTime() > oDate2.getTime()) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (thanDate('2021-05-31 13:10:36')) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: "提示",
|
|
|
|
|
+ content: "此版本为测试版本,有需要请和开发者联系。微信 sweetdontcry"
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onReady() {
|
|
onReady() {
|
|
|
// 计算屏幕剩余高度 填补剩余高度
|
|
// 计算屏幕剩余高度 填补剩余高度
|
|
@@ -955,7 +1008,9 @@
|
|
|
'syncLocalDataToServer', 'syncRequestEvent', 'setLocalSportTime',
|
|
'syncLocalDataToServer', 'syncRequestEvent', 'setLocalSportTime',
|
|
|
'initAdapter', 'onCreateBLEConnection', 'onUnloadCreateBLEConnectionTimeout', 'onCloseBLEConnection',
|
|
'initAdapter', 'onCreateBLEConnection', 'onUnloadCreateBLEConnectionTimeout', 'onCloseBLEConnection',
|
|
|
'gOnAddClientInfo', 'onWriteBLEConnectionValue',
|
|
'gOnAddClientInfo', 'onWriteBLEConnectionValue',
|
|
|
- 'gCreateFilterObj', 'gUpdateFilter', 'B_GetBondedDevices', 'B_OpenBLESetting','B_OpenRopeSkipping','B_CloseRopeSkipping'
|
|
|
|
|
|
|
+ 'gCreateFilterObj', 'gUpdateFilter', 'B_GetBondedDevices', 'B_OpenBLESetting', 'B_OpenRopeSkipping',
|
|
|
|
|
+ 'B_CloseRopeSkipping',
|
|
|
|
|
+ 'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm', 'gStartSimulateBLEUpdate', 'gStopSimulateBLEUpdate'
|
|
|
]),
|
|
]),
|
|
|
onKeyDown(e) {
|
|
onKeyDown(e) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
@@ -1427,6 +1482,19 @@
|
|
|
//如果在监听状态时候隐藏页面,返回
|
|
//如果在监听状态时候隐藏页面,返回
|
|
|
if (_self.bHide) return;
|
|
if (_self.bHide) return;
|
|
|
// console.log("callbackDeviceState==", data);
|
|
// console.log("callbackDeviceState==", data);
|
|
|
|
|
+
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ this.gUpdateSandbagAlgorithm({
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ callback: (res) => {
|
|
|
|
|
+ if (res.type == 'hit') {
|
|
|
|
|
+ this.$refs.boxingPostRef.onBLEHotmanUpdate(res);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//连接了手柄模式
|
|
//连接了手柄模式
|
|
|
//没有开启指令不刷新
|
|
//没有开启指令不刷新
|
|
|
if (!this.instructionState.bOpen) return;
|
|
if (!this.instructionState.bOpen) return;
|
|
@@ -1456,12 +1524,20 @@
|
|
|
},
|
|
},
|
|
|
//绑定设备函数
|
|
//绑定设备函数
|
|
|
onBindingDevice(item, index) {
|
|
onBindingDevice(item, index) {
|
|
|
- // console.log(item,index);
|
|
|
|
|
- // e.currentTarget.dataset.index $event
|
|
|
|
|
- if (index == this.cIndex) {
|
|
|
|
|
- this.$store.state.cIndex = -1;
|
|
|
|
|
- this.$store.state.ConnectBindingDevice = null;
|
|
|
|
|
|
|
+ if (item == null) {
|
|
|
|
|
+ item = this.DeviceBindingList[0];
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.BLEConnectDevice) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ title: "已连接硬件设备",
|
|
|
|
|
+ duration: 1000
|
|
|
|
|
+ })
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ this.$store.state.ConnectBindingDevice = null;
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: "none",
|
|
icon: "none",
|
|
@@ -1469,9 +1545,7 @@
|
|
|
duration: 1000
|
|
duration: 1000
|
|
|
})
|
|
})
|
|
|
}, 300)
|
|
}, 300)
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- this.$store.state.cIndex = index;
|
|
|
|
|
this.$store.state.ConnectBindingDevice = item;
|
|
this.$store.state.ConnectBindingDevice = item;
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -1483,6 +1557,9 @@
|
|
|
//连接后保存最近连接的设备
|
|
//连接后保存最近连接的设备
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //刷新状态
|
|
|
|
|
+ this.$refs.boxingPostRef.onSetMode('pkMode');
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//关闭设备函数
|
|
//关闭设备函数
|
|
|
onCloseBindingDevice(item, e) {
|
|
onCloseBindingDevice(item, e) {
|
|
@@ -1504,6 +1581,14 @@
|
|
|
this.toView = "addDeviceView";
|
|
this.toView = "addDeviceView";
|
|
|
},
|
|
},
|
|
|
onDevice(item, e) {
|
|
onDevice(item, e) {
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '当前已开启数据',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ mask: true
|
|
|
|
|
+ })
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (this.cIndex !== -1) {
|
|
if (this.cIndex !== -1) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '当前已连接设备',
|
|
title: '当前已连接设备',
|
|
@@ -1589,6 +1674,16 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
openDeviceList(e) {
|
|
openDeviceList(e) {
|
|
|
|
|
+
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '当前已开启数据',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ mask: true
|
|
|
|
|
+ })
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//先判断蓝牙是否初始化
|
|
//先判断蓝牙是否初始化
|
|
|
/**
|
|
/**
|
|
|
* 蓝牙部分操作,转全局变量操作
|
|
* 蓝牙部分操作,转全局变量操作
|
|
@@ -1740,44 +1835,39 @@
|
|
|
//分类型判断
|
|
//分类型判断
|
|
|
if (0 === this.currentModeIndex) {
|
|
if (0 === this.currentModeIndex) {
|
|
|
//拳击运动类型
|
|
//拳击运动类型
|
|
|
- // 1.检测是否有对应设备,
|
|
|
|
|
- // if (0 === this.DeviceBindingList.length) {
|
|
|
|
|
- // //如果没有绑定二维码设备,需要扫码绑定
|
|
|
|
|
|
|
+ // 1.检测是否有对应设备,没有ConnectBindingDevice,再进行下一步
|
|
|
|
|
+ if (this.ConnectBindingDevice == null) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '开启连接数据',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.toView = "openAccGyroView";
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ // TODO,目前去掉蓝牙设备
|
|
|
|
|
+ // //2.检测是否有设备
|
|
|
|
|
+ // if (this.BLEDeviceShowList.length == 0) {
|
|
|
// this.$store.state.bGuidePages = true;
|
|
// this.$store.state.bGuidePages = true;
|
|
|
// this.guideCurrent = 3;
|
|
// this.guideCurrent = 3;
|
|
|
- // this.toView = "QRDeviceView";
|
|
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '请添加蓝牙设备',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.toView = "addDeviceView";
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
|
- // // 2.检测是否连接设备
|
|
|
|
|
|
|
+ // //2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
|
|
|
// if (this.cIndex == -1) {
|
|
// if (this.cIndex == -1) {
|
|
|
// //没有连接设备,提示去连接设备
|
|
// //没有连接设备,提示去连接设备
|
|
|
- // this.$store.state.bGuidePages = true;
|
|
|
|
|
- // this.guideCurrent = 4;
|
|
|
|
|
- // this.toView = "bing-boxingPost";
|
|
|
|
|
- // console.log("bing-boxingPost");
|
|
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '请连接蓝牙设备',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.toView = "addDeviceView";
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
|
- //2.检测是否有设备
|
|
|
|
|
- if (this.BLEDeviceShowList.length == 0) {
|
|
|
|
|
- this.$store.state.bGuidePages = true;
|
|
|
|
|
- this.guideCurrent = 3;
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '请添加蓝牙设备',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- })
|
|
|
|
|
- this.toView = "addDeviceView";
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- //2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
|
|
|
|
|
- if (this.cIndex == -1) {
|
|
|
|
|
- //没有连接设备,提示去连接设备
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '请连接蓝牙设备',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- })
|
|
|
|
|
- this.toView = "addDeviceView";
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1816,27 +1906,34 @@
|
|
|
this.toView = "boxingHitID";
|
|
this.toView = "boxingHitID";
|
|
|
this.$store.state.bNewGuide = false;
|
|
this.$store.state.bNewGuide = false;
|
|
|
} else {
|
|
} else {
|
|
|
- //todo 跳绳模式 发送开启指令
|
|
|
|
|
- if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
|
|
|
|
|
- //打开跳绳模式
|
|
|
|
|
- this.B_OpenRopeSkipping();
|
|
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ //假如有连接bingding设备
|
|
|
|
|
+ this.gCreateSandbagAlgorithm();
|
|
|
|
|
+ this.gStartSimulateBLEUpdate();
|
|
|
} else {
|
|
} else {
|
|
|
- //初始化filter快速打击对象
|
|
|
|
|
- if (this.BLEConnectDevice.usageMode == "hotman") {
|
|
|
|
|
- this.gCreateFilterObj();
|
|
|
|
|
- }
|
|
|
|
|
- //打开加速计
|
|
|
|
|
- this.onWriteBLEConnectionValue({
|
|
|
|
|
- value: "3"
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- //设置加速计b:20ms a:10ms
|
|
|
|
|
|
|
+ //todo 跳绳模式 发送开启指令
|
|
|
|
|
+ if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
|
|
|
|
|
+ //打开跳绳模式
|
|
|
|
|
+ this.B_OpenRopeSkipping();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //初始化filter快速打击对象
|
|
|
|
|
+ if (this.BLEConnectDevice.usageMode == "hotman") {
|
|
|
|
|
+ this.gCreateFilterObj();
|
|
|
|
|
+ }
|
|
|
|
|
+ //打开加速计
|
|
|
this.onWriteBLEConnectionValue({
|
|
this.onWriteBLEConnectionValue({
|
|
|
- value: config.refreshRate
|
|
|
|
|
|
|
+ value: "3"
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- }, 1000)
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ //设置加速计b:20ms a:10ms
|
|
|
|
|
+ this.onWriteBLEConnectionValue({
|
|
|
|
|
+ value: config.refreshRate
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//监听蓝牙回调
|
|
//监听蓝牙回调
|
|
@@ -2223,15 +2320,22 @@
|
|
|
//弹出目标提示后,进行下一步
|
|
//弹出目标提示后,进行下一步
|
|
|
onBoxingPause(bFinish) {
|
|
onBoxingPause(bFinish) {
|
|
|
if (bFinish) {
|
|
if (bFinish) {
|
|
|
- if(this.BLEConnectDevice.usageMode == "ropeSkipping"){
|
|
|
|
|
- this.B_CloseRopeSkipping();
|
|
|
|
|
- }else{
|
|
|
|
|
- //停止蓝牙加速计
|
|
|
|
|
- this.onWriteBLEConnectionValue({
|
|
|
|
|
- value: "4"
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (this.ConnectBindingDevice) {
|
|
|
|
|
+ this.gStopSimulateBLEUpdate();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
|
|
|
|
|
+ this.B_CloseRopeSkipping();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //停止蓝牙加速计
|
|
|
|
|
+ this.onWriteBLEConnectionValue({
|
|
|
|
|
+ value: "4"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
|
|
uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
|
|
|
|
|
|
|
@@ -2365,6 +2469,8 @@
|
|
|
|
|
|
|
|
// console.log(data);
|
|
// console.log(data);
|
|
|
// }).exec();
|
|
// }).exec();
|
|
|
|
|
+ } else if (_self.toView == "openAccGyroView") {
|
|
|
|
|
+ _self.toView = "";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -2529,9 +2635,44 @@
|
|
|
|
|
|
|
|
// }
|
|
// }
|
|
|
// });
|
|
// });
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
+ // testAsyncFunc() {
|
|
|
|
|
+ // // 调用异步方法
|
|
|
|
|
+ // testModule.testAsyncFunc({
|
|
|
|
|
+ // 'name': 'unimp',
|
|
|
|
|
+ // 'age': 1
|
|
|
|
|
+ // },
|
|
|
|
|
+ // (ret) => {
|
|
|
|
|
+ // modal.toast({
|
|
|
|
|
+ // message: ret,
|
|
|
|
|
+ // duration: 1.5
|
|
|
|
|
+ // });
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
|
|
+ // startSyncFunc() {
|
|
|
|
|
+ // // 调用同步方法
|
|
|
|
|
+ // var ret = testModule.onStartAccAndGyro({
|
|
|
|
|
+ // 'name': 'unimp',
|
|
|
|
|
+ // 'age': 1
|
|
|
|
|
+ // })
|
|
|
|
|
+ // modal.toast({
|
|
|
|
|
+ // message: ret,
|
|
|
|
|
+ // duration: 1.5
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ // stopSyncFunc() {
|
|
|
|
|
+ // // 调用同步方法
|
|
|
|
|
+ // var ret = testModule.onStopAccAndGyro({
|
|
|
|
|
+ // 'name': 'unimp',
|
|
|
|
|
+ // 'age': 1
|
|
|
|
|
+ // })
|
|
|
|
|
+ // modal.toast({
|
|
|
|
|
+ // message: ret,
|
|
|
|
|
+ // duration: 1.5
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|