- vfd/audioplayer: fix vfd progress in audioplayer

don't update full vfd every second
This commit is contained in:
svenhoefer
2015-01-09 11:18:52 +01:00
parent 9f7d26a646
commit 90f968c19d
3 changed files with 15 additions and 28 deletions

View File

@@ -446,7 +446,7 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
{
if(!has_lcd) return;
if (((mode == MODE_TVRADIO) || (mode == MODE_MENU_UTF8)) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) {
if (((mode == MODE_TVRADIO) || (mode == MODE_AUDIO) || (mode == MODE_MENU_UTF8)) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) {
//if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0)
{
ShowIcon(FP_ICON_FRAME, true);
@@ -503,6 +503,8 @@ printf("CVFD::showAudioTrack: %s\n", title.c_str());
void CVFD::showAudioPlayMode(AUDIOMODES m)
{
if(fd < 0) return;
if (mode != MODE_AUDIO)
return;
switch(m) {
case AUDIO_MODE_PLAY:
@@ -525,22 +527,13 @@ void CVFD::showAudioPlayMode(AUDIOMODES m)
wake_up();
}
void CVFD::showAudioProgress(const char /*perc*/, bool /*isMuted*/)
void CVFD::showAudioProgress(const unsigned char perc)
{
if(!has_lcd) return;
#if 0 // what is this ? FIXME
if (mode == MODE_AUDIO) {
int dp = int( perc/100.0*61.0+12.0);
if(isMuted) {
if(dp > 12) {
display.draw_line(12, 56, dp-1, 56, CLCDDisplay::PIXEL_OFF);
display.draw_line(12, 58, dp-1, 58, CLCDDisplay::PIXEL_OFF);
}
else
display.draw_line (12,55,72,59, CLCDDisplay::PIXEL_ON);
}
}
#endif
if(fd < 0) return;
if (mode != MODE_AUDIO)
return;
showPercentOver(perc, false);
}
void CVFD::setMode(const MODES m, const char * const title)