mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
CF/BF - Fix CLI being spammed with OSD MSP_DISPLAYPORT messages when OSD
over MSP is enabled.
This commit is contained in:
parent
9ab02f1d38
commit
ce76bf5b8f
1 changed files with 11 additions and 0 deletions
|
@ -44,9 +44,20 @@ PG_REGISTER(displayPortProfile_t, displayPortProfileMsp, PG_DISPLAY_PORT_MSP_CON
|
||||||
|
|
||||||
static displayPort_t mspDisplayPort;
|
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)
|
static int output(displayPort_t *displayPort, uint8_t cmd, uint8_t *buf, int len)
|
||||||
{
|
{
|
||||||
UNUSED(displayPort);
|
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);
|
return mspSerialPush(cmd, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue