1
0
Fork 0
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:
Martin Budden 2017-02-22 14:06:46 +00:00
parent 90393d5a12
commit 694875d0aa
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

@ -291,10 +291,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

@ -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_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