<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes"/>\r
<exclude-output/>\r
<content url="file://$MODULE_DIR$">\r
- <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true"/>\r
- <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true"/>\r
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true"/>\r
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" generated="true"/>\r
- <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true"/>\r
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true"/>\r
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true"/>\r
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":678,"versionName":"2010262143","enabled":true,"outputFile":"ICSer_V678_2010262143_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V678_2010262143_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":680,"versionName":"2010271815","enabled":true,"outputFile":"ICSer_V680_2010271815_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V680_2010271815_release.apk","properties":{}}]
\ No newline at end of file
\r
public void setHeartRateDetectAlarm(int heartRateDetectAlarmCycle){\r
if (Config.noPPGSensor) {\r
+ ICLogger.i("setHeartRateDetectAlarm oPPGSensor");\r
return;\r
}\r
StringBuilder sb=new StringBuilder();\r
StringBuilder sb=new StringBuilder();\r
int cycle=runtime.temp_test_Cycle;\r
\r
- if(Config.noTempSensor)\r
- return;\r
+ if(Config.noTempSensor) {\r
+ ICLogger.i("setTempAlarm noTempSensor");\r
+ return;\r
+ }\r
if (cycle>1) {\r
AlarmHelper.setRealTimeAlarmInSeconds(runtime.getContextProxy().context, cycle, TEMP_ALARM);\r
sb.append(" setTempAlarm " + TEMP_ALARM + ", cycle " + cycle);\r
}\r
\r
private static final String HEART_ACTION = "com.ic.action.BLOOD_HEART";\r
- private void sendHeartBroadcast(int count) {\r
+ private void sendHeartBroadcast(int count,int spo2) {\r
Intent pedIntent = new Intent();\r
pedIntent.setAction(HEART_ACTION);\r
pedIntent.putExtra("BLOOD_HEART", count);\r
- ICLogger.i("sendHeartBroadcast "+HEART_ACTION+" BLOOD_HEART "+count);\r
+ pedIntent.putExtra("BLOOD_SPO2", spo2);\r
+ ICLogger.i("sendHeartBroadcast "+HEART_ACTION+" BLOOD_HEART "+count+" BLOOD_SPO2 "+spo2);\r
runtime.getContextProxy().context.sendBroadcast(pedIntent);\r
}\r
public HeartRateManager(Runtime _runtime,Connection _connection){\r
if (runtime.getHRS().getHeartrateWorkingStat() == heartRateStatus.HEARTRATE_WORKINGSTAT.HEARTRATE_TEST_SUCCESS) {\r
runtime.getHRS().setLastTestTime(TimeUtil.getSystemTime3());\r
//发送PPG给Launcher,显示在主界面用\r
- sendHeartBroadcast(runtime.getHRS().getPPG());\r
+ sendHeartBroadcast(runtime.getHRS().getPPG(),runtime.getHRS().getSpo2());\r
if(Runtime.practising==true){\r
ICLogger.i("自由锻炼中,设置测量心率! "+runtime.getHRS().getPPG()+","+runtime.getHRS().getBPH()+","+runtime.getHRS().getBPL()+","+runtime.getHRS().getSpo2());\r
Runtime.healthInfo.setPPGECGData(runtime.getHRS().getPPG(),runtime.getHRS().getBPH(),runtime.getHRS().getBPL(),runtime.getHRS().getSpo2());\r
}\r
}else {\r
StringMessage PPGDATA = protocolAPIHelper.getPPG_ECG_MSG(runtime);\r
+ //发送给EQC服务器的\r
sendBroadcastPPGResult();\r
//因为协议中没有时间变量,所以只能实时传输,如果恰巧没有网络也只能丢弃,有时间变量的话,可以考虑通过deliver的buffer来进行缓存发送\r
if (PPGDATA == null) {\r
}\r
}\r
\r
+ private BroadcastReceiver PPGStartReceiver = new BroadcastReceiver() {\r
+ public void onReceive(Context param1Context, Intent param1Intent) {\r
+ if (ACTION_HEATR_RATE_START.equals(param1Intent.getAction())) {\r
+\r
+ //此消息来源于BroadCaset,收到开始测试的消息。\r
+ //此时需要重置HeartRateDetect Timer\r
+ //倘若有 参数 PPGTestCycle,则根据这个数值进行设置\r
+ int ppgtestCycle=param1Intent.getIntExtra("PPGTestCycle",-1);\r
+ if (ppgtestCycle >0){\r
+ Config.setPPGTestCycle(runtime.getContextProxy().context,ppgtestCycle);\r
+ runtime.setPpgTestCycle(Config.getPPGTestCycle(runtime.getContextProxy().context));\r
+ ICLogger.i("get and set PPGTestCycle "+ppgtestCycle);\r
+ }\r
+ ICLogger.i("PPGStartReceiver ACTION_HEATR_RATE_START "+ppgtestCycle);\r
+ CoreService.getInstance().setHeartRateDetectAlarm(runtime.getPpgTestCycle());\r
+// HeartRateManager.this.startPPG();\r
+ }\r
+\r
\r
+ }\r
+ };\r
+ public void regReceiver(){\r
+ //注册“ACTION_HEATR_RATE_START”的广播接收器,接收来自协议的设置广播\r
+ IntentFilter intentFilter = new IntentFilter();\r
+ intentFilter.addAction(ACTION_HEATR_RATE_START);\r
+ runtime.getContextProxy().context.registerReceiver(PPGStartReceiver, intentFilter);\r
+ }\r
+\r
+ public void unRegReceiver(){\r
+ runtime.getContextProxy().context.unregisterReceiver(PPGStartReceiver);\r
+ }\r
\r
public void onAlarmClock(Connection paramConnection, Runtime paramRuntime) {}\r
\r
public void onAttach(Connection paramConnection, Runtime paramRuntime) {\r
\r
// this.mSignalUtil = SimSignalUtil.getInstance((paramRuntime.getContextProxy()).context);\r
-\r
+ regReceiver();\r
}\r
\r
public void onDetach(Connection paramConnection, Runtime paramRuntime) {\r
-\r
+ unRegReceiver();\r
}\r
\r
public boolean onUserRequest(Intent paramIntent, Connection paramConnection, final Runtime runtime) {\r
}\r
public void sendBrodcast(String action,Intent intent){\r
intent.setAction(action);\r
+ ICLogger.i("send broadcast action "+action);\r
this.context.sendBroadcast(intent);\r
}\r
\r
import static com.enqualcomm.support.Constants.RESUME_ACTION;\r
\r
import static com.enqualcomm.support.bean.Content.CONTACT_CATEGORY_GROUP;\r
+import static com.enqualcomm.support.utils.TemperatureUtil.KEY_TEMP_BYPROTOCOL;\r
import static com.enqualcomm.support.utils.TemperatureUtil.KEY_TEMP_OUT;\r
\r
\r
double wrist_temp = paramIntent.getDoubleExtra(KEY_TEMP_WRIST, 0.0f);\r
double body_temp = paramIntent.getDoubleExtra(KEY_TEMP_BODY, 0.0f);\r
double tempOut = paramIntent.getDoubleExtra(KEY_TEMP_OUT, 0.0f);\r
-\r
- ICLogger.i("Received Temperature wrist "+wrist_temp+" body "+body_temp);\r
- StringMessage temperatureMsg = protocolAPIHelper.getTemperatureMSG(wrist_temp, body_temp,tempOut,null);\r
- if (temperatureMsg!=null)\r
- {\r
+ boolean byprotocol=paramIntent.getBooleanExtra(KEY_TEMP_BYPROTOCOL,false);\r
+ if(byprotocol==false) {\r
+ ICLogger.i("Received Temperature wrist "+wrist_temp+" body "+body_temp);\r
+ StringMessage temperatureMsg = protocolAPIHelper.getTemperatureMSG(wrist_temp, body_temp, tempOut, null);\r
+ if (temperatureMsg != null) {\r
ICLogger.i("temp 发送体温测量值 " + temperatureMsg.isFromCache());\r
}\r
Deliver.sendLocationMSG(temperatureMsg);\r
+ }else{\r
+ ICLogger.i("Skip protocol Temperature wrist "+wrist_temp+" body "+body_temp);\r
+\r
+ }\r
}else if (ACTION_SET_SIT_RANGE.equals(str)) {\r
if (paramIntent.hasExtra( Constants.KEY_SIT_RANGE)){\r
int sitrange=paramIntent.getIntExtra(Constants.KEY_SIT_RANGE,0);\r
public static final String KEY_TEMP_BODY = "body"; // double 体温\r
public static final String KEY_TEMP_WRIST = "wrist"; // double 腕温\r
public static final String KEY_TEMP_OUT = "out"; //temp out\r
+ public static final String KEY_TEMP_BYPROTOCOL = "protocol"; //temp out\r
private static void sendTempBroadcast(double value, double animal,double tempOut) {\r
Intent pedIntent = new Intent();\r
pedIntent.setAction(ACTION_TEMP_RESULT);\r
pedIntent.putExtra(KEY_TEMP_WRIST, value);\r
pedIntent.putExtra(KEY_TEMP_BODY, animal);\r
pedIntent.putExtra(KEY_TEMP_OUT, tempOut);\r
+ pedIntent.putExtra(KEY_TEMP_BYPROTOCOL,true);\r
if(CoreService.getInstance()!=null)\r
CoreService.getInstance().sendBroadcast(pedIntent);\r
}\r
import java.util.HashMap;\r
import java.util.Locale;\r
\r
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;\r
+import static android.content.Intent.FLAG_INCLUDE_STOPPED_PACKAGES;\r
import static com.enqualcomm.support.Constants.ACTION_HEATR_RATE_START;\r
import static com.enqualcomm.support.Constants.ACTION_REMOTE_CAMERA;\r
import static com.enqualcomm.support.LocationClient.LOCATION_MODE;\r
if (cmdlist.length == 4){\r
String cmdindex=cmdlist[2];\r
String txtmsg=cmdlist[3];\r
-\r
txtmsg=Util.UrlGB2312ToUTF8(txtmsg);\r
StringMessage msg=AP40(cmdindex,1);\r
//设定当前工作模式及循环频率\r
//发送重置PPGCycle的广播,会在CoreServer里面执行\r
Intent intent = new Intent();\r
intent.putExtra("PPGTestCycle", Integer.parseInt(cycle));\r
+ intent.setFlags(FLAG_INCLUDE_STOPPED_PACKAGES);\r
+ intent.setFlags(FLAG_ACTIVITY_NEW_TASK);\r
runtime.getContextProxy().sendBrodcast(ACTION_HEATR_RATE_START, intent);\r
}catch (Exception e){\r
ICLogger.e(e.getMessage(),e);\r
-#Mon Oct 26 21:43:41 CST 2020\r
-VERSION_CODE=678\r
+#Tue Oct 27 18:15:20 CST 2020\r
+VERSION_CODE=680\r