#include "VocassistModel.h"\r
#include "VocassistView.h"\r
#include "VocassistPresenter.h"\r
+#include "uicomponents/UIComponents.h"\r
\r
static constexpr uint16_t SWITCH_MAP_NUM = 16;\r
static constexpr uint16_t ANI_X = 84;\r
callwordContext = nullptr;\r
delete workFrame;\r
workFrame = nullptr;\r
+\r
+ (void)memset_s(storPicPathBuf, sizeof(storPicPathBuf), 0, sizeof(storPicPathBuf));\r
+ for (int i = 0; i < ANI_TOTAL_NUM; i++) {\r
+ sprintf_s(storPicPathBuf[i], sizeof(storPicPathBuf[i]),\r
+ RES_PATH"/VOICE_ASSISTANT_%02d.bin", i + 1);\r
+ ImageCacheManager::GetInstance().UnloadSingleRes((const char *)storPicPathBuf[i]);\r
+\r
+ }\r
}\r
\r
VoiceAssistance *VoiceAssistance::GetInstance()\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Splice failed!!");\r
return;\r
}\r
- imageAnimatorInfo[i].imagePath = (const char *)storPicPathBuf[i];\r
+ imageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes((const char *)storPicPathBuf[i]);\r
imageAnimatorInfo[i].pos.x = ANI_X;\r
imageAnimatorInfo[i].pos.y = ANI_Y;\r
imageAnimatorInfo[i].width = ANI_SL;\r
imageAnimatorInfo[i].height = ANI_SL;\r
- imageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
+ imageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceAssistView] VoiceAssistanceInitImageAnimatorSource success!!");\r
}\r
void cywee_set_abs_static(void)
{
- int time = get_config_heart_from_config_model();
+ //int time = get_config_heart_from_config_model();
memset(&scl, 0, sizeof(scl));
scl.iData[0] = 1;
- scl.iData[1] = time * 60;
+ scl.iData[1] = 90 * 60;
CWM_SettingControl(SCL_ABS_STATIC_CONFIG, &scl);
}
if(is_abs_static_state == 1)
{
wearstatus = 0;
+ is_abs_static_state = 0;
}
- is_abs_static_state = 0;
-
memset(&csd, 0, sizeof(CUSTOM_OFFBODY_DETECT));
csd.sensorType = CUSTOM_OFFBODY_DETECT;
csd.fData[0] = wearstatus;
{
send_ppg_cmd_msg(PPG_SERVICE_CMD_TYPE_DO_PPG_TEST);
hrs_mode_state = 1;
+ hrs = 0;//运动开始,清零心率
}
else
{
c_activity_result_t.duration = (int)sensorEVT->fData[5];
c_activity_result_t.MHR_zone = (int)sensorEVT->fData[6];
c_activity_result_t.hrs = hrs;
-
+ hrs = 0; //每次上报完 清除心率值
cywee_func(CYWEE_MSG_TYPE_ACTIVITY_UPDATE,&c_activity_result_t,sizeof(cywee_activity_result_t));
}else if((int)sensorEVT->fData[0] == 102)
c_activity_result_t.step_length = (float)sensorEVT->fData[6];
c_activity_result_t.pace = (int)sensorEVT->fData[7];
c_activity_result_t.hrs = hrs;
+ hrs = 0; //每次上报完 清除心率值
cywee_func(CYWEE_MSG_TYPE_ACTIVITY_UPDATE,&c_activity_result_t,sizeof(cywee_activity_result_t));
CustomEventPublish(TOPIC_EVENT_STEPDATA_UPDATE,&stepcount,sizeof(int));
}
// CWM_Sensor_Enable(IDX_GYRO);
CWM_Sensor_Enable(IDX_ALGO_NO_MOTION);
//CWM_OS_dbgPrintf("[DBG] %s %d\n", __func__,__LINE__);
- // CWM_Sensor_Enable(IDX_ALGO_ANY_MOTIOIN);
- //CWM_Sensor_Enable(IDX_ALGO_ABSOLUTE_STATIC);
+ // CWM_Sensor_Enable(IDX_ALGO_ANY_MOTION);
+ CWM_Sensor_Enable(IDX_ALGO_ABSOLUTE_STATIC);
//CWM_OS_dbgPrintf("[DBG] %s %d\n", __func__,__LINE__);
cywee_restoreData();