mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
There was a little more fixed to do when telemetry was not eanbled.
Tested arm/disarm/arm/disarm with telemetry on and off, all working now. See #155.
This commit is contained in:
parent
2c8b3af88d
commit
2461973dd6
5 changed files with 40 additions and 4 deletions
|
@ -561,6 +561,18 @@ static void openAllMSPSerialPorts(serialConfig_t *serialConfig)
|
|||
UNUSED(serialPortFunctionList);
|
||||
}
|
||||
|
||||
void mspReleasePortIfAllocated(serialPort_t *serialPort)
|
||||
{
|
||||
uint8_t portIndex;
|
||||
for (portIndex = 0; portIndex < MAX_MSP_PORT_COUNT; portIndex++) {
|
||||
mspPort_t *candidateMspPort = &mspPorts[portIndex++];
|
||||
if (candidateMspPort->port == serialPort) {
|
||||
endSerialPortFunction(serialPort, FUNCTION_MSP);
|
||||
memset(candidateMspPort, 0, sizeof(mspPort_t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mspInit(serialConfig_t *serialConfig)
|
||||
{
|
||||
// calculate used boxes based on features and fill availableBoxes[] array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue