switch (acyion) {
case GET_PED_ACTION:
//ThreadPoolManager.getInstance().execute(new PedRunnable(mApp.getApplicationContext(), mApp.getRepository()));
+ IcLog.d(TAG,"GET_PED_ACTION ");
new Thread(new PedRunnable(mApp.getApplicationContext(), mApp.getRepository())).start();
break;
case Intent.ACTION_TIMEZONE_CHANGED:
public void getBloodInfo() {
ICLogger.d("getBloodInfo...");
- boolean[] deviceState = HardwareUtils.isPPGavailableGH301();
+ boolean[] deviceState = HardwareUtils.isPPGavailableIc66();
if (!deviceState[0]) {
IcLog.d(TAG, "deviceState[0] == > false");
boolean[] deviceState = HardwareUtils.isPPGavailableIc66();
- if (!deviceState[0]) {
+ if (!deviceState[0]) {//没有 ECG sensor
sendTipsEventBus(BLOOD_NULL_TIPS, BLOOD_NOT_DEVICE);
//add by TrillGates notify task finished.
EventBus.getDefault().post(new TaskFinishedEvent());
return;
}
- if (deviceState[1]) {
+ if (deviceState[1]) {//有 IC66或者GH301
sendTipsEventBus(BLOOD_PLEASE_QUIET, BLOOD_START_CHECK);
EventBus.getDefault().post(new BloodSensorEvent(1));
- } else {
+ } else {// 其他ECG Sensor
checkBloodOther();
}
//add by TrillGates notify task finished.
int value = ICJniUtils.isPPGavailable();
return new boolean[]{
value > ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_NONE.ordinal(),
- value == ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_IC66.ordinal()
- };
- } catch (Exception e) {
- IcLog.e(TAG, "", e);
- return new boolean[]{false, false};
- }
- }
-
- public static boolean[] isPPGavailableGH301() {
- try {
- int value = ICJniUtils.isPPGavailable();
- return new boolean[]{
- value > ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_NONE.ordinal(),
- value == ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_GH301.ordinal()
+ value == ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_IC66.ordinal()||value == ICJniUtils.PPG_EGC_SensorType.PPG_EGC_TYPE_GH301.ordinal()
};
} catch (Exception e) {
IcLog.e(TAG, "", e);