Merge pull request #2470 from martinbudden/bf_max7456_defines

Fix max7456 defines
This commit is contained in:
Martin Budden 2017-02-23 05:46:50 +00:00 committed by GitHub
commit 3b954244c5
6 changed files with 11 additions and 10 deletions

View File

@ -846,7 +846,7 @@ uint16_t cmsHandleKeyWithRepeat(displayPort_t *pDisplay, uint8_t key, int repeat
return ret;
}
static void cmsUpdate(uint32_t currentTimeUs)
void cmsUpdate(uint32_t currentTimeUs)
{
static int16_t rcDelayMs = BUTTON_TIME;
static int holdCount = 1;

View File

@ -13,6 +13,7 @@ void cmsHandler(timeUs_t currentTimeUs);
long cmsMenuChange(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_TEXT2 "+ YAW LEFT"

View File

@ -289,10 +289,10 @@ typedef struct master_s {
vcdProfile_t vcdProfile;
#endif
# ifdef USE_MSP_DISPLAYPORT
#ifdef USE_MSP_DISPLAYPORT
displayPortProfile_t displayPortProfileMsp;
# endif
# ifdef USE_MAX7456
#endif
#ifdef USE_MAX7456
displayPortProfile_t displayPortProfileMax7456;
# endif

View File

@ -878,7 +878,7 @@ static const clivalue_t valueTable[] = {
{ "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 } },
#endif
#ifdef OSD
#ifdef USE_MAX7456
{ "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 } },
#endif

View File

@ -394,11 +394,11 @@ void init(void)
#ifdef 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
displayPort_t *osdDisplayPort = max7456DisplayPortInit(vcdProfile());
#else
displayPort_t *osdDisplayPort = displayPortMspInit(displayPortProfileMax7456());
#elif defined(USE_MSP_DISPLAYPORT)
displayPort_t *osdDisplayPort = displayPortMspInit();
#endif
osdInit(osdDisplayPort);
}

View File

@ -20,7 +20,7 @@
#include "platform.h"
#ifdef OSD
#ifdef USE_MAX7456
#include "common/utils.h"
@ -143,4 +143,4 @@ displayPort_t *max7456DisplayPortInit(const vcdProfile_t *vcdProfile)
resync(&max7456DisplayPort);
return &max7456DisplayPort;
}
#endif // OSD
#endif // USE_MAX7456