mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Fix max7456 defines
This commit is contained in:
parent
90393d5a12
commit
694875d0aa
6 changed files with 11 additions and 10 deletions
|
@ -846,7 +846,7 @@ uint16_t cmsHandleKeyWithRepeat(displayPort_t *pDisplay, uint8_t key, int repeat
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmsUpdate(uint32_t currentTimeUs)
|
void cmsUpdate(uint32_t currentTimeUs)
|
||||||
{
|
{
|
||||||
static int16_t rcDelayMs = BUTTON_TIME;
|
static int16_t rcDelayMs = BUTTON_TIME;
|
||||||
static int holdCount = 1;
|
static int holdCount = 1;
|
||||||
|
|
|
@ -13,6 +13,7 @@ void cmsHandler(timeUs_t currentTimeUs);
|
||||||
|
|
||||||
long cmsMenuChange(displayPort_t *pPort, const void *ptr);
|
long cmsMenuChange(displayPort_t *pPort, const void *ptr);
|
||||||
long cmsMenuExit(displayPort_t *pPort, const void *ptr);
|
long cmsMenuExit(displayPort_t *pPort, const void *ptr);
|
||||||
|
void cmsUpdate(uint32_t currentTimeUs);
|
||||||
|
|
||||||
#define CMS_STARTUP_HELP_TEXT1 "MENU: THR MID"
|
#define CMS_STARTUP_HELP_TEXT1 "MENU: THR MID"
|
||||||
#define CMS_STARTUP_HELP_TEXT2 "+ YAW LEFT"
|
#define CMS_STARTUP_HELP_TEXT2 "+ YAW LEFT"
|
||||||
|
|
|
@ -291,10 +291,10 @@ typedef struct master_s {
|
||||||
vcdProfile_t vcdProfile;
|
vcdProfile_t vcdProfile;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# ifdef USE_MSP_DISPLAYPORT
|
#ifdef USE_MSP_DISPLAYPORT
|
||||||
displayPortProfile_t displayPortProfileMsp;
|
displayPortProfile_t displayPortProfileMsp;
|
||||||
# endif
|
#endif
|
||||||
# ifdef USE_MAX7456
|
#ifdef USE_MAX7456
|
||||||
displayPortProfile_t displayPortProfileMax7456;
|
displayPortProfile_t displayPortProfileMax7456;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -819,7 +819,7 @@ static const clivalue_t valueTable[] = {
|
||||||
{ "displayport_msp_col_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMsp()->colAdjust, .config.minmax = { -6, 0 } },
|
{ "displayport_msp_col_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMsp()->colAdjust, .config.minmax = { -6, 0 } },
|
||||||
{ "displayport_msp_row_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMsp()->rowAdjust, .config.minmax = { -3, 0 } },
|
{ "displayport_msp_row_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMsp()->rowAdjust, .config.minmax = { -3, 0 } },
|
||||||
#endif
|
#endif
|
||||||
#ifdef OSD
|
#ifdef USE_MAX7456
|
||||||
{ "displayport_max7456_col_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMax7456()->colAdjust, .config.minmax = { -6, 0 } },
|
{ "displayport_max7456_col_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMax7456()->colAdjust, .config.minmax = { -6, 0 } },
|
||||||
{ "displayport_max7456_row_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMax7456()->rowAdjust, .config.minmax = { -3, 0 } },
|
{ "displayport_max7456_row_adjust", VAR_INT8 | MASTER_VALUE, &displayPortProfileMax7456()->rowAdjust, .config.minmax = { -3, 0 } },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -394,11 +394,11 @@ void init(void)
|
||||||
|
|
||||||
#ifdef OSD
|
#ifdef OSD
|
||||||
if (feature(FEATURE_OSD)) {
|
if (feature(FEATURE_OSD)) {
|
||||||
#ifdef USE_MAX7456
|
#if defined(USE_MAX7456)
|
||||||
// if there is a max7456 chip for the OSD then use it, otherwise use MSP
|
// if there is a max7456 chip for the OSD then use it, otherwise use MSP
|
||||||
displayPort_t *osdDisplayPort = max7456DisplayPortInit(vcdProfile());
|
displayPort_t *osdDisplayPort = max7456DisplayPortInit(vcdProfile());
|
||||||
#else
|
#elif defined(USE_MSP_DISPLAYPORT)
|
||||||
displayPort_t *osdDisplayPort = displayPortMspInit(displayPortProfileMax7456());
|
displayPort_t *osdDisplayPort = displayPortMspInit();
|
||||||
#endif
|
#endif
|
||||||
osdInit(osdDisplayPort);
|
osdInit(osdDisplayPort);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#ifdef OSD
|
#ifdef USE_MAX7456
|
||||||
|
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
|
@ -143,4 +143,4 @@ displayPort_t *max7456DisplayPortInit(const vcdProfile_t *vcdProfile)
|
||||||
resync(&max7456DisplayPort);
|
resync(&max7456DisplayPort);
|
||||||
return &max7456DisplayPort;
|
return &max7456DisplayPort;
|
||||||
}
|
}
|
||||||
#endif // OSD
|
#endif // USE_MAX7456
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue