* @Author: luozheng 1732036298@qq.com
* @Date: 2024-08-17 16:43:46
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-19 09:31:47
+ * @LastEditTime: 2024-08-19 11:00:50
* @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/include/notify/motion_recognition_notification.h
*/
void SetMotionTypeId(int type);
int GetMotionType(void);
+ int GetMotionTypeTextId(void);
private:
MotionRecognitionViewEventListener();
{
uint8_t* motionType=(uint8_t*)req->data;
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyArAlertProc,motionType = %d !",*motionType);
- if(*motionType == 0) //未知运动不弹窗
+ if(*motionType > 5 || *motionType <1) //未知运动不弹窗
{
return;
}
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-08-17 16:44:20
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-19 10:15:11
+ * @LastEditTime: 2024-08-19 11:25:09
* @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp
*/
#include "notification_manager.h"
/*关闭弹窗*/
NotificationManager::GetInstance()->StopNotify();
/*开始运动*/
+ int textId = GetMotionTypeTextId();
+ // set_sport_config(textId);
}
return true;
motionType = STR_MOTION_DETECTION_ROWING_NOTE;
break;
case 5:
- motionType = STR_MOTION_DETECTION_ROWING_NOTE;
- break;
- default:
- motionType = STR_MOTION_DETECTION_WALK_NOTE;
+ motionType = STR_MOTION_DETECTION_ELLIPTICAL_NOTE;
break;
}
return motionType;
}
+ int MotionRecognitionViewEventListener::GetMotionTypeTextId(void)
+ {
+ int motionTypeTextId;
+ switch (motionTypeId)
+ {
+ case 1:
+ motionTypeTextId = STR_EXERCISE_OUTDOORWALKING;
+ break;
+ case 2:
+ motionTypeTextId = STR_EXERCISE_OUTDOORRUNNING;
+ break;
+ case 3:
+ motionTypeTextId = STR_EXERCISE_OUTDOORBIKING;
+ break;
+ case 4:
+ motionTypeTextId = STR_EXERCISE_ROWINGMACHINE;
+ break;
+ case 5:
+ motionTypeTextId = STR_EXERCISE_ELLIPTICALTRAINER;
+ break;
+ }
+ return motionTypeTextId;
+ }
+
static std::string UpdateNoteLabelText(UILabelExt *&label, const std::string &newText, int id)
{
if (label == nullptr)