mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 19:01:25 +02:00
- audioplayer/glcd: fix compiler warnings
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -2397,19 +2397,19 @@ void CAudioPlayerGui::updateTimes(const bool force)
|
|||||||
time_t sTime = time(NULL);
|
time_t sTime = time(NULL);
|
||||||
sTime -= m_time_played;
|
sTime -= m_time_played;
|
||||||
tm_struct = localtime(&sTime);
|
tm_struct = localtime(&sTime);
|
||||||
start = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
glcd_start = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
||||||
|
|
||||||
time_t eTime = time(NULL);
|
time_t eTime = time(NULL);
|
||||||
eTime += m_time_total - m_time_played;
|
eTime += m_time_total - m_time_played;
|
||||||
tm_struct = localtime(&eTime);
|
tm_struct = localtime(&eTime);
|
||||||
end = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
glcd_end = to_string(tm_struct->tm_hour/10) + to_string(tm_struct->tm_hour%10) + ":" + to_string(tm_struct->tm_min/10) + to_string(tm_struct->tm_min%10);
|
||||||
|
|
||||||
glcd_position = 100 * m_time_played / m_time_total;
|
glcd_position = 100 * m_time_played / m_time_total;
|
||||||
|
|
||||||
cGLCD::lockChannel(channel, epg, uint8_t(glcd_position));
|
cGLCD::lockChannel(glcd_channel, glcd_epg, uint8_t(glcd_position));
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
||||||
}
|
}
|
||||||
@@ -2421,25 +2421,25 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
const CAudioMetaData meta = CAudioPlayer::getInstance()->getMetaData();
|
const CAudioMetaData meta = CAudioPlayer::getInstance()->getMetaData();
|
||||||
if ( !meta.artist.empty() )
|
if ( !meta.artist.empty() )
|
||||||
epg = meta.artist;
|
glcd_epg = meta.artist;
|
||||||
if ( !meta.artist.empty() && !meta.title.empty() )
|
if ( !meta.artist.empty() && !meta.title.empty() )
|
||||||
epg = " - ";
|
glcd_epg = " - ";
|
||||||
if ( !meta.title.empty() )
|
if ( !meta.title.empty() )
|
||||||
epg = meta.title;
|
glcd_epg = meta.title;
|
||||||
#endif
|
#endif
|
||||||
switch (m_state)
|
switch (m_state)
|
||||||
{
|
{
|
||||||
case CAudioPlayerGui::STOP:
|
case CAudioPlayerGui::STOP:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
if (m_inetmode)
|
if (m_inetmode)
|
||||||
channel = g_Locale->getText(LOCALE_INETRADIO_NAME);
|
glcd_channel = g_Locale->getText(LOCALE_INETRADIO_NAME);
|
||||||
else
|
else
|
||||||
channel = g_Locale->getText(LOCALE_AUDIOPLAYER_NAME);
|
glcd_channel = g_Locale->getText(LOCALE_AUDIOPLAYER_NAME);
|
||||||
|
|
||||||
epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
glcd_epg = g_Locale->getText(LOCALE_MPKEY_STOP);
|
||||||
|
|
||||||
cGLCD::ShowLcdIcon(false);
|
cGLCD::ShowLcdIcon(false);
|
||||||
cGLCD::lockChannel(channel, epg, 0);
|
cGLCD::lockChannel(glcd_channel, glcd_epg, 0);
|
||||||
cGLCD::lockDuration("00/00");
|
cGLCD::lockDuration("00/00");
|
||||||
cGLCD::lockStart("00:00");
|
cGLCD::lockStart("00:00");
|
||||||
cGLCD::lockEnd("00:00");
|
cGLCD::lockEnd("00:00");
|
||||||
@@ -2449,11 +2449,11 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
break;
|
break;
|
||||||
case CAudioPlayerGui::PLAY:
|
case CAudioPlayerGui::PLAY:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, uint8_t(glcd_position));
|
cGLCD::lockChannel(glcd_channel, glcd_epg, uint8_t(glcd_position));
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PLAY);
|
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PLAY);
|
||||||
@@ -2463,11 +2463,11 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
break;
|
break;
|
||||||
case CAudioPlayerGui::PAUSE:
|
case CAudioPlayerGui::PAUSE:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, uint8_t(glcd_position));
|
cGLCD::lockChannel(glcd_channel, glcd_epg, uint8_t(glcd_position));
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);
|
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);
|
||||||
@@ -2475,11 +2475,11 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
break;
|
break;
|
||||||
case CAudioPlayerGui::FF:
|
case CAudioPlayerGui::FF:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, uint8_t(glcd_position));
|
cGLCD::lockChannel(glcd_channel, glcd_epg, uint8_t(glcd_position));
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_FF);
|
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_FF);
|
||||||
@@ -2487,11 +2487,11 @@ void CAudioPlayerGui::paintLCD()
|
|||||||
break;
|
break;
|
||||||
case CAudioPlayerGui::REV:
|
case CAudioPlayerGui::REV:
|
||||||
#ifdef ENABLE_GRAPHLCD
|
#ifdef ENABLE_GRAPHLCD
|
||||||
channel = "";
|
glcd_channel = "";
|
||||||
cGLCD::lockChannel(channel, epg, uint8_t(glcd_position));
|
cGLCD::lockChannel(glcd_channel, glcd_epg, uint8_t(glcd_position));
|
||||||
cGLCD::lockDuration(glcd_duration);
|
cGLCD::lockDuration(glcd_duration);
|
||||||
cGLCD::lockStart(start);
|
cGLCD::lockStart(glcd_start);
|
||||||
cGLCD::lockEnd(end);
|
cGLCD::lockEnd(glcd_end);
|
||||||
cGLCD::ShowLcdIcon(true);
|
cGLCD::ShowLcdIcon(true);
|
||||||
#endif
|
#endif
|
||||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_REV);
|
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_REV);
|
||||||
|
@@ -117,11 +117,11 @@ class CAudioPlayerGui : public CMenuTarget
|
|||||||
#if ENABLE_GRAPHLCD
|
#if ENABLE_GRAPHLCD
|
||||||
struct tm *tm_struct;
|
struct tm *tm_struct;
|
||||||
int glcd_position;
|
int glcd_position;
|
||||||
std::string channel;
|
std::string glcd_channel;
|
||||||
std::string epg;
|
std::string glcd_epg;
|
||||||
std::string glcd_duration;
|
std::string glcd_duration;
|
||||||
std::string start;
|
std::string glcd_start;
|
||||||
std::string end;
|
std::string glcd_end;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CAudioPlayList m_playlist;
|
CAudioPlayList m_playlist;
|
||||||
|
Reference in New Issue
Block a user