#include "cywee_service.h"
#include "custom_runtime.h"
#include "custom_save_runtime.h"
+#include "hx3695_factory_test.h"
static bool g_ppg_service_initialled = false;
errcode_t send_ppg_cmd_msg(int cmd)
{
errcode_t ret;
- if (ppg_sensor_exist == false)
+ if (ppg_sensor_exist == false) {
+ uapi_save_runtime_log(RUNTIME_LOG_HEART_EXIST_ERROR);
return OSAL_FAILURE;
+ }
PPG_CMD_TYPE_T mail = 0;
mail = cmd;
ret = osal_msg_queue_write_copy(g_app_queue, (void *)&mail,
sizeof(PPG_CMD_TYPE_T), 0);
if (ret != OSAL_SUCCESS) {
- PRINT_ERR("Error ppg Check MSG 0x%02X send failed! err=0x%x! \r\n",cmd, ret);
+ PRINT_ERR("Error ppg Check MSG 0x%02X send failed! err=0x%x! \r\n", cmd,
+ ret);
+ uapi_save_runtime_log(RUNTIME_LOG_HEART_MSG_ERROR);
}
return ret;
}
#ifdef PPG_HX3695
tyhx_poweron();
- if ( hx3695_chip_check() == false)
+ if ( hx3695_chip_check_id() == false)
{
//TODO 没找到3695,退出线程
PRINT("3695 not exist!\r\n");
RUNTIME_LOG_HEART_VALID_VALUE,
//获取到1个未佩戴值
RUNTIME_LOG_HEART_NOT_WEAR,
+ //心率msg接收失败
+ RUNTIME_LOG_HEART_MSG_ERROR,
+ //心率sensor不存在
+ RUNTIME_LOG_HEART_EXIST_ERROR,
/*******************************/
// 佩戴