DATA_TYPE_STEPS_GOAL_INT, // 运动步数百分比
DATA_TYPE_CALORIE_GOAL_INT, // 运动卡路里目标百分比
- DATA_TYPE_MULTI_FLOAT_BASE = 0x4000, // 多个浮点数据类型基值
+ DATA_TYPE_SWIVEL_GEAR_ONE = 0x2000, //原sdk设置为20 太小了
+ DATA_TYPE_SWIVEL_GEAR_TWO,
+ DATA_TYPE_SWIVEL_GEAR_THREE,
+ DATA_TYPE_SWIVEL_GEAR_FOUR,
+ DATA_TYPE_SWIVEL_GEAR_FIVE,
+ DATA_TYPE_SWIVEL_GEAR_SIX,
+
+ DATA_TYPE_MULTI_FLOAT_BASE = 0x2fff, // 多个浮点数据类型基值
DATA_TYPE_HOUR_MIN, // 时分
- DATA_TYPE_TEXT_BASE = 0x2000, // 文本数据类型基值
+ DATA_TYPE_TEXT_BASE = 0x4fff, // 文本数据类型基值
DATA_TYPE_WEEK_STR, // 星期(string)
DATA_TYPE_DATE_STR, // 日期(string)
DATA_TYPE_WEATHER_STR, // 天气(string)
DATA_TYPE_STEPS_GOAL_STR, // 运动步数目标(string)
DATA_TYPE_CALORIE_GOAL_STR, // 卡路里目标(string)
- DATA_TYPE_SWIVEL_GEAR_ONE = 20,
- DATA_TYPE_SWIVEL_GEAR_TWO,
- DATA_TYPE_SWIVEL_GEAR_THREE,
- DATA_TYPE_SWIVEL_GEAR_FOUR,
- DATA_TYPE_SWIVEL_GEAR_FIVE,
- DATA_TYPE_SWIVEL_GEAR_SIX,
+
DATA_TYPE_MAX = 0x6000, // 数据类型的最大值
};
void DialViewGroup::ProcessData(DialDataType type, DialView *view)
{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DialViewGroup::ProcessData type %d\r\n", type);
int16_t value = static_cast<int16_t>(type) >> 14; // 14: bit shift
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DialViewGroup::ProcessData value %d\r\n", value);
if (value == 0)
{ // 0: float
float floatData = 0;
std::string *textData = nullptr;
int16_t num = 0;
bool ret = ModelDialDataFactory::GetInstance().GetDialTextData(type, textData, num);
- // printf("ModelDialDataFactory type %d num %d ret %d \r\n", type, num, ret);
+ // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ModelDialDataFactory type %d num %d ret %d textData %s\r\n", type, num, ret,textData->c_str());
view->HandleTextData(textData, num);
}
else if (value == 2)
void DialViewGroup::StopDial()
{
- #if 0
- if (MainModel::GetInstance().getVideostate() != false)
- {
- return;
- }
- MainModel::GetInstance().setVideostate(true);
- if (video_ != nullptr)
- {
- if (!video_->IsStopped())
- {
- video_->StopPlay();
- }
- g_video = nullptr;
- }
- else if (kaleidoscope_ != nullptr)
- {
- kaleidoscope_->StopRotateAnimator();
- kaleidoscope_->ClearFocus();
- }
- #endif
+ DoStop();
}
void DialViewGroup::StartDial()
{
- #if 0
- if (MainModel::GetInstance().getVideostate() != true)
+ MainPresenterSample *mainPresenter = MainPresenterSample::GetInstance();
+ if ((mainPresenter == nullptr) || (mainPresenter->GetMainPresenterState() != MainPresenterState::RESUME))
{
return;
}
- MainModel::GetInstance().setVideostate(false);
- if (video_ != nullptr)
- {
- if (video_->IsPaused())
- {
- video_->ResumePlay();
- }
- else if (!video_->IsPlayed())
- {
- video_->StartPlay();
- }
- g_video = video_;
- }
- else if (kaleidoscope_ != nullptr)
- {
- kaleidoscope_->RequestFocus();
- kaleidoscope_->StartRotateAnimator();
- }
- #endif
}
// 更新数据