mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
now ready for Muse final fix
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <freertos/FreeRTOS.h>
|
#include <freertos/FreeRTOS.h>
|
||||||
#include <freertos/task.h>
|
#include <freertos/task.h>
|
||||||
#include <driver/adc.h>
|
//#include <driver/adc.h>
|
||||||
#include "driver/rmt.h"
|
#include "driver/rmt.h"
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
|
|
||||||
@@ -43,8 +43,6 @@ void ws2812_write_leds(struct led_state new_state);
|
|||||||
static const char TAG[] = "muse";
|
static const char TAG[] = "muse";
|
||||||
|
|
||||||
static void (*battery_handler_chain)(float value);
|
static void (*battery_handler_chain)(float value);
|
||||||
|
|
||||||
static void battery(void *data);
|
|
||||||
static void battery_svc(float value);
|
static void battery_svc(float value);
|
||||||
|
|
||||||
void target_init(void) {
|
void target_init(void) {
|
||||||
@@ -55,10 +53,12 @@ void target_init(void) {
|
|||||||
|
|
||||||
static void battery_svc(float value) {
|
static void battery_svc(float value) {
|
||||||
ESP_LOGI(TAG, "Called for battery service with %f", value);
|
ESP_LOGI(TAG, "Called for battery service with %f", value);
|
||||||
|
// put here your code for LED according to value
|
||||||
if (battery_handler_chain) battery_handler_chain(value);
|
if (battery_handler_chain) battery_handler_chain(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Battery monitoring
|
// Battery monitoring
|
||||||
|
/*
|
||||||
static void battery(void *data)
|
static void battery(void *data)
|
||||||
{
|
{
|
||||||
#define VGREEN 2300
|
#define VGREEN 2300
|
||||||
@@ -91,6 +91,7 @@ static void battery(void *data)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// This is the buffer which the hw peripheral will access while pulsing the output pin
|
// This is the buffer which the hw peripheral will access while pulsing the output pin
|
||||||
rmt_item32_t led_data_buffer[LED_BUFFER_ITEMS];
|
rmt_item32_t led_data_buffer[LED_BUFFER_ITEMS];
|
||||||
|
|||||||
Reference in New Issue
Block a user