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

Update serial and msp code to allow MSP on multiple ports.

Work in progress.  In testing using bluetooth on uart2 and uart1
connected to configurator it was observed that there is corrupted
responses being sent via uart2 - ez-gui shows some garbled data for the
box names.  updates appear sluggish in ez-gui but some correct data is
getting through.

Enabled with:

set serial_port_2_scenario = 8
save
This commit is contained in:
Dominic Clifton 2014-08-14 00:38:42 +01:00
parent 871f3024af
commit 7453e98b3b
2 changed files with 305 additions and 265 deletions

View file

@ -447,6 +447,15 @@ bool isSerialConfigValid(serialConfig_t *serialConfigToCheck)
return false;
}
uint8_t functionIndex;
uint8_t cliPortCount = 0;
for (functionIndex = 0; functionIndex < SERIAL_PORT_COUNT; functionIndex++) {
if (serialPortFunctions[functionIndex].scenario & FUNCTION_CLI) {
if (++cliPortCount > 1) {
return false;
}
}
}
return true;
}