mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
Muse: battery range update and dimm led - release
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
#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/rmt.h"
|
#include "driver/rmt.h"
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "targets.h"
|
#include "targets.h"
|
||||||
@@ -24,14 +23,18 @@
|
|||||||
|
|
||||||
// These values are determined by measuring pulse timing with logic analyzer and adjusting to match datasheet.
|
// These values are determined by measuring pulse timing with logic analyzer and adjusting to match datasheet.
|
||||||
#define T0H 14 // 0 bit high time
|
#define T0H 14 // 0 bit high time
|
||||||
#define T1H 52 // 1 bit high time
|
#define T1H 52 // 1 bit high time
|
||||||
#define TL 52 // low time for either bit
|
#define TL 52 // low time for either bit
|
||||||
|
|
||||||
#define GREEN 0xFF0000
|
// sets a color based on RGB from 0..255 and a brightness in % from 0..100
|
||||||
#define RED 0x00FF00
|
#define RGB(R,G,B,BR) (((G*BR)/100) << 16) | (((R*BR)/100) << 8) | ((B*BR)/100)
|
||||||
#define BLUE 0x0000FF
|
|
||||||
#define WHITE 0xFFFFFF
|
#define RED RGB(255,0,0,10)
|
||||||
#define YELLOW 0xE0F060
|
#define GREEN RGB(0,255,0,10)
|
||||||
|
#define BLUE RGB(0,0,255,10)
|
||||||
|
#define WHITE RGB(255,255,255,10)
|
||||||
|
#define YELLOW RGB(255,118,13,10)
|
||||||
|
|
||||||
struct led_state {
|
struct led_state {
|
||||||
uint32_t leds[NUM_LEDS];
|
uint32_t leds[NUM_LEDS];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ menu "Squeezelite-ESP32"
|
|||||||
config BAT_CONFIG
|
config BAT_CONFIG
|
||||||
string
|
string
|
||||||
default "channel=7,scale=20.24,atten=0" if SQUEEZEAMP
|
default "channel=7,scale=20.24,atten=0" if SQUEEZEAMP
|
||||||
default "channel=5,scale=7.48,atten=3,cells=1" if MUSE
|
default "channel=5,scale=7.00,atten=3,cells=1" if MUSE
|
||||||
default ""
|
default ""
|
||||||
config TARGET
|
config TARGET
|
||||||
string
|
string
|
||||||
|
|||||||
Reference in New Issue
Block a user