You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Edzelf
Firts: it's an awsome project, congratulations and thanks for sharing
I realised that displayvolume is always redrawing the bar and the code should be something similar to (Changes in bold)
@Edzelf
Firts: it's an awsome project, congratulations and thanks for sharing
I realised that displayvolume is always redrawing the bar and the code should be something similar to (Changes in bold)
void displayvolume()
{
#if defined ( USETFT )
static uint8_t oldvol = 0 ; // Previous volume
uint8_t pos ; // Positon of volume indicator
uint8_t vol = 0 ;
vol = vs1053player.getVolume();
if ( vol != oldvol ) // before ..if ( vs1053player.getVolume() != oldvol )
{
pos = map ( vs1053player.getVolume(), 0, 100, 0, 160 ) ;
tft.fillRect ( 0, 126, pos, 2, RED ) ; // Paint red part
tft.fillRect ( pos, 126, 160 - pos, 2, GREEN ) ; // Paint green part
oldvol = vol;
}
#endif
}
The text was updated successfully, but these errors were encountered: