mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-13 06:57:07 +03:00
add buttons/rotary/ir/BT sink in sleep + battery low-voltage
This commit is contained in:
@@ -48,8 +48,8 @@ void ws2812_write_leds(struct led_state new_state);
|
||||
|
||||
static const char TAG[] = "muse";
|
||||
|
||||
static void (*battery_handler_chain)(float value);
|
||||
static void battery_svc(float value);
|
||||
static void (*battery_handler_chain)(float value, int cells);
|
||||
static void battery_svc(float value, int cells);
|
||||
static bool init(void);
|
||||
static void set_battery_led(float value);
|
||||
|
||||
@@ -81,11 +81,11 @@ static void set_battery_led(float value) {
|
||||
ws2812_write_leds(new_state);
|
||||
}
|
||||
|
||||
static void battery_svc(float value) {
|
||||
static void battery_svc(float value, int cells) {
|
||||
set_battery_led(value);
|
||||
ESP_LOGI(TAG, "Called for battery service with %f", value);
|
||||
|
||||
if (battery_handler_chain) battery_handler_chain(value);
|
||||
if (battery_handler_chain) battery_handler_chain(value, cells);
|
||||
}
|
||||
|
||||
// This is the buffer which the hw peripheral will access while pulsing the output pin
|
||||
|
||||
Reference in New Issue
Block a user