mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- lcd4l: write weather_city file
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -104,6 +104,7 @@ extern CPictureViewer *g_PicViewer;
|
|||||||
#define FCOLOR2 LCD_DATADIR "fcolor2"
|
#define FCOLOR2 LCD_DATADIR "fcolor2"
|
||||||
#define PBCOLOR LCD_DATADIR "pbcolor"
|
#define PBCOLOR LCD_DATADIR "pbcolor"
|
||||||
|
|
||||||
|
#define WEATHER_CITY LCD_DATADIR "weather_city"
|
||||||
#define WEATHER_TEMP LCD_DATADIR "weather_temp"
|
#define WEATHER_TEMP LCD_DATADIR "weather_temp"
|
||||||
#define WEATHER_ICON LCD_DATADIR "weather_icon"
|
#define WEATHER_ICON LCD_DATADIR "weather_icon"
|
||||||
|
|
||||||
@@ -298,6 +299,7 @@ void CLCD4l::Init()
|
|||||||
m_Start = "00:00";
|
m_Start = "00:00";
|
||||||
m_End = "00:00";
|
m_End = "00:00";
|
||||||
|
|
||||||
|
m_wcity = "";
|
||||||
m_wtemp = "";
|
m_wtemp = "";
|
||||||
m_wicon = "";
|
m_wicon = "";
|
||||||
|
|
||||||
@@ -1055,6 +1057,13 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
|
|
||||||
if (g_settings.weather_enabled && CWeather::getInstance()->checkUpdate(firstRun))
|
if (g_settings.weather_enabled && CWeather::getInstance()->checkUpdate(firstRun))
|
||||||
{
|
{
|
||||||
|
std::string wcity = CWeather::getInstance()->getCity();
|
||||||
|
if (m_wcity.compare(wcity))
|
||||||
|
{
|
||||||
|
WriteFile(WEATHER_CITY, wcity);
|
||||||
|
m_wcity = wcity;
|
||||||
|
}
|
||||||
|
|
||||||
int forecast = 1; // days for forecast
|
int forecast = 1; // days for forecast
|
||||||
|
|
||||||
std::string wtemp = CWeather::getInstance()->getActTemp();
|
std::string wtemp = CWeather::getInstance()->getActTemp();
|
||||||
@@ -1075,7 +1084,6 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
m_wicon = wicon;
|
m_wicon = wicon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
@@ -128,6 +128,7 @@ class CLCD4l
|
|||||||
std::string m_fcolor2;
|
std::string m_fcolor2;
|
||||||
std::string m_pbcolor;
|
std::string m_pbcolor;
|
||||||
|
|
||||||
|
std::string m_wcity;
|
||||||
std::string m_wtemp;
|
std::string m_wtemp;
|
||||||
std::string m_wicon;
|
std::string m_wicon;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user