Compare commits

..

32 Commits

Author SHA1 Message Date
philippe44
2afbee7cb1 add SH1122 - release 2023-11-16 21:43:56 -08:00
philippe44
bbf9a3af70 Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3 2023-11-13 22:30:51 -08:00
philippe44
a9ca4c4450 attempt to fix cspot track issues - release 2023-11-13 22:30:45 -08:00
github-actions
55bce084eb Update prebuilt objects [skip actions] 2023-11-09 21:49:08 +00:00
philippe44
d31697e7ef force pad_select for gpio use in dac_controlset - release 2023-11-09 13:47:08 -08:00
philippe44
e830b4db73 Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3 2023-11-09 13:42:11 -08:00
philippe44
8fe21327b8 Update README.md 2023-11-08 16:54:54 -08:00
philippe44
3f487366ee Update README.md 2023-11-08 16:51:47 -08:00
philippe44
b875585aec Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3 2023-11-08 16:37:53 -08:00
philippe44
b46fccfc83 execute dac_controlset even w/o i2c (for gpio) - release 2023-11-08 16:37:49 -08:00
philippe44
655c17fb29 Update README.md 2023-11-08 11:36:29 -08:00
philippe44
b8bda0435a Update README.md 2023-11-08 11:34:17 -08:00
github-actions
dc5cb31efb Update prebuilt objects [skip actions] 2023-11-08 06:18:54 +00:00
philippe44
44ccbb49a6 ledvu update 2023-11-07 22:15:54 -08:00
philippe44
6589387cd3 Merge pull request #351 from wizmo2/ledvu-update-clean
Ledvu update (clean)
2023-11-07 22:08:42 -08:00
github-actions
0d3f6a8870 Update prebuilt objects [skip actions] 2023-11-06 01:24:27 +00:00
philippe44
bb6ec4a629 chmod... 2023-11-05 17:12:55 -08:00
philippe44
a029304776 chmod... 2023-11-05 15:52:02 -08:00
Wizmo2
dad8efff8b Merge branch 'ledvu-update-clean' of https://github.com/wizmo2/squeezelite-esp32 into ledvu-update-clean 2023-11-05 14:30:23 -05:00
Wizmo2
e8c6169e09 formating changes 2023-11-05 14:27:45 -05:00
Wizmo2
fc8d15f58d formating changes 2023-11-04 23:07:25 -04:00
Wizmo2
f9d7e15d4b add suspend service 2023-11-04 22:56:37 -04:00
github-actions
67722bef94 Update prebuilt objects [skip actions] 2023-11-04 02:25:17 +00:00
github-actions
8ea777ddff Update prebuilt objects [skip actions] 2023-11-04 01:11:45 +00:00
philippe44
ad8d587e94 no reboot on external active decoder - release 2023-11-03 18:09:39 -07:00
Wizmo2
667b90fafc ledvu-update-clean 2023-10-30 19:24:23 -04:00
philippe44
7be653f722 Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3 2023-10-30 01:06:41 -07:00
philippe44
f6269a2f7a gap when changing queue workaround 2023-10-30 01:06:37 -07:00
philippe44
4b70514fa3 Update CHANGELOG 2023-10-29 00:08:20 -07:00
philippe44
00a0b8c36e more warnings 2023-10-28 20:54:37 -07:00
philippe44
9f4474a19c remove warnings 2023-10-28 20:51:57 -07:00
github-actions
58fac99e95 Update prebuilt objects [skip actions] 2023-10-29 03:19:48 +00:00
77 changed files with 496 additions and 3100 deletions

View File

@@ -1,3 +1,20 @@
2023-11-09
- force gpio_pad_select_gpio in dac_controlset in case somebody uses UART gpio's (or other pre-programmed)
2023-11-08
- execute dac_controlset even whne there is no i2s (for gpio)
2023-11-07
- led-vu gain + misc fixes
- bump plugin version to 0.600
2023-11-03
- don't reboot when external decoder is connected even with a LMS server
2023-10-28
- fix recovery size (remove bootstrap)
- improve NVS initialization structure
2023-10-27
- fix vorbis (and opus) memory leak

View File

@@ -189,13 +189,19 @@ if "model" is not set or is not recognized, then default "I2S" is used. The opti
So far, TAS57xx, TAS5713, AC101, WM8978 and ES8388 are recognized models where the proper init sequence/volume/power controls are sent. For other codecs that might require an I2C commands, please use the parameter "dac_controlset" that allows definition of simple commands to be sent over i2c for init, power, speaker and headset on and off using a JSON syntax:
```json
{ <command>: [ {"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}, ... {{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"} ],
<command>: [ {"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}, ... {{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"} ],
{ <command>: [ <item1>, <item2>, ... <item3> ],
<command>: [ <item1>, <item2>, ... <item3> ],
... }
```
Where `<command>` is one of init, poweron, poweroff, speakeron, speakeroff, headseton, headsetoff
Where `<command>` is one of init, poweron, poweroff, speakeron, speakeroff, headseton, headsetoff (it **must** be an array even for a single item). Item is any of the following elements
```
{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}
{"gpio":<gpio>,"level":0|1}
{"delay":<ms>}
```
This is standard JSON notation, so if you are not familiar with it, Google is your best friend. Be aware that the '...' means you can have as many entries as you want, it's not part of the syntax. Every section is optional, but it does not make sense to set i2c in the 'dac_config' parameter and not setting anything here.
This is standard JSON notation, so if you are not familiar with it, Google is your best friend. Be aware that the '...' means you can have as many entries as you want, it's not part of the syntax. Every section is optional, but it does not make sense to set i2c in the 'dac_config' parameter and not setting anything here. The parameter 'mode' allows to *or* the register with the value or to *and* it. Don't set 'mode' if you simply want to write. The 'val parameter can be an array [v1, v2,...] to write a serie of bytes in a single i2c burst (in that case 'mode' is ignored). **Note that all values must be decimal**. You can use a validator like [this](https://jsonlint.com) to verify your syntax
The `reg` key allow to write registers on i2c bus. The parameter `mode` allows to *or* the register with the value or to *and* it. Don't set `mode` if you simply want to write. The `val` parameter can be an array [v1, v2,...] to write a serie of bytes in a single i2c burst (in that case 'mode' is ignored). **Note that all values must be decimal**. You can use a validator like [this](https://jsonlint.com) to verify your syntax. The `gpio` key is simply to set a gpio as part of DAC action and `delay` allows a pause between elements.
The 'power' command is used when powering on/off the DAC after the idle period (see -C option of squeezelite) and the 'speaker/headset' commands are sent when switching between speakers and headsets (see headset jack detection).
@@ -321,18 +327,18 @@ See [set_GPIO](#set-gpio) for how to set the green and red LEDs (including addre
NB: For named configuration, GPIO affected to green and red LED cannot be changed but brightness option applies
### LED Strip
One LED strip with up to 255 addressable LEDs can be configured to offer enhanced visualizations. The LED strip can also be controlled remotely though the LMS server (using the CLI interface). Currently only WS2812B LEDs are supported. Set the LED Strip configuration (or NVS led_vu_config) to `WS2812,length=<n>,gpio=<gpio>, where <n> is the number of leds in the strip (1..255), and <gpio> is the data pin.`
The latest LMS plugin update is required to set the visualizer mode and brightness, in the ESP32 settings page for the player. The plugin also adds the following CLI command options
One LED strip with up to 255 addressable LEDs can be configured to offer enhanced visualizations. The VU Meter visualizer includes a battery status indicator (see Battery). Currently only WS2812B LEDs are supported. Set the LED Strip hardware configuration, or the NVS led_vu_config syntax is
```
<playerid> led_visual [<mode>] [brightness(1-255)]
Toggles or selects the visulaizer mode.
The visualizer brighness can be controled using the optional <brighness> tag.
<playerid> dmx <R,G,B|R,G,B,R,G,B ... R,G,B> [<offset>]
Sets the LED at position "offset" to any RGB color where "R"(red),"G"(green), and "B"(blue) are values from 0(off) to 255(max brightness).
Add additional RGB values to the delimited string to set multiple LEDs.
type=[WS2812],length=<n>,gpio=<dataPin>[,scale=<gain>]
```
where `<n>` is the number of LEDs in the strip (1..255). A `<scale>` gain value (percentage) can be added to enhance effect responses.
The latest LMS plugin update is required to set the visualizer mode and brightness in the ESP32 Settings page for the player, or a controllable display (see Extra/SqueezeESP32 menus). The plugin adds additional LMS CLI commands.
| Command | Notes |
| -------------------------------------------------- | ----------- |
| \<playerid\> led_visual \[\<mode\>\] \[\<brightness\>\] | Toggles or selects the visualizer "mode".<br />The visualizer brightness(0..255) can be controlled using the "brightness" tag. |
| \<playerid\> dmx \<R,G,B,R,G,B, ... R,G,B\> \[\<offset\>\] | Sets the LED color starting at position "offset"<br /> with "R"(red),"G"(green),and "B"(blue) color sequences.<br />Add additional RGB values to the delimited string to set multiple LEDs.<br /> |
### Rotary Encoder
One rotary encoder is supported, quadrature shift with press. Such encoders usually have 2 pins for encoders (A and B), and common C that must be set to ground and an optional SW pin for press. A, B and SW must be pulled up, so automatic pull-up is provided by ESP32, but you can add your own resistors. A bit of filtering on A and B (~470nF) helps for debouncing which is not made by software.

182
components/display/SH1122.c Normal file
View File

@@ -0,0 +1,182 @@
/**
* Copyright (c) 2017-2018 Tara Keeling
* 2020 Philippe G.
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <esp_heap_caps.h>
#include <esp_log.h>
#include "gds.h"
#include "gds_private.h"
#define SHADOW_BUFFER
#define PAGE_BLOCK 1024
#define min(a,b) (((a) < (b)) ? (a) : (b))
static char TAG[] = "SH1122";
struct PrivateSpace {
uint8_t *iRAM, *Shadowbuffer;
uint8_t PageSize;
};
// Functions are not declared to minimize # of lines
static void SetColumnAddress( struct GDS_Device* Device, uint8_t Start, uint8_t End ) {
Device->WriteCommand( Device, 0x10 | (Start >> 4) );
Device->WriteCommand( Device, 0x00 | (Start & 0x0f) );
}
static void SetRowAddress( struct GDS_Device* Device, uint8_t Start, uint8_t End ) {
Device->WriteCommand( Device, 0xB0 );
Device->WriteCommand( Device, Start );
}
static void Update( struct GDS_Device* Device ) {
struct PrivateSpace *Private = (struct PrivateSpace*) Device->Private;
// RAM is by columns of 4 pixels ...
SetColumnAddress( Device, 0, Device->Width / 4 - 1);
#ifdef SHADOW_BUFFER
uint16_t *optr = (uint16_t*) Private->Shadowbuffer, *iptr = (uint16_t*) Device->Framebuffer;
bool dirty = false;
for (int r = 0, page = 0; r < Device->Height; r++) {
// look for change and update shadow (cheap optimization = width always / by 2)
for (int c = Device->Width / 2 / 2; --c >= 0;) {
if (*optr != *iptr) {
dirty = true;
*optr = *iptr;
}
iptr++; optr++;
}
// one line done, check for page boundary
if (++page == Private->PageSize) {
if (dirty) {
SetRowAddress( Device, r - page + 1, r );
if (Private->iRAM) {
memcpy(Private->iRAM, Private->Shadowbuffer + (r - page + 1) * Device->Width / 2, page * Device->Width / 2 );
Device->WriteData( Device, Private->iRAM, Device->Width * page / 2 );
} else {
Device->WriteData( Device, Private->Shadowbuffer + (r - page + 1) * Device->Width / 2, page * Device->Width / 2);
}
dirty = false;
}
page = 0;
}
}
#else
SetRowAddress( Device, 0, Device->Height - 1 );
for (int r = 0; r < Device->Height; r += Private->PageSize) {
if (Private->iRAM) {
memcpy(Private->iRAM, Device->Framebuffer + r * Device->Width / 2, Private->PageSize * Device->Width / 2 );
Device->WriteData( Device, Private->iRAM, Private->PageSize * Device->Width / 2 );
} else {
Device->WriteData( Device, Device->Framebuffer + r * Device->Width / 2, Private->PageSize * Device->Width / 2 );
}
}
#endif
}
static void DrawPixelFast4( struct GDS_Device* Device, int X, int Y, int Color ) {
uint8_t* FBOffset = Device->Framebuffer + ( (Y * Device->Width >> 1) + (X >> 1));
*FBOffset = X & 0x01 ? ((*FBOffset & 0xf0) | (Color & 0x0f)) : (*FBOffset & 0x0f) | ((Color & 0x0f) << 4);
}
static void SetLayout( struct GDS_Device* Device, struct GDS_Layout *Layout ) {
if (Layout->HFlip) {
Device->WriteCommand( Device, 0x40 + 0x20 );
Device->WriteCommand( Device, 0xA1 );
} else {
Device->WriteCommand( Device, 0x40 + 0x00 );
Device->WriteCommand( Device, 0xA0 );
}
Device->WriteCommand( Device, Layout->VFlip ? 0xC8 : 0xC0 );
Device->WriteCommand( Device, Layout->Invert ? 0xA7 : 0xA6 );
}
static void DisplayOn( struct GDS_Device* Device ) { Device->WriteCommand( Device, 0xAF ); }
static void DisplayOff( struct GDS_Device* Device ) { Device->WriteCommand( Device, 0xAE ); }
static void SetContrast( struct GDS_Device* Device, uint8_t Contrast ) {
Device->WriteCommand( Device, 0x81 );
Device->WriteCommand( Device, Contrast );
}
static bool Init( struct GDS_Device* Device ) {
struct PrivateSpace *Private = (struct PrivateSpace*) Device->Private;
// find a page size that is not too small is an integer of height
Private->PageSize = min(8, PAGE_BLOCK / (Device->Width / 2));
while (Private->PageSize && Device->Height != (Device->Height / Private->PageSize) * Private->PageSize) Private->PageSize--;
#ifdef SHADOW_BUFFER
Private->Shadowbuffer = malloc( Device->FramebufferSize );
memset(Private->Shadowbuffer, 0xFF, Device->FramebufferSize);
#endif
// only use iRAM for SPI
if (Device->IF == GDS_IF_SPI) {
Private->iRAM = heap_caps_malloc( Private->PageSize * Device->Width / 2, MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA );
}
ESP_LOGI(TAG, "SH1122 page %u, iRAM %p", Private->PageSize, Private->iRAM);
// need to be off and disable display RAM
Device->DisplayOff( Device );
Device->WriteCommand( Device, 0xA5 );
// Display Offset
Device->WriteCommand( Device, 0xD3 );
Device->WriteCommand( Device, 0 );
// set flip modes
struct GDS_Layout Layout = { };
Device->SetLayout( Device, &Layout );
// set Clocks => check value
Device->WriteCommand( Device, 0xD5 );
Device->WriteCommand( Device, ( 0x04 << 4 ) | 0x00 );
// MUX Ratio => fixed
Device->WriteCommand( Device, 0xA8 );
Device->WriteCommand( Device, Device->Height - 1);
// no Display Inversion
Device->WriteCommand( Device, 0xA6 );
// gone with the wind
Device->WriteCommand( Device, 0xA4 );
Device->DisplayOn( Device );
Device->Update( Device );
return true;
}
static const struct GDS_Device SH1122 = {
.DisplayOn = DisplayOn, .DisplayOff = DisplayOff, .SetContrast = SetContrast,
.DrawPixelFast = DrawPixelFast4,
.SetLayout = SetLayout,
.Update = Update, .Init = Init,
.Mode = GDS_GRAYSCALE, .Depth = 4,
.HighNibble = true,
};
struct GDS_Device* SH1122_Detect(char *Driver, struct GDS_Device* Device) {
if (!strcasestr(Driver, "SH1122")) return NULL;
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
*Device = SH1122;
return Device;
}

View File

@@ -71,8 +71,8 @@ static void Update( struct GDS_Device* Device ) {
if (dirty) {
uint16_t *optr = (uint16_t*) Private->iRAM, *iptr = (uint16_t*) (Private->Shadowbuffer + (r - page + 1) * Device->Width / 2);
SetRowAddress( Device, r - page + 1, r );
// need byte swapping
for (int i = page * Device->Width / 2 / 2; --i >= 0; iptr++) *optr++ = (*iptr >> 8) | (*iptr << 8);
//memcpy(Private->iRAM, Private->Shadowbuffer + (r - page + 1) * Device->Width / 2, page * Device->Width / 2 );
Device->WriteCommand( Device, 0x5c );
Device->WriteData( Device, Private->iRAM, Device->Width * page / 2 );
dirty = false;
@@ -84,14 +84,10 @@ static void Update( struct GDS_Device* Device ) {
for (int r = 0; r < Device->Height; r += Private->PageSize) {
SetRowAddress( Device, r, r + Private->PageSize - 1 );
Device->WriteCommand( Device, 0x5c );
if (Private->iRAM) {
uint16_t *optr = (uint16_t*) Private->iRAM, *iptr = (uint16_t*) (Device->Framebuffer + r * Device->Width / 2);
for (int i = Private->PageSize * Device->Width / 2 / 2; --i >= 0; iptr++) *optr++ = (*iptr >> 8) | (*iptr << 8);
//memcpy(Private->iRAM, Device->Framebuffer + r * Device->Width / 2, Private->PageSize * Device->Width / 2 );
Device->WriteData( Device, Private->iRAM, Private->PageSize * Device->Width / 2 );
} else {
Device->WriteData( Device, Device->Framebuffer + r * Device->Width / 2, Private->PageSize * Device->Width / 2 );
}
// need byte swapping
uint16_t *optr = (uint16_t*) Private->iRAM, *iptr = (uint16_t*) (Device->Framebuffer + r * Device->Width / 2);
for (int i = Private->PageSize * Device->Width / 2 / 2; --i >= 0; iptr++) *optr++ = (*iptr >> 8) | (*iptr << 8);
Device->WriteData( Device, Private->iRAM, Private->PageSize * Device->Width / 2 );
}
#endif
}

View File

@@ -213,37 +213,65 @@ void GDS_DrawBitmapCBR(struct GDS_Device* Device, uint8_t *Data, int Width, int
iptr += Height;
}
}
} else if (Device->Depth == 4) {
} else if (Device->Depth == 4) {
uint8_t *optr = Device->Framebuffer;
int LineLen = Device->Width >> 1;
Height >>= 3;
Color &= 0x0f;
for (int i = Width * Height, r = 0, c = 0; --i >= 0;) {
uint8_t Byte = BitReverseTable256[*Data++];
// we need to linearize code to let compiler better optimize
if (c & 0x01) {
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen;
} else {
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen;
}
// end of a column, move to next one
if (++r == Height) { c++; r = 0; optr = Device->Framebuffer + (c >> 1); }
if (Device->HighNibble) {
for (int i = Width * Height, r = 0, c = 0; --i >= 0;) {
uint8_t Byte = BitReverseTable256[*Data++];
// we need to linearize code to let compiler better optimize
if (c & 0x01) {
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen;
} else {
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen;
}
// end of a column, move to next one
if (++r == Height) { c++; r = 0; optr = Device->Framebuffer + (c >> 1); }
}
} else {
for (int i = Width * Height, r = 0, c = 0; --i >= 0;) {
uint8_t Byte = BitReverseTable256[*Data++];
// we need to linearize code to let compiler better optimize
if (c & 0x01) {
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0x0f) | (((Byte & 0x01)*Color)<<4); optr += LineLen;
} else {
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen; Byte >>= 1;
*optr = (*optr & 0xf0) | (((Byte & 0x01)*Color)); optr += LineLen;
}
// end of a column, move to next one
if (++r == Height) { c++; r = 0; optr = Device->Framebuffer + (c >> 1); }
}
}
} else if (Device->Depth == 8) {
uint8_t *optr = Device->Framebuffer;

View File

@@ -98,6 +98,7 @@ struct GDS_Device {
uint16_t Width, TextWidth;
uint16_t Height;
uint8_t Depth, Mode;
bool HighNibble;
uint8_t Alloc;
uint8_t* Framebuffer;

View File

@@ -63,6 +63,7 @@ static EXT_RAM_ATTR struct {
} displayer;
static const char *known_drivers[] = {"SH1106",
"SH1122",
"SSD1306",
"SSD1322",
"SSD1326",
@@ -79,8 +80,8 @@ static void displayer_task(void *args);
static void display_sleep(void);
struct GDS_Device *display;
extern GDS_DetectFunc SSD1306_Detect, SSD132x_Detect, SH1106_Detect, SSD1675_Detect, SSD1322_Detect, SSD1351_Detect, ST77xx_Detect, ILI9341_Detect;
GDS_DetectFunc *drivers[] = { SH1106_Detect, SSD1306_Detect, SSD132x_Detect, SSD1675_Detect, SSD1322_Detect, SSD1351_Detect, ST77xx_Detect, ILI9341_Detect, NULL };
extern GDS_DetectFunc SSD1306_Detect, SSD132x_Detect, SH1106_Detect, SH1122_Detect, SSD1675_Detect, SSD1322_Detect, SSD1351_Detect, ST77xx_Detect, ILI9341_Detect;
GDS_DetectFunc *drivers[] = { SH1106_Detect, SH1122_Detect, SSD1306_Detect, SSD132x_Detect, SSD1675_Detect, SSD1322_Detect, SSD1351_Detect, ST77xx_Detect, ILI9341_Detect, NULL };
/****************************************************************************************
*

View File

@@ -293,11 +293,8 @@ bool led_strip_init(struct led_strip_t *led_strip)
static EXT_RAM_ATTR StackType_t xStack[LED_STRIP_TASK_SIZE] __attribute__ ((aligned (4)));
if ((led_strip == NULL) ||
(led_strip->rmt_channel >= RMT_CHANNEL_MAX) ||
(led_strip->gpio > GPIO_NUM_33) ||
(led_strip->led_strip_working == NULL) ||
(led_strip->led_strip_showing == NULL) ||
(led_strip->led_strip_length == 0) ||
(led_strip->access_semaphore == NULL)) {
return false;
}

View File

@@ -24,6 +24,7 @@
#include "monitor.h"
#include "led_strip.h"
#include "platform_config.h"
#include "services.h"
#include "led_vu.h"
static const char *TAG = "led_vu";
@@ -55,6 +56,7 @@ static EXT_RAM_ATTR struct {
int vu_start_l;
int vu_start_r;
int vu_status;
int vu_scale;
} strip;
static int led_addr(int pos ) {
@@ -70,31 +72,31 @@ static void battery_svc(float value, int cells) {
if (battery_handler_chain) battery_handler_chain(value, cells);
}
/****************************************************************************************
* Suspend.
*
*/
static void led_vu_sleep(void) {
led_vu_clear(led_display);
}
/****************************************************************************************
* Initialize the led vu strip if configured.
*
*/
void led_vu_init()
{
char* p;
char* config = config_alloc_get_str("led_vu_config", NULL, "N/A");
// Initialize led VU strip
char* drivername = strcasestr(config, "WS2812");
if ((p = strcasestr(config, "length")) != NULL) {
strip.length = atoi(strchr(p, '=') + 1);
} // else 0
if ((p = strcasestr(config, "gpio")) != NULL) {
strip.gpio = atoi(strchr(p, '=') + 1);
} else {
strip.gpio = LED_VU_DEFAULT_GPIO;
}
PARSE_PARAM(config, "length",'=', strip.length);
PARSE_PARAM(config, "gpio",'=', strip.gpio);
// check for valid configuration
if (!drivername || !strip.gpio) {
if (!strip.gpio) {
ESP_LOGI(TAG, "led_vu configuration invalid");
goto done;
}
strip.vu_scale = 100;
PARSE_PARAM(config, "scale",'=',strip.vu_scale);
battery_handler_chain = battery_handler_svc;
battery_handler_svc = battery_svc;
@@ -114,7 +116,7 @@ void led_vu_init()
strip.vu_start_r = strip.vu_length + 1;
strip.vu_status = strip.vu_length;
}
ESP_LOGI(TAG, "vu meter using length:%d left:%d right:%d status:%d", strip.vu_length, strip.vu_start_l, strip.vu_start_r, strip.vu_status);
ESP_LOGI(TAG, "vu meter using length:%d left:%d right:%d status:%d scale:%d", strip.vu_length, strip.vu_start_l, strip.vu_start_r, strip.vu_status, strip.vu_scale);
// create driver configuration
led_strip_config.rgb_led_type = RGB_LED_TYPE_WS2812;
@@ -138,6 +140,8 @@ void led_vu_init()
// reserver max memory for remote management systems
rmt_set_mem_block_num(led_strip_config.rmt_channel, 7);
services_sleep_setsuspend(led_vu_sleep);
led_vu_clear(led_display);
done:
@@ -157,6 +161,14 @@ uint16_t led_vu_string_length() {
return (uint16_t)strip.length;
}
/****************************************************************************************
* Returns a user defined scale (percent)
*/
uint16_t led_vu_scale() {
if (!led_display) return 0;
return (uint16_t)strip.vu_scale;
}
/****************************************************************************************
* Turns all LEDs off (Black)
*/

View File

@@ -21,6 +21,7 @@
extern struct led_strip_t* led_display;
uint16_t led_vu_string_length();
uint16_t led_vu_scale();
void led_vu_progress_bar(int pct, int bright);
void led_vu_display(int vu_l, int vu_r, int bright, bool comet);
void led_vu_spin_dial(int gain, int rate, int speed, bool comet);

View File

@@ -538,7 +538,7 @@ bool config_set_group_bit(int bit_num,bool flag){
return result;
}
void config_set_default(nvs_type_t type, const char *key, void * default_value, size_t blob_size) {
void config_set_default(nvs_type_t type, const char *key, const void * default_value, size_t blob_size) {
if(!config_lock(LOCK_MAX_WAIT/portTICK_PERIOD_MS)){
ESP_LOGE(TAG, "Unable to lock config");
return;

View File

@@ -56,7 +56,7 @@ cJSON * config_alloc_get_cjson(const char *key);
esp_err_t config_set_cjson_str_and_free(const char *key, cJSON *value);
void config_get_uint16t_from_str(const char *key, uint16_t *value, uint16_t default_value);
void config_delete_key(const char *key);
void config_set_default(nvs_type_t type, const char *key, void * default_value, size_t blob_size);
void config_set_default(nvs_type_t type, const char *key, const void * default_value, size_t blob_size);
void * config_alloc_get(nvs_type_t nvs_type, const char *key) ;
bool wait_for_commit();
char * config_alloc_get_json(bool bFormatted);

View File

@@ -115,6 +115,7 @@ static struct {
struct arg_str *type;
struct arg_int *length;
struct arg_int *gpio;
struct arg_int * scale;
struct arg_lit *clear;
struct arg_end *end;
} ledvu_args;
@@ -657,7 +658,7 @@ static int do_cspot_config(int argc, char **argv) {
#endif
static int do_ledvu_cmd(int argc, char **argv) {
ledvu_struct_t ledvu = {.type = "WS2812", .gpio = -1, .length = 0};
ledvu_struct_t ledvu = {.type = "WS2812", .gpio = -1, .length = 0, .scale = 100};
esp_err_t err = ESP_OK;
int nerrors = arg_parse(argc, argv, (void **)&ledvu_args);
if (ledvu_args.clear->count) {
@@ -685,6 +686,8 @@ static int do_ledvu_cmd(int argc, char **argv) {
} else {
ledvu.length = ledvu_args.length->count > 0 ? ledvu_args.length->ival[0] : 0;
}
ledvu.scale = ledvu_args.scale->count>0?ledvu_args.scale->ival[0]:ledvu.scale;
if (!nerrors) {
fprintf(f, "Storing ledvu parameters.\n");
@@ -914,6 +917,7 @@ cJSON *ledvu_cb() {
} else {
cJSON_AddStringToObject(values, "type", "WS2812");
}
cJSON_AddNumberToObject(values,"scale",ledvu->scale);
return values;
}
@@ -1314,6 +1318,7 @@ void register_ledvu_config(void) {
ledvu_args.type = arg_str1(NULL, "type", "<none>|WS2812", "Led type (supports one rgb strip to display built in effects and allow remote control through 'dmx' messaging)");
ledvu_args.length = arg_int1(NULL, "length", "<1..255>", "Strip length (1-255 supported)");
ledvu_args.gpio = arg_int1(NULL, "gpio", "gpio", "Data pin");
ledvu_args.scale = arg_int0(NULL,"scale","<n>","Gain scale (precent)");
ledvu_args.clear = arg_lit0(NULL, "clear", "Clear configuration");
ledvu_args.end = arg_end(4);

View File

@@ -64,8 +64,10 @@ static void register_heap();
static void register_dump_heap();
static void register_version();
static void register_restart();
#if CONFIG_WITH_CONFIG_UI
static void register_deep_sleep();
static void register_light_sleep();
#endif
static void register_factory_boot();
static void register_restart_ota();
static void register_set_services();
@@ -552,7 +554,7 @@ static void register_tasks()
/** 'deep_sleep' command puts the chip into deep sleep mode */
#if CONFIG_WITH_CONFIG_UI
static struct {
struct arg_int *wakeup_time;
struct arg_int *wakeup_gpio_num;
@@ -616,6 +618,8 @@ static void register_deep_sleep()
};
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
}
#endif
static int enable_disable(FILE * f,char * nvs_name, struct arg_lit *arg){
esp_err_t err = config_set_value(NVS_TYPE_STR, nvs_name, arg->count>0?"Y":"N");
const char * name = arg->hdr.longopts?arg->hdr.longopts:arg->hdr.glossary;
@@ -731,6 +735,8 @@ static void register_set_services(){
cmd_to_json_with_cb(&cmd,&set_services_cb);
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
}
#if CONFIG_WITH_CONFIG_UI
static struct {
struct arg_int *wakeup_time;
struct arg_int *wakeup_gpio_num;
@@ -822,4 +828,4 @@ static void register_light_sleep()
};
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
}
#endif

View File

@@ -329,7 +329,7 @@ esp_err_t config_ledvu_set(ledvu_struct_t * config){
esp_err_t err=ESP_OK;
char * config_buffer=malloc_init_external(buffer_size);
if(config_buffer) {
snprintf(config_buffer,buffer_size,"%s,length=%i,gpio=%i",config->type, config->length, config->gpio);
snprintf(config_buffer,buffer_size,"%s,length=%i,gpio=%i,scale=%i",config->type, config->length, config->gpio, config->scale);
log_send_messaging(MESSAGING_INFO,"Updating ledvu configuration to %s",config_buffer);
err = config_set_value(NVS_TYPE_STR, "led_vu_config", config_buffer);
if(err!=ESP_OK){
@@ -761,14 +761,13 @@ const rotary_struct_t * config_rotary_get() {
*/
const ledvu_struct_t * config_ledvu_get() {
static ledvu_struct_t ledvu={ .type = "WS2812", .gpio = -1, .length = 0};
static ledvu_struct_t ledvu={ .type = "WS2812", .gpio = -1, .length = 0, .scale= 100 };
char *config = config_alloc_get_default(NVS_TYPE_STR, "led_vu_config", NULL, 0);
if (config && *config) {
char *p;
// ToDo: Add code for future support of alternate led types
if ((p = strcasestr(config, "gpio")) != NULL) ledvu.gpio = atoi(strchr(p, '=') + 1);
if ((p = strcasestr(config, "length")) != NULL) ledvu.length = atoi(strchr(p, '=') + 1);
PARSE_PARAM_STR(config, "type", '=', ledvu.type, 15);
PARSE_PARAM(config, "gpio", '=', ledvu.gpio);
PARSE_PARAM(config, "length", '=', ledvu.length);
PARSE_PARAM(config, "scale", '=', ledvu.scale);
free(config);
}
return &ledvu;

View File

@@ -89,6 +89,7 @@ typedef struct {
char type[16];
int length;
int gpio;
int scale;
} ledvu_struct_t;
typedef struct {

View File

@@ -361,7 +361,7 @@ void services_init(void) {
}
#endif
// set potential power GPIO on chip first in case expanders are power using these
// set potential power GPIO on chip first in case expanders are powered using these
parse_set_GPIO(set_chip_power_gpio);
// shared I2C bus

View File

View File

0
components/spotify/cspot/bell/external/nanopb/generator/protoc vendored Normal file → Executable file
View File

View File

View File

@@ -37,7 +37,6 @@ class TrackPlayer : bell::Task {
typedef std::function<size_t(uint8_t*, size_t, std::string_view)>
DataCallback;
typedef std::function<void()> EOFCallback;
typedef std::function<bool()> isAiringCallback;
TrackPlayer(std::shared_ptr<cspot::Context> ctx,
std::shared_ptr<cspot::TrackQueue> trackQueue,

View File

@@ -54,6 +54,7 @@ class QueuedTrack {
uint32_t requestedPosition;
std::string identifier;
bool loading = false;
// Will return nullptr if the track is not ready
std::shared_ptr<cspot::CDNAudioFile> getAudioFile();
@@ -100,7 +101,7 @@ class TrackQueue : public bell::Task {
bool hasTracks();
bool isFinished();
bool skipTrack(SkipDirection dir, bool expectNotify = true);
void updateTracks(uint32_t requestedPosition = 0, bool initial = false);
bool updateTracks(uint32_t requestedPosition = 0, bool initial = false);
TrackInfo getTrackInfo(std::string_view identifier);
std::shared_ptr<QueuedTrack> consumeTrack(
std::shared_ptr<QueuedTrack> prevSong, int& offset);

View File

@@ -201,20 +201,22 @@ void SpircHandler::handleFrame(std::vector<uint8_t>& data) {
break;
}
case MessageType_kMessageTypeReplace: {
CSPOT_LOG(debug, "Got replace frame");
CSPOT_LOG(debug, "Got replace frame %d", playbackState->remoteTracks.size());
playbackState->syncWithRemote();
// 1st track is the current one, but update the position
trackQueue->updateTracks(
bool cleared = trackQueue->updateTracks(
playbackState->remoteFrame.state.position_ms +
ctx->timeProvider->getSyncedTimestamp() -
playbackState->innerFrame.state.position_measured_at,
false);
ctx->timeProvider->getSyncedTimestamp() -
playbackState->innerFrame.state.position_measured_at);
this->notify();
sendEvent(EventType::FLUSH);
trackPlayer->resetState();
// need to re-load all if streaming track is completed
if (cleared) {
sendEvent(EventType::FLUSH);
trackPlayer->resetState();
}
break;
}
case MessageType_kMessageTypeShuffle: {

View File

@@ -201,6 +201,7 @@ void TrackPlayer::runTask() {
}
eof = false;
track->loading = true;
CSPOT_LOG(info, "Playing");
@@ -255,6 +256,7 @@ void TrackPlayer::runTask() {
// always move back to LOADING (ensure proper seeking after last track has been loaded)
currentTrackStream = nullptr;
track->loading = false;
}
if (eof) {

View File

@@ -587,18 +587,18 @@ bool TrackQueue::isFinished() {
return currentTracksIndex >= currentTracks.size() - 1;
}
void TrackQueue::updateTracks(uint32_t requestedPosition, bool initial) {
bool TrackQueue::updateTracks(uint32_t requestedPosition, bool initial) {
std::scoped_lock lock(tracksMutex);
bool cleared = true;
// Copy requested track list
currentTracks = playbackState->remoteTracks;
currentTracksIndex = playbackState->innerFrame.state.playing_track_index;
if (initial) {
// Clear preloaded tracks
preloadedTracks.clear();
// Copy requested track list
currentTracks = playbackState->remoteTracks;
currentTracksIndex = playbackState->innerFrame.state.playing_track_index;
if (currentTracksIndex < currentTracks.size()) {
// Push a song on the preloaded queue
queueNextTrack(0, requestedPosition);
@@ -608,14 +608,25 @@ void TrackQueue::updateTracks(uint32_t requestedPosition, bool initial) {
notifyPending = true;
playableSemaphore->give();
} else if (preloadedTracks[0]->loading) {
// try to not re-load track if we are still loading it
// remove everything except first track
preloadedTracks.erase(preloadedTracks.begin() + 1, preloadedTracks.end());
// Push a song on the preloaded queue
CSPOT_LOG(info, "Keeping current track %d", currentTracksIndex);
queueNextTrack(1);
cleared = false;
} else {
// Clear preloaded tracks
preloadedTracks.clear();
// Copy requested track list
currentTracks = playbackState->remoteTracks;
// Push a song on the preloaded queue
CSPOT_LOG(info, "Re-loading current track");
queueNextTrack(0, requestedPosition);
}
return cleared;
}

View File

@@ -216,7 +216,7 @@ static EXT_RAM_ATTR struct {
static EXT_RAM_ATTR struct {
int mode;
int n, style, max;
int n, style, max, gain;
u16_t config;
struct bar_s bars[MAX_BARS] ;
} led_visu;
@@ -1089,10 +1089,10 @@ static void displayer_update(void) {
if (led_display && led_visu.mode) {
// run built in visualizer effects
if (led_visu.mode == VISU_VUMETER) {
vu_scale(led_visu.bars, led_visu.max, meters.levels);
vu_scale(led_visu.bars, led_visu.gain, meters.levels);
led_vu_display(led_visu.bars[0].current, led_visu.bars[1].current, led_visu.max, led_visu.style);
} else if (led_visu.mode == VISU_SPECTRUM) {
spectrum_scale(led_visu.n, led_visu.bars, led_visu.max, meters.samples);
spectrum_scale(led_visu.n, led_visu.bars, led_visu.gain, meters.samples);
uint8_t* p = (uint8_t*) led_data;
for (int i = 0; i < led_visu.n; i++) {
*p = led_visu.bars[i].current;
@@ -1100,7 +1100,7 @@ static void displayer_update(void) {
}
led_vu_spectrum(led_data, led_visu.max, led_visu.n, led_visu.style);
} else if (led_visu.mode == VISU_WAVEFORM) {
spectrum_scale(led_visu.n, led_visu.bars, led_visu.max, meters.samples);
spectrum_scale(led_visu.n, led_visu.bars, led_visu.gain, meters.samples);
led_vu_spin_dial(
led_visu.bars[led_visu.n-2].current,
led_visu.bars[(led_visu.n/2)+1].current * 50 / led_visu.max,
@@ -1277,8 +1277,8 @@ static void ledv_handler( u8_t *data, int len) {
led_visu.mode = pkt->which;
led_visu.style = pkt->style;
led_visu.max = pkt->bright;
led_visu.gain = led_visu.max * led_vu_scale() / 100;
led_vu_clear();
if (led_visu.mode) {
if (led_visu.mode == VISU_SPECTRUM) {
led_visu.n = (led_visu.config < MAX_BARS) ? led_visu.config : MAX_BARS;
@@ -1293,8 +1293,10 @@ static void ledv_handler( u8_t *data, int len) {
// reset bars maximum
for (int i = led_visu.n; --i >= 0;) led_visu.bars[i].max = 0;
LOG_INFO("LED Visualizer mode %u with bars:%u max:%u style:%d", led_visu.mode, led_visu.n, led_visu.max, led_visu.style);
LOG_INFO("LED Visualizer mode %u with bars:%u max:%u style:%d gain:%u", led_visu.mode, led_visu.n, led_visu.max, led_visu.style, led_visu.gain);
} else {
led_vu_clear();
LOG_INFO("Stopping led visualizer");
}

View File

@@ -61,7 +61,6 @@ static bool init(char *config, int i2c_port_num, i2s_config_t *i2s_config, bool
char *p;
i2c_addr = adac_init(config, i2c_port_num);
if (!i2c_addr) return true;
ESP_LOGI(TAG, "DAC on I2C @%d", i2c_addr);
@@ -137,6 +136,7 @@ bool i2c_json_execute(char *set) {
if ((action = cJSON_GetObjectItemCaseSensitive(item, "gpio")) != NULL) {
cJSON *level = cJSON_GetObjectItemCaseSensitive(item, "level");
ESP_LOGI(TAG, "set GPIO %d at %d", action->valueint, level->valueint);
if (action->valueint < GPIO_NUM_MAX) gpio_pad_select_gpio(action->valueint);
gpio_set_direction_x(action->valueint, GPIO_MODE_OUTPUT);
gpio_set_level_x(action->valueint, level->valueint);
continue;

View File

@@ -982,8 +982,8 @@ void slimproto(log_level level, char *server, u8_t mac[6], const char *name, con
// in embedded we give up after a while no matter what
if (++failed_connect > MAX_SERVER_RETRIES && !server) {
slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(NULL, MAX_SERVER_RETRIES);
if (!slimproto_ip) return;
} else if (reconnect && MAX_SERVER_RETRIES && failed_connect > 5 * MAX_SERVER_RETRIES) return;
if (!slimproto_ip && !output.external) return;
} else if (reconnect && MAX_SERVER_RETRIES && failed_connect > 5 * MAX_SERVER_RETRIES && !output.external) return;
#else
// rediscover server if it was not set at startup or exit
if (!server && ++failed_connect > 5) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1,2 +0,0 @@
declare function _exports(grunt: any): void;
export = _exports;

View File

@@ -1,2 +0,0 @@
declare function _exports(grunt: any): void;
export = _exports;

View File

@@ -1,2 +0,0 @@
declare function _exports(grunt: any): void;
export = _exports;

View File

@@ -1,688 +0,0 @@
/**
* Class definition
*/
export class Alert extends BaseComponent {
static get NAME(): string;
static jQueryInterface(config: any): any;
close(): void;
_destroyElement(): void;
}
/**
* Class definition
*/
export class Button extends BaseComponent {
static get NAME(): string;
static jQueryInterface(config: any): any;
toggle(): void;
}
/**
* Class definition
*/
export class Carousel extends BaseComponent {
static get Default(): {
interval: number;
keyboard: boolean;
pause: string;
ride: boolean;
touch: boolean;
wrap: boolean;
};
static get DefaultType(): {
interval: string;
keyboard: string;
pause: string;
ride: string;
touch: string;
wrap: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_interval: NodeJS.Timeout;
_activeElement: any;
_isSliding: boolean;
touchTimeout: NodeJS.Timeout;
_swipeHelper: Swipe;
_indicatorsElement: any;
next(): void;
nextWhenVisible(): void;
prev(): void;
pause(): void;
cycle(): void;
_maybeEnableCycle(): void;
to(index: any): void;
_addEventListeners(): void;
_addTouchEventListeners(): void;
_keydown(event: any): void;
_getItemIndex(element: any): number;
_setActiveIndicatorElement(index: any): void;
_updateInterval(): void;
_slide(order: any, element?: any): void;
_isAnimated(): any;
_getActive(): any;
_getItems(): any[];
_clearInterval(): void;
_directionToOrder(direction: any): "next" | "prev";
_orderToDirection(order: any): "right" | "left";
}
/**
* Class definition
*/
export class Collapse extends BaseComponent {
static get Default(): {
parent: any;
toggle: boolean;
};
static get DefaultType(): {
parent: string;
toggle: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_isTransitioning: boolean;
_triggerArray: any[];
toggle(): void;
show(): void;
hide(): void;
_isShown(element?: any): any;
_getDimension(): "width" | "height";
_initializeChildren(): void;
_getFirstLevelChildren(selector: any): any[];
_addAriaAndCollapsedClass(triggerArray: any, isOpen: any): void;
}
/**
* Class definition
*/
export class Dropdown extends BaseComponent {
static get Default(): {
autoClose: boolean;
boundary: string;
display: string;
offset: number[];
popperConfig: any;
reference: string;
};
static get DefaultType(): {
autoClose: string;
boundary: string;
display: string;
offset: string;
popperConfig: string;
reference: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
static clearMenus(event: any): void;
static dataApiKeydownHandler(event: any): void;
_popper: Popper.Instance;
_parent: any;
_menu: any;
_inNavbar: boolean;
toggle(): void;
show(): void;
hide(): void;
update(): void;
_completeHide(relatedTarget: any): void;
_createPopper(): void;
_isShown(): any;
_getPlacement(): "top" | "bottom" | "top-end" | "top-start" | "bottom-end" | "bottom-start" | "left-start" | "right-start";
_detectNavbar(): boolean;
_getOffset(): any;
_getPopperConfig(): any;
_selectMenuItem({ key, target }: {
key: any;
target: any;
}): void;
}
/**
* Class definition
*/
export class Modal extends BaseComponent {
static get Default(): {
backdrop: boolean;
focus: boolean;
keyboard: boolean;
};
static get DefaultType(): {
backdrop: string;
focus: string;
keyboard: string;
};
static get NAME(): string;
static jQueryInterface(config: any, relatedTarget: any): any;
_dialog: any;
_backdrop: Backdrop;
_focustrap: FocusTrap;
_isShown: boolean;
_isTransitioning: boolean;
_scrollBar: ScrollBarHelper;
toggle(relatedTarget: any): void;
show(relatedTarget: any): void;
hide(): void;
handleUpdate(): void;
_initializeBackDrop(): Backdrop;
_initializeFocusTrap(): FocusTrap;
_showElement(relatedTarget: any): void;
_addEventListeners(): void;
_hideModal(): void;
_isAnimated(): any;
_triggerBackdropTransition(): void;
/**
* The following methods are used to handle overflowing modals
*/
_adjustDialog(): void;
_resetAdjustments(): void;
}
/**
* Class definition
*/
export class Offcanvas extends BaseComponent {
static get Default(): {
backdrop: boolean;
keyboard: boolean;
scroll: boolean;
};
static get DefaultType(): {
backdrop: string;
keyboard: string;
scroll: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_isShown: boolean;
_backdrop: Backdrop;
_focustrap: FocusTrap;
toggle(relatedTarget: any): void;
show(relatedTarget: any): void;
hide(): void;
_initializeBackDrop(): Backdrop;
_initializeFocusTrap(): FocusTrap;
_addEventListeners(): void;
}
/**
* Class definition
*/
export class Popover extends Tooltip {
static get Default(): {
content: string;
offset: number[];
placement: string;
template: string;
trigger: string;
allowList: {
'*': (string | RegExp)[];
a: string[];
area: any[];
b: any[];
br: any[];
col: any[];
code: any[];
div: any[];
em: any[];
hr: any[];
h1: any[];
h2: any[];
h3: any[];
h4: any[];
h5: any[];
h6: any[];
i: any[];
img: string[];
li: any[];
ol: any[];
p: any[];
pre: any[];
s: any[];
small: any[];
span: any[];
sub: any[];
sup: any[];
strong: any[];
u: any[];
ul: any[];
};
animation: boolean;
boundary: string;
container: boolean;
customClass: string;
delay: number;
fallbackPlacements: string[];
html: boolean;
popperConfig: any;
sanitize: boolean;
sanitizeFn: any;
selector: boolean;
title: string;
};
static get DefaultType(): {
content: string;
allowList: string;
animation: string;
boundary: string;
container: string;
customClass: string;
delay: string;
fallbackPlacements: string;
html: string;
offset: string;
placement: string;
popperConfig: string;
sanitize: string;
sanitizeFn: string;
selector: string;
template: string;
title: string;
trigger: string;
};
_isWithContent(): any;
_getContentForTemplate(): {
".popover-header": any;
".popover-body": any;
};
_getContent(): any;
}
/**
* Class definition
*/
export class ScrollSpy extends BaseComponent {
static get Default(): {
offset: any;
rootMargin: string;
smoothScroll: boolean;
target: any;
threshold: number[];
};
static get DefaultType(): {
offset: string;
rootMargin: string;
smoothScroll: string;
target: string;
threshold: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_targetLinks: Map<any, any>;
_observableSections: Map<any, any>;
_rootElement: any;
_activeTarget: any;
_observer: IntersectionObserver;
_previousScrollData: {
visibleEntryTop: number;
parentScrollTop: number;
};
refresh(): void;
_maybeEnableSmoothScroll(): void;
_getNewObserver(): IntersectionObserver;
_observerCallback(entries: any): void;
_initializeTargetsAndObservables(): void;
_process(target: any): void;
_activateParents(target: any): void;
_clearActiveClass(parent: any): void;
}
/**
* Class definition
*/
export class Tab extends BaseComponent {
static get NAME(): string;
static jQueryInterface(config: any): any;
constructor(element: any);
_parent: any;
show(): void;
_activate(element: any, relatedElem: any): void;
_deactivate(element: any, relatedElem: any): void;
_keydown(event: any): void;
_getChildren(): any[];
_getActiveElem(): any;
_setInitialAttributes(parent: any, children: any): void;
_setInitialAttributesOnChild(child: any): void;
_setInitialAttributesOnTargetPanel(child: any): void;
_toggleDropDown(element: any, open: any): void;
_setAttributeIfNotExists(element: any, attribute: any, value: any): void;
_elemIsActive(elem: any): any;
_getInnerElement(elem: any): any;
_getOuterElement(elem: any): any;
}
/**
* Class definition
*/
export class Toast extends BaseComponent {
static get Default(): {
animation: boolean;
autohide: boolean;
delay: number;
};
static get DefaultType(): {
animation: string;
autohide: string;
delay: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_timeout: NodeJS.Timeout;
_hasMouseInteraction: boolean;
_hasKeyboardInteraction: boolean;
show(): void;
hide(): void;
isShown(): any;
_maybeScheduleHide(): void;
_onInteraction(event: any, isInteracting: any): void;
_setListeners(): void;
_clearTimeout(): void;
}
/**
* Class definition
*/
export class Tooltip extends BaseComponent {
static get Default(): {
allowList: {
'*': (string | RegExp)[];
a: string[];
area: any[];
b: any[];
br: any[];
col: any[];
code: any[];
div: any[];
em: any[];
hr: any[];
h1: any[];
h2: any[];
h3: any[];
h4: any[];
h5: any[];
h6: any[];
i: any[];
img: string[];
li: any[];
ol: any[];
p: any[];
pre: any[];
s: any[];
small: any[];
span: any[];
sub: any[];
sup: any[];
strong: any[];
u: any[];
ul: any[];
};
animation: boolean;
boundary: string;
container: boolean;
customClass: string;
delay: number;
fallbackPlacements: string[];
html: boolean;
offset: number[];
placement: string;
popperConfig: any;
sanitize: boolean;
sanitizeFn: any;
selector: boolean;
template: string;
title: string;
trigger: string;
};
static get DefaultType(): {
allowList: string;
animation: string;
boundary: string;
container: string;
customClass: string;
delay: string;
fallbackPlacements: string;
html: string;
offset: string;
placement: string;
popperConfig: string;
sanitize: string;
sanitizeFn: string;
selector: string;
template: string;
title: string;
trigger: string;
};
static get NAME(): string;
static jQueryInterface(config: any): any;
_isEnabled: boolean;
_timeout: number;
_isHovered: boolean;
_activeTrigger: {};
_popper: Popper.Instance;
_templateFactory: TemplateFactory;
_newContent: any;
tip: Element;
enable(): void;
disable(): void;
toggleEnabled(): void;
toggle(): void;
show(): void;
hide(): void;
update(): void;
_isWithContent(): boolean;
_getTipElement(): Element;
_createTipElement(content: any): Element;
setContent(content: any): void;
_getTemplateFactory(content: any): TemplateFactory;
_getContentForTemplate(): {
".tooltip-inner": any;
};
_getTitle(): any;
_initializeOnDelegatedTarget(event: any): any;
_isAnimated(): any;
_isShown(): boolean;
_createPopper(tip: any): Popper.Instance;
_getOffset(): any;
_resolvePossibleFunction(arg: any): any;
_getPopperConfig(attachment: any): any;
_setListeners(): void;
_hideModalHandler: () => void;
_fixTitle(): void;
_enter(): void;
_leave(): void;
_setTimeout(handler: any, timeout: any): void;
_isWithActiveTrigger(): boolean;
_getDelegateConfig(): {
selector: boolean;
trigger: string;
};
_disposePopper(): void;
}
/**
* Class definition
*/
declare class BaseComponent extends Config {
static getInstance(element: any): any;
static getOrCreateInstance(element: any, config?: {}): any;
static get VERSION(): string;
static get DATA_KEY(): string;
static get EVENT_KEY(): string;
static eventName(name: any): string;
constructor(element: any, config: any);
_element: any;
_config: any;
dispose(): void;
_queueCallback(callback: any, element: any, isAnimated?: boolean): void;
}
/**
* Class definition
*/
declare class Swipe extends Config {
static get Default(): {
endCallback: any;
leftCallback: any;
rightCallback: any;
};
static get DefaultType(): {
endCallback: string;
leftCallback: string;
rightCallback: string;
};
static get NAME(): string;
static isSupported(): boolean;
constructor(element: any, config: any);
_element: any;
_config: any;
_deltaX: number;
_supportPointerEvents: boolean;
dispose(): void;
_start(event: any): void;
_end(event: any): void;
_move(event: any): void;
_handleSwipe(): void;
_initEvents(): void;
_eventIsPointerPenTouch(event: any): boolean;
}
import * as Popper from "@popperjs/core";
/**
* Class definition
*/
declare class Backdrop extends Config {
static get Default(): {
className: string;
clickCallback: any;
isAnimated: boolean;
isVisible: boolean;
rootElement: string;
};
static get DefaultType(): {
className: string;
clickCallback: string;
isAnimated: string;
isVisible: string;
rootElement: string;
};
static get NAME(): string;
constructor(config: any);
_config: any;
_isAppended: boolean;
_element: HTMLDivElement;
show(callback: any): void;
hide(callback: any): void;
dispose(): void;
_getElement(): HTMLDivElement;
_append(): void;
_emulateAnimation(callback: any): void;
}
/**
* Class definition
*/
declare class FocusTrap extends Config {
static get Default(): {
autofocus: boolean;
trapElement: any;
};
static get DefaultType(): {
autofocus: string;
trapElement: string;
};
static get NAME(): string;
constructor(config: any);
_config: any;
_isActive: boolean;
_lastTabNavDirection: string;
activate(): void;
deactivate(): void;
_handleFocusin(event: any): void;
_handleKeydown(event: any): void;
}
/**
* Class definition
*/
declare class ScrollBarHelper {
_element: HTMLElement;
getWidth(): number;
hide(): void;
reset(): void;
isOverflowing(): boolean;
_disableOverFlow(): void;
_setElementAttributes(selector: any, styleProperty: any, callback: any): void;
_saveInitialAttribute(element: any, styleProperty: any): void;
_resetElementAttributes(selector: any, styleProperty: any): void;
_applyManipulationCallback(selector: any, callBack: any): void;
}
/**
* Class definition
*/
declare class TemplateFactory extends Config {
static get Default(): {
allowList: {
'*': (string | RegExp)[];
a: string[];
area: any[];
b: any[];
br: any[];
col: any[];
code: any[];
div: any[];
em: any[];
hr: any[];
h1: any[];
h2: any[];
h3: any[];
h4: any[];
h5: any[];
h6: any[];
i: any[];
img: string[];
li: any[];
ol: any[];
p: any[];
pre: any[];
s: any[];
small: any[];
span: any[];
sub: any[];
sup: any[];
strong: any[];
u: any[];
ul: any[];
};
content: {};
extraClass: string;
html: boolean;
sanitize: boolean;
sanitizeFn: any;
template: string;
};
static get DefaultType(): {
allowList: string;
content: string;
extraClass: string;
html: string;
sanitize: string;
sanitizeFn: string;
template: string;
};
static get NAME(): string;
constructor(config: any);
_config: any;
getContent(): any[];
hasContent(): boolean;
changeContent(content: any): TemplateFactory;
toHtml(): Element;
_typeCheckConfig(config: any): void;
_checkContent(arg: any): void;
_setContent(template: any, content: any, selector: any): void;
_maybeSanitize(arg: any): any;
_resolvePossibleFunction(arg: any): any;
_putElementInTemplate(element: any, templateElement: any): void;
}
/**
* --------------------------------------------------------------------------
* Bootstrap util/config.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* Class definition
*/
declare class Config {
static get Default(): {};
static get DefaultType(): {};
static get NAME(): void;
_getConfig(config: any): any;
_configAfterMerge(config: any): any;
_mergeConfigObj(config: any, element: any): any;
_typeCheckConfig(config: any, configTypes?: any): void;
}
export {};

View File

@@ -1,93 +0,0 @@
/// <reference lib="webworker" />
export namespace languages {
export namespace markup {
namespace tag { }
}
import html = markup;
export { html };
import mathml = markup;
export { mathml };
import svg = markup;
export { svg };
export const xml: {
[x: string]: RegExp | GrammarToken | (RegExp | GrammarToken)[];
};
import ssml = xml;
export { ssml };
import atom = xml;
export { atom };
import rss = xml;
export { rss };
export const clike: {
comment: {
pattern: RegExp;
lookbehind: boolean;
greedy: boolean;
}[];
string: {
pattern: RegExp;
greedy: boolean;
};
'class-name': {
pattern: RegExp;
lookbehind: boolean;
inside: {
punctuation: RegExp;
};
};
keyword: RegExp;
boolean: RegExp;
function: RegExp;
number: RegExp;
operator: RegExp;
punctuation: RegExp;
};
export const javascript: {
[x: string]: RegExp | GrammarToken | (RegExp | GrammarToken)[];
};
import js = javascript;
export { js };
}
/**
* The expansion of a simple `RegExp` literal to support additional properties.
*/
export type GrammarToken = {
/**
* The regular expression of the token.
*/
pattern: RegExp;
/**
* If `true`, then the first capturing group of `pattern` will (effectively)
* behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
*/
lookbehind?: boolean;
/**
* Whether the token is greedy.
*/
greedy?: boolean;
/**
* An optional alias or list of aliases.
*/
alias?: string | string[];
/**
* The nested grammar of this token.
*
* The `inside` grammar will be used to tokenize the text value of each token of this kind.
*
* This can be used to make nested and even recursive language definitions.
*
* Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
* each another.
*/
inside?: Grammar;
};
export type Grammar = {
[x: string]: RegExp | GrammarToken | Array<RegExp | GrammarToken>;
};
/**
* A function which will invoked after an element was successfully highlighted.
*/
export type HighlightCallback = (element: Element) => void;
export type HookCallback = (env: {
[x: string]: any;
}) => void;

View File

@@ -67,6 +67,14 @@ declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
@@ -205,6 +213,10 @@ declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare let sd: {};
declare let rf: boolean;
declare function refreshStatus(): void;

View File

@@ -1,5 +1,5 @@
target_add_binary_data( __idf_wifi-manager webapp/dist/css/index.dd7dd9416e2d805d07cc.css.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/css/index.4bbe29a78a667faa2b6f.css.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/favicon-32x32.png BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/index.html.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.f20992.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.f20992.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.0ba488.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.0ba488.bundle.js.gz BINARY)

View File

@@ -1,34 +1,34 @@
// Automatically generated. Do not edit manually!.
#include <inttypes.h>
extern const uint8_t _index_dd7dd9416e2d805d07cc_css_gz_start[] asm("_binary_index_dd7dd9416e2d805d07cc_css_gz_start");
extern const uint8_t _index_dd7dd9416e2d805d07cc_css_gz_end[] asm("_binary_index_dd7dd9416e2d805d07cc_css_gz_end");
extern const uint8_t _index_4bbe29a78a667faa2b6f_css_gz_start[] asm("_binary_index_4bbe29a78a667faa2b6f_css_gz_start");
extern const uint8_t _index_4bbe29a78a667faa2b6f_css_gz_end[] asm("_binary_index_4bbe29a78a667faa2b6f_css_gz_end");
extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_start");
extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
extern const uint8_t _index_f20992_bundle_js_gz_start[] asm("_binary_index_f20992_bundle_js_gz_start");
extern const uint8_t _index_f20992_bundle_js_gz_end[] asm("_binary_index_f20992_bundle_js_gz_end");
extern const uint8_t _node_vendors_f20992_bundle_js_gz_start[] asm("_binary_node_vendors_f20992_bundle_js_gz_start");
extern const uint8_t _node_vendors_f20992_bundle_js_gz_end[] asm("_binary_node_vendors_f20992_bundle_js_gz_end");
extern const uint8_t _index_0ba488_bundle_js_gz_start[] asm("_binary_index_0ba488_bundle_js_gz_start");
extern const uint8_t _index_0ba488_bundle_js_gz_end[] asm("_binary_index_0ba488_bundle_js_gz_end");
extern const uint8_t _node_vendors_0ba488_bundle_js_gz_start[] asm("_binary_node_vendors_0ba488_bundle_js_gz_start");
extern const uint8_t _node_vendors_0ba488_bundle_js_gz_end[] asm("_binary_node_vendors_0ba488_bundle_js_gz_end");
const char * resource_lookups[] = {
"/css/index.dd7dd9416e2d805d07cc.css.gz",
"/css/index.4bbe29a78a667faa2b6f.css.gz",
"/favicon-32x32.png",
"/index.html.gz",
"/js/index.f20992.bundle.js.gz",
"/js/node_vendors.f20992.bundle.js.gz",
"/js/index.0ba488.bundle.js.gz",
"/js/node_vendors.0ba488.bundle.js.gz",
""
};
const uint8_t * resource_map_start[] = {
_index_dd7dd9416e2d805d07cc_css_gz_start,
_index_4bbe29a78a667faa2b6f_css_gz_start,
_favicon_32x32_png_start,
_index_html_gz_start,
_index_f20992_bundle_js_gz_start,
_node_vendors_f20992_bundle_js_gz_start
_index_0ba488_bundle_js_gz_start,
_node_vendors_0ba488_bundle_js_gz_start
};
const uint8_t * resource_map_end[] = {
_index_dd7dd9416e2d805d07cc_css_gz_end,
_index_4bbe29a78a667faa2b6f_css_gz_end,
_favicon_32x32_png_end,
_index_html_gz_end,
_index_f20992_bundle_js_gz_end,
_node_vendors_f20992_bundle_js_gz_end
_index_0ba488_bundle_js_gz_end,
_node_vendors_0ba488_bundle_js_gz_end
};

View File

@@ -1,6 +1,6 @@
/***********************************
webpack_headers
dist/css/index.dd7dd9416e2d805d07cc.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.f20992.bundle.js.gz,dist/js/node_vendors.f20992.bundle.js.gz
dist/css/index.4bbe29a78a667faa2b6f.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.0ba488.bundle.js.gz,dist/js/node_vendors.0ba488.bundle.js.gz
***********************************/
#pragma once
#include <inttypes.h>

Binary file not shown.

View File

@@ -64,6 +64,9 @@ sub initPlugin {
Slim::Control::Request::subscribe( sub { onNotification(@_) }, [ ['newmetadata'] ] );
Slim::Control::Request::subscribe( sub { onNotification(@_) }, [ ['playlist'], ['open', 'newsong'] ]);
Slim::Control::Request::subscribe( \&onStopClear, [ ['playlist'], ['stop', 'clear'] ]);
# Add menu item to extras
Slim::Buttons::Home::addSubMenu('PLUGINS', 'PLUGIN_SQUEEZEESP32', { 'useMode' => 'squeezeesp32_mode', });
}
sub onStopClear {

View File

@@ -174,6 +174,20 @@ sub setLEDVisu {
}
updateLED($client);
# display name
my $modes = ledVisualizerModes;
my $desc = $modes->[$visu]{'desc'};
my $name = '';
for (my $j = 0; $j < scalar @$desc; $j++) {
$name .= ' ' if ($j > 0);
$name .= $client->string(@{$desc}[$j]) || @{$desc}[$j];
}
$client->showBriefly( {
'line1' => $client->string('PLUGIN_SQUEEZEESP32_LED_VISUALIZER'),
'line2' => $name,
});
}
sub onNotification {
@@ -186,4 +200,62 @@ sub onNotification {
}
}
sub setMainMode {
my $client = shift;
my $method = shift;
if ($method eq 'pop') {
Slim::Buttons::Common::popMode($client);
$client->update();
return;
}
Slim::Buttons::Common::pushModeLeft($client, 'INPUT.Choice', {
'listRef' => [
{
name => string('PLUGIN_SQUEEZEESP32_LED_VISUALIZER'),
onPlay => sub { Slim::Control::Request::executeRequest($client, ['led_visual']); },
},
{
name => string('PLUGIN_SQUEEZEESP32_LED_BRIGHTNESS'),
onPlay => sub { Slim::Buttons::Common::pushModeLeft($client, 'squeezeesp32_ledvu_bright'); },
},
],
'header' => string('PLUGIN_SQUEEZEESP32'),
'headerAddCount' => 1,
'overlayRef' => sub { return (undef, shift->symbols('rightarrow')) },
});
}
sub setLedvuBrightMode {
my $client = shift;
my $method = shift;
if ($method eq 'pop') {
Slim::Buttons::Common::popMode($client);
$client->update();
return;
}
my $bright = $prefs->client($client)->get('led_brightness');
Slim::Control::Request::executeRequest($client, ['led_visual',1,$bright]);
Slim::Buttons::Common::pushMode($client, 'INPUT.Bar', {
'header' => 'PLUGIN_SQUEEZEESP32_LED_BRIGHTNESS',
'stringHeader' => 1,
'headerValue' => 'unscaled',
'min' => 1,
'max' => 255,
'increment' => 1,
'onChange' => sub {
my ($client, $value) = @_;
$bright = $bright + $value;
if ($bright > 0 && $bright <= 255) {
$prefs->client($client)->set('led_brightness', $bright);
updateLED($client);
}
},
'valueRef' => $bright,
});
}
1;

View File

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

View File

@@ -1,10 +1,10 @@
<?xml version='1.0' standalone='yes'?>
<extensions>
<plugins>
<plugin version="0.501" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<plugin version="0.600" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<link>https://github.com/sle118/squeezelite-esp32</link>
<creator>Philippe</creator>
<sha>842ee0f7b8ccaf2e6df4a741565068f9e4c7a27e</sha>
<sha>335b585e22eddbddacce00f34001d8bf2ee0f54f</sha>
<email>philippe_44@outlook.com</email>
<desc lang="EN">SqueezeESP32 additional player id (100/101)</desc>
<url>http://raw.githubusercontent.com/sle118/squeezelite-esp32/master-v4.3/plugin/SqueezeESP32.zip</url>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
server_certs/r2m01.cer.34 Normal file

Binary file not shown.

BIN
server_certs/r2m01.cer.35 Normal file

Binary file not shown.

BIN
server_certs/r2m01.cer.36 Normal file

Binary file not shown.

BIN
server_certs/r2m01.cer.37 Normal file

Binary file not shown.

BIN
server_certs/r2m01.cer.38 Normal file

Binary file not shown.

BIN
server_certs/r2m01.cer.39 Normal file

Binary file not shown.