brightness log 0..5 + log - release

This commit is contained in:
Philippe G
2020-05-27 17:01:33 -07:00
parent 26a2519451
commit a5a0cbc557
6 changed files with 10 additions and 9 deletions

View File

@@ -647,11 +647,12 @@ static void grfb_handler(u8_t *data, int len) {
xSemaphoreTake(displayer.mutex, portMAX_DELAY); xSemaphoreTake(displayer.mutex, portMAX_DELAY);
if (pkt->brightness < 0) { // LMS driver sends 0..5 value, we assume driver is highly log
if (pkt->brightness <= 0) {
GDS_DisplayOff(display); GDS_DisplayOff(display);
} else { } else {
GDS_DisplayOn(display); GDS_DisplayOn(display);
GDS_SetContrast(display, pkt->brightness); GDS_SetContrast(display, 255 * powf(pkt->brightness / 5.0f, 3));
} }
xSemaphoreGive(displayer.mutex); xSemaphoreGive(displayer.mutex);

Binary file not shown.

View File

@@ -88,7 +88,7 @@ sub displayWidth {
} }
sub brightnessMap { sub brightnessMap {
return (65535, 10, 50, 100, 200); return (0 .. 5);
} }
=comment =comment

View File

@@ -13,7 +13,7 @@ my $prefs = preferences('plugin.squeezeesp32');
my $log = Slim::Utils::Log->addLogCategory({ my $log = Slim::Utils::Log->addLogCategory({
'category' => 'plugin.squeezeesp32', 'category' => 'plugin.squeezeesp32',
'defaultLevel' => 'INFO', 'defaultLevel' => 'INFO',
'description' => Slim::Utils::Strings::string('SqueezeESP32'), 'description' => 'PLUGIN_SQUEEZEESP32',
}); });
# migrate 'eq' pref, as that's a reserved word and could cause problems in the future # migrate 'eq' pref, as that's a reserved word and could cause problems in the future

View File

@@ -3,13 +3,13 @@
<defaultState>enabled</defaultState> <defaultState>enabled</defaultState>
<email>philippe_44@outlook.com</email> <email>philippe_44@outlook.com</email>
<targetApplication> <targetApplication>
<minVersion>7.5</minVersion> <minVersion>7.9</minVersion>
<maxVersion>*</maxVersion> <maxVersion>*</maxVersion>
<id>SlimServer</id> <id>SlimServer</id>
</targetApplication> </targetApplication>
<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.92</version> <version>0.94</version>
<creator>Philippe</creator> <creator>Philippe</creator>
</extensions> </extensions>

View File

@@ -1,10 +1,10 @@
<?xml version='1.0' standalone='yes'?> <?xml version='1.0' standalone='yes'?>
<extensions> <extensions>
<plugins> <plugins>
<plugin version="0.92" name="SqueezeESP32" minTarget="7.5" maxTarget="*"> <plugin version="0.94" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<link>https://github.com/sle118/squeezelite-esp32</link> <link>https://github.com/sle118/squeezelite-esp32</link>
<creator>Philippe</creator> <creator>Philippe</creator>
<sha>274c9278af12e79edb8c3273f19f3fc7a9703795</sha> <sha>a9bf10b47d13508ba051e4067cdabc2c283f4824</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.zip</url> <url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32.zip</url>