log scale 0..5 for brightness - release

This commit is contained in:
Philippe G
2020-05-27 16:58:07 -07:00
parent 7e83c4d51d
commit 4517e9040a
5 changed files with 8 additions and 7 deletions

View File

@@ -647,11 +647,12 @@ static void grfb_handler(u8_t *data, int len) {
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);
} else {
GDS_DisplayOn(display);
GDS_SetContrast(display, pkt->brightness);
GDS_SetContrast(display, 255 * powf(pkt->brightness / 5.0f, 3));
}
xSemaphoreGive(displayer.mutex);

Binary file not shown.

View File

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

View File

@@ -10,6 +10,6 @@
<name>PLUGIN_SQUEEZEESP32</name>
<description>PLUGIN_SQUEEZEESP32_DESC</description>
<module>Plugins::SqueezeESP32::Plugin</module>
<version>0.93</version>
<version>0.94</version>
<creator>Philippe</creator>
</extensions>

View File

@@ -1,10 +1,10 @@
<?xml version='1.0' standalone='yes'?>
<extensions>
<plugins>
<plugin version="0.93" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<plugin version="0.94" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<link>https://github.com/sle118/squeezelite-esp32</link>
<creator>Philippe</creator>
<sha>42e9a5713355c5c7b8b318f4254a183e9bb86b8f</sha>
<sha>a9bf10b47d13508ba051e4067cdabc2c283f4824</sha>
<email>philippe_44@outlook.com</email>
<desc lang="EN">SqueezeESP32 additional player id (100)</desc>
<url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32.zip</url>