{
goal_type=GOAL_STEP;
- if(get_Is_shouw_falg(goal_type))
+ if(get_Is_show_flag(goal_type))
{
if(OHOS::GoalModel::GetInstance().get_step_goal_show())
{
if(OHOS::GoalModel::GetInstance().is_goal_DISTANCE_done())
{
goal_type=GOAL_DISTANCE;
- if(get_Is_shouw_falg(goal_type))
+ if(get_Is_show_flag(goal_type))
{
if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
if(OHOS::GoalModel::GetInstance().is_goal_fatburning_done())
{
goal_type=GOAL_FAT;
- if(get_Is_shouw_falg(goal_type))
+ if(get_Is_show_flag(goal_type))
{
if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
if(OHOS::GoalModel::GetInstance().is_goal_stand_done())
{
goal_type=GOAL_STAND;
- if(get_Is_shouw_falg(goal_type))
+ if(get_Is_show_flag(goal_type))
{
- if(OHOS::GoalModel::GetInstance().get_other_goal_show())
+ if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
}
if(OHOS::GoalModel::GetInstance().is_goal_calories_done())
{
goal_type=GOAL_CALOREIE;
- if(get_Is_shouw_falg(goal_type))
+ if(get_Is_show_flag(goal_type))
{
if(OHOS::GoalModel::GetInstance().get_other_goal_show())
{
void GoalModel::GoalModelInitdata()
{
- OHOS::set_Is_shouw_falg(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES_TIME),OHOS::GOAL_CALOREIE);
- OHOS::set_Is_shouw_falg(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STANDUP_TIMES_TIME),OHOS::GOAL_STAND);
- OHOS::set_Is_shouw_falg(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DURATION_TIME),OHOS::GOAL_FAT);
- OHOS::set_Is_shouw_falg(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DISTANCE_TIME),OHOS::GOAL_DISTANCE);
- OHOS::set_Is_shouw_falg(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEPCOUNT_TIME),OHOS::GOAL_STEP);
+ OHOS::set_Is_show_flag(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES_TIME),OHOS::GOAL_CALOREIE);
+ OHOS::set_Is_show_flag(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STANDUP_TIMES_TIME),OHOS::GOAL_STAND);
+ OHOS::set_Is_show_flag(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DURATION_TIME),OHOS::GOAL_FAT);
+ OHOS::set_Is_show_flag(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DISTANCE_TIME),OHOS::GOAL_DISTANCE);
+ OHOS::set_Is_show_flag(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEPCOUNT_TIME),OHOS::GOAL_STEP);
step_goal_show=ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEP);
other_goal_show=ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER);
UIViewGroup *GoalviewShow(void);
void set_goal_flag_view(uint8_t falg);
- uint8_t get_Is_shouw_falg(uint8_t type);
+ uint8_t get_Is_show_flag(uint8_t type);
- uint8_t set_Is_shouw_falg(uint8_t flag,uint8_t type);
+ uint8_t set_Is_show_flag(uint8_t flag,uint8_t type);
class GoalViewEventListener : public OHOS::UIView::OnClickListener,
SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0);
}
-
-
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "保存每小时卡路里数据");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "保存每小时卡路里数据");
calories_history_save();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "保存每小时距离数据");
distances_history_save();
uint8_t* data=(uint8_t*)req->data;
- if(get_Is_shouw_falg(data[0]))
+ if(get_Is_show_flag(data[0]))
{
set_goal_flag_view(data[0]);
- set_Is_shouw_falg(0,data[0]);
+ set_Is_show_flag(0,data[0]);
const power_display_svr_api_t *display_api = power_display_svr_get_api();
OHOS::BloodOxygenModel::GetInstance()));
printf("health end\n");
/* --------------------------------- 每日目标相关 --------------------------------- */
+ cywee_reset_history_daily_data(); //清除运动相关数据
+
// 午夜清除运动数据
for(int i=1;i<6;i++)
{
- set_Is_shouw_falg(1,i);
+ set_Is_show_flag(1,i);
}
- cywee_reset_history_daily_data(); //清除运动相关数据
+
+
do_cywee_service_check_msg(CYWEE_SERVICE_CMD_RESET_DAILY_DATA, NULL);
+
+ // SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0);
printf("sport end\n");
/* ---------------------------------- 呼吸训练相关 ---------------------------------- */
RespiratoryTrainingModel::GetInstance().ClearTotalRespiratoryTrainingTime();
CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
- //暂时关闭该功能,易导致系统音频锁死
SetMicMutecat1(false);
cat1_phone_state_change_cb(OPERATE_WATCH_ACTIVE);
unused(req);
if (req == NULL) return ;
char* call_data = (char*)malloc(req->len);
+ if(call_data==NULL) return;
int32 ret = memcpy_s(call_data, req->len, req->data, req->len);
if (ret != EOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MsgCenterNotify memcpy_s request data fail!");
// int ret = PlayersModel::GetInstance()->PlayerStop();
stopPlayingMusic();
-
-
if(strcmp(call_data,"SOS")==0)
{
return;
}
- cat1_call_dial(call_data);
-
- CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len);
+ cat1_call_dial(call_data);
- CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
- NotificationManager::GetInstance()->SetWatchCallStatus(true);
+ CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len);
+
+ CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
+ NotificationManager::GetInstance()->SetWatchCallStatus(true);
- cat1_phone_state_change_cb(OPERATE_DIALING);
-
- do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0);
+ cat1_phone_state_change_cb(OPERATE_DIALING);
+
+ do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0);
if (req == NULL) return ;
char* call_data = (char*)malloc(req->len);
+
+ if(call_data==NULL)
+ {
+ return;
+ }
int32 ret = memcpy_s(call_data, req->len, req->data, req->len);
if(strcmp("callfail",call_data)==0)
// }
// }
- uint8_t get_Is_shouw_falg(uint8_t type)
+ uint8_t get_Is_show_flag(uint8_t type)
{
switch (type) {
case GOAL_CALOREIE:
}
- uint8_t set_Is_shouw_falg(uint8_t flag,uint8_t type)
+ uint8_t set_Is_show_flag(uint8_t flag,uint8_t type)
{
switch (type) {
case GOAL_CALOREIE:
GOAL_CALOREIE_falg=flag;
- ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES_TIME,flag);
+ ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES_TIME,flag);
break;
case GOAL_FAT:
InitLabel(labeltag, 70, 215, 326, 97, "label2", tagString.c_str(),
DEFAULT_VECTOR_FONT_FILENAME, 80);
labeltag->SetTextColor(Color::GetColorFromRGBA(0x4f, 0xc3, 0x4c, 0xff));
+ labeltag->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
getView->Add(labeltag);
// 初始化图片数组以及动画
break;
}
labeltag->SetText(tagString.c_str());
+ labeltag->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
getView->Invalidate();
}