mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
tweak muse color + add "invert" option
This commit is contained in:
@@ -462,7 +462,8 @@ const display_config_t * config_display_get(){
|
||||
.hflip = false,
|
||||
.type = NULL,
|
||||
.speed = 0,
|
||||
.rotate = false
|
||||
.rotate = false,
|
||||
.invert = false,
|
||||
};
|
||||
char *config = config_alloc_get(NVS_TYPE_STR, "display_config");
|
||||
if (!config) {
|
||||
@@ -482,7 +483,6 @@ const display_config_t * config_display_get(){
|
||||
PARSE_PARAM(config, "address", '=', dstruct.address);
|
||||
PARSE_PARAM(config, "cs", '=', dstruct.CS_pin);
|
||||
PARSE_PARAM(config, "speed", '=', dstruct.speed);
|
||||
PARSE_PARAM(config, "back", '=', dstruct.back);
|
||||
|
||||
if (strstr(config, "I2C") ) dstruct.type=i2c_name_type;
|
||||
if (strstr(config, "SPI") ) dstruct.type=spi_name_type;
|
||||
@@ -490,6 +490,7 @@ const display_config_t * config_display_get(){
|
||||
dstruct.hflip= strcasestr(config, "HFlip") ? true : false;
|
||||
dstruct.vflip= strcasestr(config, "VFlip") ? true : false;
|
||||
dstruct.rotate= strcasestr(config, "rotate") ? true : false;
|
||||
dstruct.rotate= strcasestr(config, "invert") ? true : false;
|
||||
return &dstruct;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ typedef struct {
|
||||
int depth;
|
||||
const char *type;
|
||||
bool rotate;
|
||||
bool invert;
|
||||
} display_config_t;
|
||||
|
||||
typedef struct eth_config_struct {
|
||||
|
||||
Reference in New Issue
Block a user