add forecast weekdays to timestamp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2019-03-28 20:51:41 +01:00
committed by Thilo Graf
parent de03897cf6
commit 08e8fd88ad

View File

@@ -1068,15 +1068,19 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
m_wcity = wcity; m_wcity = wcity;
} }
int forecast = CWeather::getInstance()->getForecastSize();
std::string wtimestamp = to_string((int)CWeather::getInstance()->getCurrentTimestamp()); std::string wtimestamp = to_string((int)CWeather::getInstance()->getCurrentTimestamp());
for (int i = 0; i < forecast; i++) // 0 is current day
{
wtimestamp += "\n" + CWeather::getInstance()->getForecastWeekday(i);
}
if (m_wtimestamp.compare(wtimestamp)) if (m_wtimestamp.compare(wtimestamp))
{ {
WriteFile(WEATHER_TIMESTAMP, wtimestamp); WriteFile(WEATHER_TIMESTAMP, wtimestamp);
m_wtimestamp = wtimestamp; m_wtimestamp = wtimestamp;
} }
int forecast = CWeather::getInstance()->getForecastSize();
std::string wtemp = CWeather::getInstance()->getCurrentTemperature(); std::string wtemp = CWeather::getInstance()->getCurrentTemperature();
for (int i = 0; i < forecast; i++) // 0 is current day for (int i = 0; i < forecast; i++) // 0 is current day
{ {