add color swap BGR/RGB and generalize invert option

This commit is contained in:
philippe44
2022-02-27 14:34:11 -08:00
parent 54d7e222d0
commit dd519b9229
13 changed files with 87 additions and 54 deletions

View File

@@ -464,6 +464,7 @@ const display_config_t * config_display_get(){
.speed = 0,
.rotate = false,
.invert = false,
.colorswap = 0,
};
char *config = config_alloc_get(NVS_TYPE_STR, "display_config");
if (!config) {
@@ -491,6 +492,7 @@ const display_config_t * config_display_get(){
dstruct.vflip= strcasestr(config, "VFlip") ? true : false;
dstruct.rotate= strcasestr(config, "rotate") ? true : false;
dstruct.invert= strcasestr(config, "invert") ? true : false;
dstruct.colorswap= strcasestr(config, "cswap") ? 1 : 0;
return &dstruct;
}