goal_type=GOAL_STEP;
if(get_Is_shouw_falg(goal_type))
{
- if(0==ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEP))
+ if(OHOS::GoalModel::GetInstance().get_step_goal_show())
{
- CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+ CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
}
}
goal_type=GOAL_DISTANCE;
if(get_Is_shouw_falg(goal_type))
{
- if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+ if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
goal_type=GOAL_FAT;
if(get_Is_shouw_falg(goal_type))
{
- if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+ if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
goal_type=GOAL_STAND;
if(get_Is_shouw_falg(goal_type))
{
- if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+ if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
goal_type=GOAL_CALOREIE;
if(get_Is_shouw_falg(goal_type))
{
- if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+ if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
std::bind(&OHOS::BloodOxygenModel::CleanAllData, OHOS::BloodOxygenModel::GetInstance()));
/* --------------------------------- 每日目标相关 --------------------------------- */
// 午夜清除运动数据
+ for(int i=1;i<6;i++)
+ {
+ set_Is_shouw_falg(1,i);
+ }
+
do_cywee_service_check_msg(CYWEE_SERVICE_CMD_RESET_DAILY_DATA, NULL);
printf("******nextday is end******\r\n");
#endif
static UILabelButtonExt *buttonok_ = nullptr;
static UIImageAnimatorView *imageAnimator{nullptr};
static const ImageInfo **winimageInfos;
- static ImageAnimatorInfo *winimageAnimatorInfo{nullptr};
+ static ImageAnimatorInfo winimageAnimatorInfo[94]{0};
static std::string winbasePath = "/user/res/Training/training_GIF/win/";
void Freegoalview(void)
}
}
+ // static void InitImageAnimatorSource(UIImageAnimatorView *&imageAnimator,
+ // ImageAnimatorInfo *&imageAnimatorInfo,
+ // const ImageInfo **imageInfo, int numFrames,
+ // int left, int top, int width, int height,
+ // const char *viewId, int time) {
+ // if (imageAnimator == nullptr) {
+ // imageAnimator = new UIImageAnimatorView();
+ // }
+ // imageAnimator->SetPosition(left, top);
+ // imageAnimator->Resize(width, height);
+ // imageAnimator->SetViewId(viewId);
+ // // imageAnimator->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);
+ // imageAnimator->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+
+ // // imageAnimatorInfo = new ImageAnimatorInfo[numFrames];
+ // for (int i = 0; i < numFrames; i++) {
+ // imageAnimatorInfo[i].imageInfo = imageInfo[i];
+ // imageAnimatorInfo[i].pos.x = left;
+ // imageAnimatorInfo[i].pos.y = top;
+ // imageAnimatorInfo[i].width = width;
+ // imageAnimatorInfo[i].height = height;
+ // imageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;
+ // }
+
+ // imageAnimator->SetImageAnimatorSrc(imageAnimatorInfo, numFrames,
+ // time); // 200 is the default delay time
+ // imageAnimator->SetTimeOfPause(time);
+ // imageAnimator->SetRepeat(true);
+ // }
+
+
uint8_t set_Is_shouw_falg(uint8_t flag,uint8_t type)
{
switch (type) {
break;
case GOAL_FAT:
tag = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DURATION);
- tagString=std::to_string(tag)+"minute";
+ tagString=std::to_string(tag)+"min";
break;
case GOAL_STAND:
tag = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STANDUP_TIMES);