Add setting of MAX7456 image options
This commit is contained in:
parent
28fcfcd34e
commit
6ea05b93ab
|
@ -46,6 +46,9 @@ typedef struct displayPortVTable_s {
|
|||
typedef struct displayPortProfile_s {
|
||||
int8_t colAdjust;
|
||||
int8_t rowAdjust;
|
||||
bool invert;
|
||||
uint8_t blackBrightness;
|
||||
uint8_t whiteBrightness;
|
||||
} displayPortProfile_t;
|
||||
|
||||
void displayGrab(displayPort_t *instance);
|
||||
|
|
|
@ -700,6 +700,9 @@ const clivalue_t valueTable[] = {
|
|||
#ifdef USE_MAX7456
|
||||
{ "displayport_max7456_col_adjust", VAR_INT8| MASTER_VALUE, .config.minmax = { -6, 0 }, PG_DISPLAY_PORT_MAX7456_CONFIG, offsetof(displayPortProfile_t, colAdjust) },
|
||||
{ "displayport_max7456_row_adjust", VAR_INT8| MASTER_VALUE, .config.minmax = { -3, 0 }, PG_DISPLAY_PORT_MAX7456_CONFIG, offsetof(displayPortProfile_t, rowAdjust) },
|
||||
{ "displayport_max7456_inv", VAR_UINT8| MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_DISPLAY_PORT_MAX7456_CONFIG, offsetof(displayPortProfile_t, invert) },
|
||||
{ "displayport_max7456_blk", VAR_UINT8| MASTER_VALUE, .config.minmax = { 0, 3 }, PG_DISPLAY_PORT_MAX7456_CONFIG, offsetof(displayPortProfile_t, blackBrightness) },
|
||||
{ "displayport_max7456_wht", VAR_UINT8| MASTER_VALUE, .config.minmax = { 0, 3 }, PG_DISPLAY_PORT_MAX7456_CONFIG, offsetof(displayPortProfile_t, whiteBrightness) },
|
||||
#endif
|
||||
|
||||
#ifdef USE_ESC_SENSOR
|
||||
|
|
|
@ -62,6 +62,10 @@ static int release(displayPort_t *displayPort)
|
|||
static int clearScreen(displayPort_t *displayPort)
|
||||
{
|
||||
UNUSED(displayPort);
|
||||
|
||||
max7456Invert(displayPortProfileMax7456()->invert);
|
||||
max7456Brightness(displayPortProfileMax7456()->blackBrightness, displayPortProfileMax7456()->whiteBrightness);
|
||||
|
||||
max7456ClearScreen();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue