static constexpr int16_t PULLUP_ANIMATOR_VIEW_NUM_FRAMES = 70;
static constexpr int16_t PULLUP_ANIMATOR_VIEW_TIME = 100;
- static constexpr const char *PullUpPaths = "/user/res/weather/PullUp/PullUp_";
static constexpr const char *stepPaths = "/user/res/step/";
+ const char *stepPathsArray[] = {
+ "/user/res/step/1.bin",
+ "/user/res/step/2.bin",
+ "/user/res/step/3.bin",
+ "/user/res/step/4.bin",
+ "/user/res/step/5.bin",
+ "/user/res/step/6.bin",
+ "/user/res/step/7.bin",
+ "/user/res/step/8.bin",
+ "/user/res/step/9.bin",
+ "/user/res/step/10.bin",
+ "/user/res/step/11.bin",
+ "/user/res/step/12.bin",
+ "/user/res/step/13.bin",
+ "/user/res/step/14.bin",
+ "/user/res/step/15.bin",
+ "/user/res/step/16.bin",
+ "/user/res/step/17.bin",
+ "/user/res/step/18.bin",
+ "/user/res/step/19.bin",
+ "/user/res/step/20.bin",
+ };
+
static GoalView *g_pgoalView{nullptr};
GoalView::GoalView()
{
delete PullUpImage;
PullUpImage = nullptr;
}
- ImageCacheManager::GetInstance().UnloadSingleRes("/user/res/step/step_b.bin");
- FreeImageInfoArray(goalAnimator_imageInfo, stepPaths, 20);
}
GoalView *GoalView::GetInstance()
circleProgress1_->SetBackgroundImagePosition(36, 26);
circleProgress1_->SetCapType(CAP_ROUND);
/*----------------------------------------------------------------------------- */
- goalAnimator_imageInfo = CreateImageInfoArray(stepPaths, 20);
if (stepAnimatorView == nullptr)
{
stepAnimatorView = new UIImageAnimatorView();
}
for (uint8_t i = 0; i < 20; i++)
{
- goalAnimatorInfo[i].imageInfo = goalAnimator_imageInfo[i];
- goalAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;
+ goalAnimatorInfo[i].imagePath = stepPathsArray[i];
+ goalAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;
goalAnimatorInfo[i].pos.x = 193;
goalAnimatorInfo[i].pos.y = 90;
goalAnimatorInfo[i].width = 100;
static constexpr int16_t HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES = 20; // 图片帧数\r
static ImageAnimatorInfo HumidityimageAnimatorInfo[HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES];\r
\r
- static constexpr const char *UVPaths = "/user/res/weather/weather60x60gif/UV/";\r
- static constexpr const char *WindSpeedPaths = "/user/res/weather/weather60x60gif/WindSpeed/";\r
- static constexpr const char *HumidityPaths = "/user/res/weather/weather60x60gif/Humidity/";\r
+ const char *UVPathsArray[] = {\r
+ "/user/res/weather/weather60x60gif/UV/1.bin",\r
+ "/user/res/weather/weather60x60gif/UV/2.bin",\r
+ "/user/res/weather/weather60x60gif/UV/3.bin",\r
+ "/user/res/weather/weather60x60gif/UV/4.bin",\r
+ "/user/res/weather/weather60x60gif/UV/5.bin",\r
+ "/user/res/weather/weather60x60gif/UV/6.bin",\r
+ "/user/res/weather/weather60x60gif/UV/7.bin",\r
+ "/user/res/weather/weather60x60gif/UV/8.bin",\r
+ "/user/res/weather/weather60x60gif/UV/9.bin",\r
+ "/user/res/weather/weather60x60gif/UV/10.bin",\r
+ "/user/res/weather/weather60x60gif/UV/11.bin",\r
+ "/user/res/weather/weather60x60gif/UV/12.bin",\r
+ "/user/res/weather/weather60x60gif/UV/13.bin",\r
+ "/user/res/weather/weather60x60gif/UV/14.bin",\r
+ "/user/res/weather/weather60x60gif/UV/15.bin",\r
+ "/user/res/weather/weather60x60gif/UV/16.bin",\r
+ "/user/res/weather/weather60x60gif/UV/17.bin",\r
+ "/user/res/weather/weather60x60gif/UV/18.bin",\r
+ "/user/res/weather/weather60x60gif/UV/19.bin",\r
+ "/user/res/weather/weather60x60gif/UV/20.bin",\r
+ "/user/res/weather/weather60x60gif/UV/21.bin",\r
+ "/user/res/weather/weather60x60gif/UV/22.bin",\r
+ "/user/res/weather/weather60x60gif/UV/23.bin",\r
+ "/user/res/weather/weather60x60gif/UV/24.bin",\r
+ };\r
+\r
+ const char *WindSpeedPathsArray[] ={\r
+ "/user/res/weather/weather60x60gif/WindSpeed/1.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/2.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/3.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/4.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/5.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/6.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/7.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/8.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/9.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/10.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/11.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/12.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/13.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/14.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/15.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/16.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/17.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/18.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/19.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/20.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/21.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/22.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/23.bin",\r
+ "/user/res/weather/weather60x60gif/WindSpeed/24.bin",\r
+ }; \r
+\r
+ const char *HumidityPathsArray[] = {\r
+ "/user/res/weather/weather60x60gif/Humidity/1.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/2.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/3.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/4.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/5.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/6.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/7.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/8.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/9.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/10.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/11.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/12.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/13.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/14.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/15.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/16.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/17.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/18.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/19.bin",\r
+ "/user/res/weather/weather60x60gif/Humidity/20.bin",\r
+ };\r
\r
- static WeatherReportView *g_pWeatherReportView{nullptr};\r
\r
+ static WeatherReportView *g_pWeatherReportView{nullptr};\r
WeatherReportView::WeatherReportView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, " WeatherReportView::WeatherReportView");\r
delete HumidityImageAnimatorView;\r
HumidityImageAnimatorView = nullptr;\r
\r
- // FreeImagePathsArray(UVPathsArray, UV_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
-\r
- // FreeImagePathsArray(WindSpeedPathsArray, WINDSPEED_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
-\r
- // FreeImagePathsArray(HumidityPathsArray, HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
-\r
- FreeImageInfoArray(UVPathsArray, UVPaths, UV_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
- FreeImageInfoArray(WindSpeedPathsArray, WindSpeedPaths, WINDSPEED_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
- FreeImageInfoArray(HumidityPathsArray, HumidityPaths, HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
}\r
}\r
\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherReportView::WeatherReportViewImageAnimatorViewInit");\r
\r
/* ----------------------------- UVImageAnimatorView---------------------------- */\r
- UVPathsArray = CreateImageInfoArray(UVPaths, UV_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
if (UVImageAnimatorView == nullptr)\r
{\r
UVImageAnimatorView = new UIImageAnimatorView();\r
}\r
for (uint8_t i = 0; i < UV_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++)\r
{\r
- // UVimageAnimatorInfo[i].imagePath = UVPathsArray[i];\r
- // UVimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
- UVimageAnimatorInfo[i].imageInfo = UVPathsArray[i];\r
- UVimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;\r
+ UVimageAnimatorInfo[i].imagePath = UVPathsArray[i];\r
+ UVimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
UVimageAnimatorInfo[i].pos.x = UV_IMAGE_ANIMATOR_VIEW_X;\r
UVimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y;\r
UVimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W;\r
UVImageAnimatorView->Start();\r
}\r
/* ----------------------- WindSpeedImageAnimatorView ----------------------- */\r
- WindSpeedPathsArray = CreateImageInfoArray(WindSpeedPaths, WINDSPEED_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
if (WindSpeedImageAnimatorView == nullptr)\r
{\r
WindSpeedImageAnimatorView = new UIImageAnimatorView();\r
}\r
for (uint8_t i = 0; i < WINDSPEED_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++)\r
{\r
- // WindSpeedimageAnimatorInfo[i].imagePath = WindSpeedPathsArray[i];\r
- // WindSpeedimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
- WindSpeedimageAnimatorInfo[i].imageInfo = WindSpeedPathsArray[i];\r
- WindSpeedimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;\r
+ WindSpeedimageAnimatorInfo[i].imagePath = WindSpeedPathsArray[i];\r
+ WindSpeedimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
WindSpeedimageAnimatorInfo[i].pos.x = WINDSPEED_IMAGE_ANIMATOR_VIEW_X;\r
WindSpeedimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y;\r
WindSpeedimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W;\r
WindSpeedImageAnimatorView->Start();\r
}\r
/* ------------------------ HumidityImageAnimatorView ----------------------- */\r
- HumidityPathsArray = CreateImageInfoArray(HumidityPaths, HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);\r
if (HumidityImageAnimatorView == nullptr)\r
{\r
HumidityImageAnimatorView = new UIImageAnimatorView();\r
}\r
for (uint8_t i = 0; i < HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++)\r
{\r
- // HumidityimageAnimatorInfo[i].imagePath = HumidityPathsArray[i];\r
- // HumidityimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
- HumidityimageAnimatorInfo[i].imageInfo = HumidityPathsArray[i];\r
- HumidityimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;\r
+ HumidityimageAnimatorInfo[i].imagePath = HumidityPathsArray[i];\r
+ HumidityimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH;\r
HumidityimageAnimatorInfo[i].pos.x = HUMIDITY_IMAGE_ANIMATOR_VIEW_X;\r
HumidityimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y;\r
HumidityimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W;\r