1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

CF/BF - Fix CLI being spammed with OSD MSP_DISPLAYPORT messages when OSD

over MSP is enabled.
This commit is contained in:
Hydra 2017-04-17 19:09:55 +01:00 committed by Dominic Clifton
parent 9ab02f1d38
commit ce76bf5b8f

View file

@ -44,9 +44,20 @@ PG_REGISTER(displayPortProfile_t, displayPortProfileMsp, PG_DISPLAY_PORT_MSP_CON
static displayPort_t mspDisplayPort;
#ifdef USE_CLI
extern uint8_t cliMode;
#endif
static int output(displayPort_t *displayPort, uint8_t cmd, uint8_t *buf, int len)
{
UNUSED(displayPort);
#ifdef USE_CLI
// FIXME There should be no dependency on the CLI but mspSerialPush doesn't check for cli mode, and can't because it also shouldn't have a dependency on the CLI.
if (cliMode) {
return 0;
}
#endif
return mspSerialPush(cmd, buf, len);
}