/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-04-08 18:40:09
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-09-28 17:27:46
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-10-24 15:32:28
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp
*/
#include "weather/include/WeatherModel.h"
{
// int index = Weather_data_t_now.iconNight;//夜晚天气图标
int index;
- if (IsNightTime())
- {
- index = Weather_data_t_now.iconNight; // 夜晚天气图标
- }
- else
- {
- index = Weather_data_seven_data[0].iconDay; // 白天天气图标
- }
+ // if (IsNightTime())
+ // {
+ // index = Weather_data_t_now.iconNight; // 夜晚天气图标
+ // }
+ // else
+ // {
+ // index = Weather_data_seven_data[0].iconDay; // 白天天气图标
+ // }
+ index = Weather_data_seven_data[0].iconDay; // 白天天气图标
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Weather_data_t_now.iconNight = %d", index);
return weather65x65[index];
}
std::string WeatherModel::GetWeatherDescription()
{
std::string WeatherDescription;
- if (IsNightTime())
- {
- WeatherDescription = Weather_data_t_now.textNight;
- }
- else
- {
- WeatherDescription = Weather_data_seven_data[0].textDay;
- }
+ // if (IsNightTime())
+ // {
+ // WeatherDescription = Weather_data_t_now.textNight;
+ // }
+ // else
+ // {
+ // WeatherDescription = Weather_data_seven_data[0].textDay;
+ // }
+ WeatherDescription = Weather_data_seven_data[0].textDay;
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "WeatherDescription:%s", WeatherDescription.c_str());
return WeatherDescription;
}
if (DialModelWeather::GetInstance())
{
int index;
- if(IsNightTime())
- {
- index = Weather_data_t_now.iconNight; // 夜晚天气图标
- }
- else
- {
- index = Weather_data_seven_data[0].iconDay; //白天天气图标
- }
+ // if(IsNightTime())
+ // {
+ // index = Weather_data_t_now.iconNight; // 夜晚天气图标
+ // }
+ // else
+ // {
+ // index = Weather_data_seven_data[0].iconDay; //白天天气图标
+ // }
+ index = Weather_data_seven_data[0].iconDay; //白天天气图标
DialModelWeather::GetInstance()->UpdateWeather(index); // 更新主界面天气图标
// const std::string str = GetWeatherTemperature() + " "+GetWeatherDescription();
const std::string str = GetWeatherTemperature();