lcd4l: replace "\n" with string EOL

Origin commit data
------------------
Branch: ni/coolstream
Commit: b212d93b10
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-01-02 (Tue, 02 Jan 2024)

Origin message was:
------------------
- lcd4l: replace "\n" with string EOL

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2024-01-02 22:55:38 +01:00
parent ca90c81128
commit c6937a8748

View File

@@ -398,8 +398,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
{ {
SNeutrinoTheme &t = g_settings.theme; SNeutrinoTheme &t = g_settings.theme;
std::string EOL = "\n";
std::string font = g_settings.font_file; std::string font = g_settings.font_file;
font += "\n" + g_settings.font_file_monospace; font += EOL + g_settings.font_file_monospace;
if (m_font.compare(font)) if (m_font.compare(font))
{ {
@@ -509,7 +511,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
y_res = 1080; y_res = 1080;
std::string Resolution = to_string(x_res) + "x" + to_string(y_res); std::string Resolution = to_string(x_res) + "x" + to_string(y_res);
//Resolution += "\n" + to_string(framerate); //TODO //Resolution += EOL + to_string(framerate); //TODO
if (m_Resolution.compare(Resolution)) if (m_Resolution.compare(Resolution))
{ {
@@ -660,7 +662,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
int RecordCount = CRecordManager::getInstance()->GetRecordCount(); int RecordCount = CRecordManager::getInstance()->GetRecordCount();
std::string _ModeRec = (ModeRec ? "on" : "off"); std::string _ModeRec = (ModeRec ? "on" : "off");
_ModeRec += "\n" + to_string(RecordCount); _ModeRec += EOL + to_string(RecordCount);
if ((m_ModeRec != ModeRec) || (m_RecordCount != RecordCount)) if ((m_ModeRec != ModeRec) || (m_RecordCount != RecordCount))
{ {
@@ -954,9 +956,9 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
} }
std::string Layout = DisplayType + "_" + DisplayMode; std::string Layout = DisplayType + "_" + DisplayMode;
Layout += "\n" + DisplayDriver; Layout += EOL + DisplayDriver;
Layout += "\n" + DisplayRes; Layout += EOL + DisplayRes;
Layout += "\n" + DisplayMode; Layout += EOL + DisplayMode;
if (m_Layout.compare(Layout)) if (m_Layout.compare(Layout))
{ {
@@ -999,7 +1001,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
else else
{ {
Event = g_InfoViewer->get_livestreamInfo1(); Event = g_InfoViewer->get_livestreamInfo1();
Event += "\n" + g_InfoViewer->get_livestreamInfo2(); Event += EOL + g_InfoViewer->get_livestreamInfo2();
} }
} }
@@ -1051,7 +1053,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
if (CurrentNext.flags & CSectionsdClient::epgflags::has_next) if (CurrentNext.flags & CSectionsdClient::epgflags::has_next)
{ {
Event += "\n" + CurrentNext.next_name; Event += EOL + CurrentNext.next_name;
time_t next_start_time = CurrentNext.next_zeit.startzeit; time_t next_start_time = CurrentNext.next_zeit.startzeit;
tm_struct = localtime(&next_start_time); tm_struct = localtime(&next_start_time);
snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min); snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min);
@@ -1160,7 +1162,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
#endif #endif
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
Event += "\n"; // make sure we have at least two lines in event-file Event += EOL; // make sure we have at least two lines in event-file
if (m_Event.compare(Event)) if (m_Event.compare(Event))
{ {
@@ -1224,7 +1226,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
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 for (int i = 0; i < forecast; i++) // 0 is current day
{ {
wtimestamp += "\n" + to_string(CWeather::getInstance()->getForecastWeekday(i)); wtimestamp += EOL + to_string(CWeather::getInstance()->getForecastWeekday(i));
} }
if (m_wtimestamp.compare(wtimestamp)) if (m_wtimestamp.compare(wtimestamp))
{ {
@@ -1235,7 +1237,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
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
{ {
wtemp += "\n" + CWeather::getInstance()->getForecastTemperatureMin(i); wtemp += EOL + CWeather::getInstance()->getForecastTemperatureMin(i);
wtemp += "|" + CWeather::getInstance()->getForecastTemperatureMax(i); wtemp += "|" + CWeather::getInstance()->getForecastTemperatureMax(i);
} }
if (m_wtemp.compare(wtemp)) if (m_wtemp.compare(wtemp))
@@ -1249,7 +1251,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
wwind += "|" + CWeather::getInstance()->getCurrentWindDirection(); wwind += "|" + CWeather::getInstance()->getCurrentWindDirection();
for (int i = 0; i < forecast; i++) // 0 is current day for (int i = 0; i < forecast; i++) // 0 is current day
{ {
wwind += "\n" + CWeather::getInstance()->getForecastWindSpeed(i); wwind += EOL + CWeather::getInstance()->getForecastWindSpeed(i);
wwind += "|" + CWeather::getInstance()->getForecastWindBearing(i); wwind += "|" + CWeather::getInstance()->getForecastWindBearing(i);
wwind += "|" + CWeather::getInstance()->getForecastWindDirection(i); wwind += "|" + CWeather::getInstance()->getForecastWindDirection(i);
} }
@@ -1261,7 +1263,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
std::string wicon = CWeather::getInstance()->getCurrentIcon(); std::string wicon = CWeather::getInstance()->getCurrentIcon();
for (int i = 0; i < forecast; i++) for (int i = 0; i < forecast; i++)
wicon += "\n" + CWeather::getInstance()->getForecastIcon(i); wicon += EOL + CWeather::getInstance()->getForecastIcon(i);
if (m_wicon.compare(wicon)) if (m_wicon.compare(wicon))
{ {
WriteFile(WEATHER_ICON, wicon); WriteFile(WEATHER_ICON, wicon);