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

Allow CLI to be compiled out.

First cut, as proof-of-concept.  This allows CJMCU target to be built
without CLI and with Blackbox.
This commit is contained in:
Dominic Clifton 2015-05-19 23:42:41 +01:00
parent 67c6967da7
commit d0a9d14b87
15 changed files with 35 additions and 6 deletions

View file

@ -346,11 +346,13 @@ void serialInit(serialConfig_t *initialSerialConfig, bool softserialEnabled)
void handleSerial(void)
{
#ifdef USE_CLI
// in cli mode, all serial stuff goes to here. enter cli mode by sending #
if (cliMode) {
cliProcess();
return;
}
#endif
mspProcess();
}
@ -366,9 +368,14 @@ void cliEnter(serialPort_t *serialPort);
void evaluateOtherData(serialPort_t *serialPort, uint8_t receivedChar)
{
#ifndef USE_CLI
UNUSED(serialPort);
#else
if (receivedChar == '#') {
cliEnter(serialPort);
} else if (receivedChar == serialConfig->reboot_character) {
}
#endif
if (receivedChar == serialConfig->reboot_character) {
systemResetToBootloader();
}
}