mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
lcd4l: get weather forecast data for one day
Origin commit data
------------------
Branch: ni/coolstream
Commit: 07e435ca04
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-03-20 (Wed, 20 Mar 2019)
Origin message was:
------------------
- lcd4l: get weather forecast data for one day
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1018,13 +1018,20 @@ 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))
|
||||||
{
|
{
|
||||||
|
int forecast = 1; // days for forecast
|
||||||
|
|
||||||
std::string wtemp = CWeather::getInstance()->getActTemp();
|
std::string wtemp = CWeather::getInstance()->getActTemp();
|
||||||
std::string wicon = CWeather::getInstance()->getActIcon();
|
for (int i = 0; i < 1 + forecast; i++)
|
||||||
|
wtemp += "\n" + CWeather::getInstance()->getForecastTemp(i);
|
||||||
if (m_wtemp.compare(wtemp))
|
if (m_wtemp.compare(wtemp))
|
||||||
{
|
{
|
||||||
WriteFile(WEATHER_TEMP, wtemp);
|
WriteFile(WEATHER_TEMP, wtemp);
|
||||||
m_wtemp = wtemp;
|
m_wtemp = wtemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string wicon = CWeather::getInstance()->getActIcon();
|
||||||
|
for (int i = 0; i < 1 + forecast; i++)
|
||||||
|
wicon += "\n" + CWeather::getInstance()->getForecastIcon(i);
|
||||||
if (m_wicon.compare(wicon))
|
if (m_wicon.compare(wicon))
|
||||||
{
|
{
|
||||||
WriteFile(WEATHER_ICON, wicon);
|
WriteFile(WEATHER_ICON, wicon);
|
||||||
|
Reference in New Issue
Block a user