mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
display update
This commit is contained in:
@@ -109,10 +109,12 @@ static bool display_init(char *config, char *welcome) {
|
|||||||
*/
|
*/
|
||||||
static void print_message(char *msg) {
|
static void print_message(char *msg) {
|
||||||
if (!msg) return;
|
if (!msg) return;
|
||||||
|
SSD1306_AddressMode Mode = AddressMode;
|
||||||
SSD1306_Clear( &I2CDisplay, SSD_COLOR_BLACK );
|
SSD1306_Clear( &I2CDisplay, SSD_COLOR_BLACK );
|
||||||
SSD1306_SetDisplayAddressMode( &I2CDisplay, AddressMode_Horizontal );
|
SSD1306_SetDisplayAddressMode( &I2CDisplay, AddressMode_Horizontal );
|
||||||
SSD1306_FontDrawAnchoredString( &I2CDisplay, TextAnchor_Center, msg, SSD_COLOR_WHITE );
|
SSD1306_FontDrawAnchoredString( &I2CDisplay, TextAnchor_Center, msg, SSD_COLOR_WHITE );
|
||||||
SSD1306_Update( &I2CDisplay );
|
SSD1306_Update( &I2CDisplay );
|
||||||
|
SSD1306_SetDisplayAddressMode( &I2CDisplay, Mode );
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
|
|||||||
@@ -4,6 +4,47 @@ use strict;
|
|||||||
|
|
||||||
use base qw(Slim::Display::Squeezebox2);
|
use base qw(Slim::Display::Squeezebox2);
|
||||||
|
|
||||||
|
my $VISUALIZER_NONE = 0;
|
||||||
|
|
||||||
|
my @modes = (
|
||||||
|
# mode 0
|
||||||
|
{ desc => ['BLANK'],
|
||||||
|
bar => 0, secs => 0, width => 128,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 1
|
||||||
|
{ desc => ['PROGRESS_BAR'],
|
||||||
|
bar => 1, secs => 0, width => 128,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 2
|
||||||
|
{ desc => ['ELAPSED'],
|
||||||
|
bar => 0, secs => 1, width => 128,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 3
|
||||||
|
{ desc => ['ELAPSED', 'AND', 'PROGRESS_BAR'],
|
||||||
|
bar => 1, secs => 1, width => 128,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 4
|
||||||
|
{ desc => ['REMAINING'],
|
||||||
|
bar => 0, secs => -1, width => 128,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 5
|
||||||
|
{ desc => ['CLOCK'],
|
||||||
|
bar => 0, secs => 0, width => 128, clock => 1,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
# mode 6
|
||||||
|
{ desc => ['SETUP_SHOWBUFFERFULLNESS'],
|
||||||
|
bar => 0, secs => 0, width => 128, fullness => 1,
|
||||||
|
params => [$VISUALIZER_NONE] },
|
||||||
|
);
|
||||||
|
|
||||||
|
sub modes {
|
||||||
|
return \@modes;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub nmodes {
|
||||||
|
return $#modes;
|
||||||
|
}
|
||||||
|
|
||||||
=comment
|
=comment
|
||||||
sub bytesPerColumn {
|
sub bytesPerColumn {
|
||||||
return 4;
|
return 4;
|
||||||
|
|||||||
Binary file not shown.
@@ -10,6 +10,6 @@
|
|||||||
<name>PLUGIN_SQUEEZEESP32</name>
|
<name>PLUGIN_SQUEEZEESP32</name>
|
||||||
<description>PLUGIN_SQUEEZEESP32_DESC</description>
|
<description>PLUGIN_SQUEEZEESP32_DESC</description>
|
||||||
<module>Plugins::SqueezeESP32::Plugin</module>
|
<module>Plugins::SqueezeESP32::Plugin</module>
|
||||||
<version>0.2</version>
|
<version>0.3</version>
|
||||||
<creator>Philippe</creator>
|
<creator>Philippe</creator>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version='1.0' standalone='yes'?>
|
<?xml version='1.0' standalone='yes'?>
|
||||||
<extensions>
|
<extensions>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin version="0.2" name="SqueezeESP32" minTarget="7.9" maxTarget="7.*">
|
<plugin version="0.3" name="SqueezeESP32" minTarget="7.9" maxTarget="7.*">
|
||||||
<link>https://github.com/sle118/squeezelite-esp32</link>
|
<link>https://github.com/sle118/squeezelite-esp32</link>
|
||||||
<creator>Philippe</creator>
|
<creator>Philippe</creator>
|
||||||
<sha>066d97b8ca3fa53cbfaa7caf06f47fdc066344fe</sha>
|
<sha>799ae4860f9c009ac25c2ec35eb4070c5f474659</sha>
|
||||||
<email>philippe_44@outlook.com</email>
|
<email>philippe_44@outlook.com</email>
|
||||||
<desc lang="EN">SqueezeESP32 additional player id (100)</desc>
|
<desc lang="EN">SqueezeESP32 additional player id (100)</desc>
|
||||||
<url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32/SqueezeESP32.zip</url>
|
<url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32/SqueezeESP32.zip</url>
|
||||||
|
|||||||
Reference in New Issue
Block a user