From: snickersun Date: Tue, 8 Sep 2020 07:10:28 +0000 (+0800) Subject: release IcL02Workservice V55 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=2f9a57981e598b4d9c201dc21736fdcb2c502f44;p=icworkservice.git release IcL02Workservice V55 传递血氧时采用测量值。 --- diff --git a/app/IcL02WorkService/release/IcL02WorkService_V54_202009072006_release.apk b/app/IcL02WorkService/release/IcL02WorkService_V54_202009072006_release.apk deleted file mode 100644 index 35a889b..0000000 Binary files a/app/IcL02WorkService/release/IcL02WorkService_V54_202009072006_release.apk and /dev/null differ diff --git a/app/IcL02WorkService/release/IcL02WorkService_V55_202009081509_release.apk b/app/IcL02WorkService/release/IcL02WorkService_V55_202009081509_release.apk new file mode 100644 index 0000000..92fadc5 Binary files /dev/null and b/app/IcL02WorkService/release/IcL02WorkService_V55_202009081509_release.apk differ diff --git a/app/src/main/aidl/com/ic/aidl/blood/IBloodAidlInterface.aidl b/app/src/main/aidl/com/ic/aidl/blood/IBloodAidlInterface.aidl index dae6d01..ae85acf 100644 --- a/app/src/main/aidl/com/ic/aidl/blood/IBloodAidlInterface.aidl +++ b/app/src/main/aidl/com/ic/aidl/blood/IBloodAidlInterface.aidl @@ -12,6 +12,4 @@ interface IBloodAidlInterface { void updateBloodCheckResult(int high,int low,int heart,int oxygen); void updateBloodCheckTips(int top,int bottom); - - } diff --git a/app/src/main/java/com/ic/jni/ICJniUtils.java b/app/src/main/java/com/ic/jni/ICJniUtils.java index a4d97a4..9062096 100644 --- a/app/src/main/java/com/ic/jni/ICJniUtils.java +++ b/app/src/main/java/com/ic/jni/ICJniUtils.java @@ -1,241 +1,241 @@ -package com.ic.jni; - -public class ICJniUtils { - - public enum GSensorType - { - GSENSOR_TYPE_NONE, - GSENSOR_TYPE_QMA7981, - GSENSOR_TYPE_SC7A21, - GSENSOR_TYPE_MAX - }; - - public enum TempSensorType - { - TEMPSENSOR_TYPE_NONE, - TEMPSENSOR_TYPE_NST175, - TEMPSENSOR_TYPE_IC68, - TEMPSENSOR_TYPE_EM7068, - TEMPSENSOR_TYPE_MAX - }; - - public enum PPG_EGC_SensorType - { - PPG_EGC_TYPE_NONE, - PPG_EGC_TYPE_EM7028, - PPG_EGC_TYPE_EM7068, - PPG_EGC_TYPE_HRS3313, - PPG_EGC_TYPE_HRS3301, - PPG_EGC_TYPE_IC66, - PPG_EGC_TYPE_PAH8002, - PPG_EGC_TYPE_MAX - }; - - public ICJniUtils(){ - - } - static { - // build.gradle里面 android\defaultConfig\ndk\moduleName 的名称 - // Android.mk, LOCAL_MODULE 的名称 - System.loadLibrary("ICJniUtils"); - } - - /***************计步控制************************************/ - /*** - * 运行此函数清除 系统计步为0,一版在午夜执行 - * @return - */ - public static native int resetStepCount(); - - /*** - * 获取当前步数 - * @return - */ - public static native int getStepCount(); - - /*** - * 开启计步 不必判断返回值 - * @return - */ - public static native int enablePedometer(); - - /*** - * 停止计步 不必判断返回值 - * @return - */ - public static native int disablePedometer(); - - /*** - * 检测计步当前是否开启 - * @return - * 1开启,0 关闭 - */ - public static native int isPedometerEnabled(); - - /*** - * 获取当前计步器(GSensor)类型 GSensorType - * @return - * 不存在返回 GSENSOR_TYPE_NONE,否则返回Gsensor类型 - * 理论上此设备必选,一定存在。 - */ - public static native int getGsensorType(); - - /*保存当前步数(getStepCount取得的值)到磁盘 不必判断返回值 - * 为了兼容,已经不再使用 - * */ - public static native int saveStepCount(); - - /*恢复保存时的步数数据,下次getStepCount会在恢复的值上增加 不必判断返回值 - * * 为了兼容,已经不再使用 - * */ - public static native int recoverStepCount(); - - /******心率,血压****************************************/ - /*** - * 检查 PPG硬件是否存在,返回PPG_EGC_SensorType - * @return - * 返回PPG_EGC_TYPE_NONE代表不存在,否则返回 传感器类型 - */ - public static native int isPPGavailable(); - - /** - * 开启心率血压检测 - * @return - */ - public static native int enablePPG(); - - /*** - * 停止心率血压检测 - * @return - */ - public static native int disablePPG(); - - - /*** - * 返回PPG 运行状态, 0 停止, 1,运行中 - * @return - */ - public static native int isPPGStarted(); - - /*** - * 返回 心率值 每分钟跳动次数, 通过这个心率>0 判断是否已经有检测结果, - * 有就可以直接通过getHighBloodPressure 和 getLowBloodPressure 获取血压高压低压值 - * @return - */ - public static native int getPPG(); - - /*** - * 返回是否佩戴 0 未佩戴,1 佩戴 。 - * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 - * @return - */ - public static native int isWeared(); - - /*** - * 获取血压高压值 - * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 - * @return - */ - public static native int getHighBloodPressure(); - - /*** - * 获取血压低压值 - * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 - * @return - */ - public static native int getLowBloodPressure(); - - /*** - * 获取血氧值 - * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 - * @return - */ - public static native int getSPO2(); - - - /*** - * 开始温度检测,有些sensor不需要,为了兼容,请开始前执行一次,并且sleep 1秒钟 - * @return - */ - public static native int enableTemperature(); - - /*** - * 停止温度检测,有些sensor不需要,为了兼容请结束后还是要执行一次。 - * @return 返回值<0 表示失败 =>0表示成功 - */ - public static native int disableTemperature(); - - /*** - * 检查体温检测设备是否开启 - * @return 返回0 未开启 1 开启 - */ - public static native int isTemperatureDevOpened(); - /*** - * 执行温度校准操作,一版在整机生产时的恒温箱中执行 - * @param refTemp 恒温箱的温度 - * @return 返回值<0 表示失败 =>0表示成功 - */ - public static native int doTempCalibration(double refTemp); - - /*** - * 获取温度 校准后数据 单位摄氏度 - * @return 返回值<=0 表示失败 >0表示成功 - */ - public static native double getTemperature(); - - /*** - * 设置当前温度标志位, - * @param flag - * 实际上就是按照二进制位来定义的。 - * 0、可以测温 - * 第一位为1,0x1、充电超过2分钟或者充电超过2分钟后拔除5分钟内 0001 - * 第二位为1,0x2、亮屏超过5分钟或者亮屏超过5分钟后灭屏5分钟内 0010 - * 第三位为1,0x4、通话超过2分钟或者通话超过2分钟后挂断5分钟内 0100 - * 所有大于0的都不能测温 - * 注:暂时未启用,预留 - * @return - */ - public static native int setTemperatureValidFlag(int flag); - - /*** - * 此操作仅仅为了检查标志状态设置成功与否,标志已经在内部被使用 - * 注:暂时未启用,预留 - * @return - */ - public static native int getTemperatureValidFlag(); - - /*** - * 根据环境参考温度和腕温换算 体温 - * ic66可以直接输出体温,不需要这个公式。 - * @param wrist_temp - * 腕温 - * @param ref_temp - * 室外参考温度 - * @return 返回值<=0 表示失败 >0表示成功 - */ - public static native double getBodyTempFromWristTemp(double wrist_temp,double ref_temp); - - - /*** - * 有体温检测功能则返回 TempSensorType - * TempSensor_NONE 就表示没有体温检测功能,否则返回温度传感器类型 - * @return - */ - public static native int isTemperatureDevAvailable(); - - - /*获取温度校准前 - * 为了兼容已经不用 - * */ - public static native double getTemperatureOrigin(); - - /*设置校准参数 - * * 为了兼容已经不用 - * */ - public static native int setTemperatureAdjustValue(double value); - - /*设置校准参数 - * * 为了兼容已经不用 - * */ - public static native double getTemperatureAdjustValue(); -} +package com.ic.jni; + +public class ICJniUtils { + + public enum GSensorType + { + GSENSOR_TYPE_NONE, + GSENSOR_TYPE_QMA7981, + GSENSOR_TYPE_SC7A21, + GSENSOR_TYPE_MAX + }; + + public enum TempSensorType + { + TEMPSENSOR_TYPE_NONE, + TEMPSENSOR_TYPE_NST175, + TEMPSENSOR_TYPE_IC68, + TEMPSENSOR_TYPE_EM7068, + TEMPSENSOR_TYPE_MAX + }; + + public enum PPG_EGC_SensorType + { + PPG_EGC_TYPE_NONE, + PPG_EGC_TYPE_EM7028, + PPG_EGC_TYPE_EM7068, + PPG_EGC_TYPE_HRS3313, + PPG_EGC_TYPE_HRS3301, + PPG_EGC_TYPE_IC66, + PPG_EGC_TYPE_PAH8002, + PPG_EGC_TYPE_MAX + }; + + public ICJniUtils(){ + + } + static { + // build.gradle里面 android\defaultConfig\ndk\moduleName 的名称 + // Android.mk, LOCAL_MODULE 的名称 + System.loadLibrary("ICJniUtils"); + } + + /***************计步控制************************************/ + /*** + * 运行此函数清除 系统计步为0,一版在午夜执行 + * @return + */ + public static native int resetStepCount(); + + /*** + * 获取当前步数 + * @return + */ + public static native int getStepCount(); + + /*** + * 开启计步 不必判断返回值 + * @return + */ + public static native int enablePedometer(); + + /*** + * 停止计步 不必判断返回值 + * @return + */ + public static native int disablePedometer(); + + /*** + * 检测计步当前是否开启 + * @return + * 1开启,0 关闭 + */ + public static native int isPedometerEnabled(); + + /*** + * 获取当前计步器(GSensor)类型 GSensorType + * @return + * 不存在返回 GSENSOR_TYPE_NONE,否则返回Gsensor类型 + * 理论上此设备必选,一定存在。 + */ + public static native int getGsensorType(); + + /*保存当前步数(getStepCount取得的值)到磁盘 不必判断返回值 + * 为了兼容,已经不再使用 + * */ + public static native int saveStepCount(); + + /*恢复保存时的步数数据,下次getStepCount会在恢复的值上增加 不必判断返回值 + * * 为了兼容,已经不再使用 + * */ + public static native int recoverStepCount(); + + /******心率,血压****************************************/ + /*** + * 检查 PPG硬件是否存在,返回PPG_EGC_SensorType + * @return + * 返回PPG_EGC_TYPE_NONE代表不存在,否则返回 传感器类型 + */ + public static native int isPPGavailable(); + + /** + * 开启心率血压检测 + * @return + */ + public static native int enablePPG(); + + /*** + * 停止心率血压检测 + * @return + */ + public static native int disablePPG(); + + + /*** + * 返回PPG 运行状态, 0 停止, 1,运行中 + * @return + */ + public static native int isPPGStarted(); + + /*** + * 返回 心率值 每分钟跳动次数, 通过这个心率>0 判断是否已经有检测结果, + * 有就可以直接通过getHighBloodPressure 和 getLowBloodPressure 获取血压高压低压值 + * @return + */ + public static native int getPPG(); + + /*** + * 返回是否佩戴 0 未佩戴,1 佩戴 。 + * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 + * @return + */ + public static native int isWeared(); + + /*** + * 获取血压高压值 + * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 + * @return + */ + public static native int getHighBloodPressure(); + + /*** + * 获取血压低压值 + * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 + * @return + */ + public static native int getLowBloodPressure(); + + /*** + * 获取血氧值 + * 请注意,此数据必须在执行 getPPG() 后才有效,否则一直为上一次的值。 + * @return + */ + public static native int getSPO2(); + + + /*** + * 开始温度检测,有些sensor不需要,为了兼容,请开始前执行一次,并且sleep 1秒钟 + * @return + */ + public static native int enableTemperature(); + + /*** + * 停止温度检测,有些sensor不需要,为了兼容请结束后还是要执行一次。 + * @return 返回值<0 表示失败 =>0表示成功 + */ + public static native int disableTemperature(); + + /*** + * 检查体温检测设备是否开启 + * @return 返回0 未开启 1 开启 + */ + public static native int isTemperatureDevOpened(); + /*** + * 执行温度校准操作,一版在整机生产时的恒温箱中执行 + * @param refTemp 恒温箱的温度 + * @return 返回值<0 表示失败 =>0表示成功 + */ + public static native int doTempCalibration(double refTemp); + + /*** + * 获取温度 校准后数据 单位摄氏度 + * @return 返回值<=0 表示失败 >0表示成功 + */ + public static native double getTemperature(); + + /*** + * 设置当前温度标志位, + * @param flag + * 实际上就是按照二进制位来定义的。 + * 0、可以测温 + * 第一位为1,0x1、充电超过2分钟或者充电超过2分钟后拔除5分钟内 0001 + * 第二位为1,0x2、亮屏超过5分钟或者亮屏超过5分钟后灭屏5分钟内 0010 + * 第三位为1,0x4、通话超过2分钟或者通话超过2分钟后挂断5分钟内 0100 + * 所有大于0的都不能测温 + * 注:暂时未启用,预留 + * @return + */ + public static native int setTemperatureValidFlag(int flag); + + /*** + * 此操作仅仅为了检查标志状态设置成功与否,标志已经在内部被使用 + * 注:暂时未启用,预留 + * @return + */ + public static native int getTemperatureValidFlag(); + + /*** + * 根据环境参考温度和腕温换算 体温 + * ic66可以直接输出体温,不需要这个公式。 + * @param wrist_temp + * 腕温 + * @param ref_temp + * 室外参考温度 + * @return 返回值<=0 表示失败 >0表示成功 + */ + public static native double getBodyTempFromWristTemp(double wrist_temp,double ref_temp); + + + /*** + * 有体温检测功能则返回 TempSensorType + * TempSensor_NONE 就表示没有体温检测功能,否则返回温度传感器类型 + * @return + */ + public static native int isTemperatureDevAvailable(); + + + /*获取温度校准前 + * 为了兼容已经不用 + * */ + public static native double getTemperatureOrigin(); + + /*设置校准参数 + * * 为了兼容已经不用 + * */ + public static native int setTemperatureAdjustValue(double value); + + /*设置校准参数 + * * 为了兼容已经不用 + * */ + public static native double getTemperatureAdjustValue(); +} diff --git a/app/src/main/java/com/ic/work/WorkService.java b/app/src/main/java/com/ic/work/WorkService.java index 04b8010..0455c9f 100644 --- a/app/src/main/java/com/ic/work/WorkService.java +++ b/app/src/main/java/com/ic/work/WorkService.java @@ -199,7 +199,7 @@ public class WorkService extends Service { } if (coreService != null) { - coreService.sendBloodValueMessage(event.getHigh(), event.getLow(), event.getHeart(), 0); + coreService.sendBloodValueMessage(event.getHigh(), event.getLow(), event.getHeart(), event.getOxygen()); } //发送一次广播给 心率 launcher diff --git a/app/version_code.properties b/app/version_code.properties index 4875d18..570ba17 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ #Thu Jul 16 16:46:05 CST 2020 -VERSION_CODE=54 +VERSION_CODE=55