-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.1","enabled":true,"outputFile":"IcL02WorkService_V59_202106301150_release.apk","fullName":"IcL02WorkServiceRelease","baseName":"IcL02WorkService-release"},"path":"IcL02WorkService_V59_202106301150_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.1","enabled":true,"outputFile":"IcL02WorkService_V59_202107061638_release.apk","fullName":"IcL02WorkServiceRelease","baseName":"IcL02WorkService-release"},"path":"IcL02WorkService_V59_202107061638_release.apk","properties":{}}]
\ No newline at end of file
private PowerManager.WakeLock wakeLock;
private HandlerThread handlerThread;
private Handler handler;
-
+ // 有效值的最大出现次数
@Nullable
@Override
public IBinder onBind(Intent intent) {
//当结果回来的时候,如果队列里没有了,那么就false了
isRunning = true;
//这里处理指令,不可以开启子线程
+
switch (testTaskEvent.sensorType) {
case HEART_RATE_AND_OXYGEN:
//获取心率内容
+ if(testTaskEvent.from.equals(TestTaskEvent.From.CLIENT_CMD)){
+ BloodInfoHelper.MaxtestCount=300;
+ }else{
+ BloodInfoHelper.MaxtestCount=10;
+ }
getHeartInfo();
break;
case TEMPERATURE:
getTemperatureInfo();
break;
case JUST_OXYGEN:
+ if(testTaskEvent.from.equals(TestTaskEvent.From.CLIENT_CMD)){
+ BloodInfoHelper.MaxtestCount=300;
+ }else{
+ BloodInfoHelper.MaxtestCount=10;
+ }
justGetOxygen();
break;
case JUST_HEART_RATE:
+ if(testTaskEvent.from.equals(TestTaskEvent.From.CLIENT_CMD)){
+ BloodInfoHelper.MaxtestCount=300;
+ }else{
+ BloodInfoHelper.MaxtestCount=10;
+ }
justGetHeartRate();
break;
default:
//如果有数据回来,那么就重新设置下一次超时
ppgLooper.postDelayed(mTask, TIME_OUT_VALUE);
}
-
+ public static int MaxtestCount = 10;
//10秒还没有数据回来,那么就结束测试
public static final int TIME_OUT_VALUE = 10 * 1000;
ndkLow = HardwareUtils.getNdkLowBloodValue();
oxygen = HardwareUtils.getNdkOxygenValue();
dispatchPPG();
- if (checkCount > 10 || invalidateTime > 30) {
+ if (checkCount > MaxtestCount || invalidateTime > 30) {
handleResultOtherBlood();
} else {
if (!continueTest) {
// isPPGTesting = true;// (ICJniUtils.isPPGStarted() == 1);
dispatchPPG();
/*[0]---心率;[1]---血压高压;[2]---血压低压;[3]---血氧;[4]---佩戴检测(1--脱手,2--上手);*/
- if (checkCount > 10 || invalidateTime > 30) {
+ if (checkCount > MaxtestCount || invalidateTime > 30) {
//结束了,干掉超时任务
ppgLooper.removeCallbacks(mTask);
handleResult();