Merge pull request #170 from Pierre-A/cc3d-updates-pa2
Correction of typo and consequences
This commit is contained in:
commit
56a1458eed
|
@ -252,6 +252,12 @@ serialPortSearchResult_t *findNextSerialPort(serialPortFunction_e function, cons
|
||||||
uint8_t serialPortIndex = lookupSerialPortIndexByIdentifier(serialPortFunction->identifier);
|
uint8_t serialPortIndex = lookupSerialPortIndexByIdentifier(serialPortFunction->identifier);
|
||||||
const serialPortConstraint_t *serialPortConstraint = &serialPortConstraints[serialPortIndex];
|
const serialPortConstraint_t *serialPortConstraint = &serialPortConstraints[serialPortIndex];
|
||||||
|
|
||||||
|
#if defined(CC3D)
|
||||||
|
if (!feature(FEATURE_SOFTSERIAL) && (
|
||||||
|
serialPortConstraint->identifier == SERIAL_PORT_SOFTSERIAL1)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#else
|
||||||
#if defined(USE_SOFTSERIAL1) ||(defined(USE_SOFTSERIAL2))
|
#if defined(USE_SOFTSERIAL1) ||(defined(USE_SOFTSERIAL2))
|
||||||
if (!feature(FEATURE_SOFTSERIAL) && (
|
if (!feature(FEATURE_SOFTSERIAL) && (
|
||||||
serialPortConstraint->identifier == SERIAL_PORT_SOFTSERIAL1 ||
|
serialPortConstraint->identifier == SERIAL_PORT_SOFTSERIAL1 ||
|
||||||
|
@ -259,13 +265,12 @@ serialPortSearchResult_t *findNextSerialPort(serialPortFunction_e function, cons
|
||||||
)) {
|
)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if (defined(NAZE) || defined(OLIMEXINO)) && defined(SONAR)
|
#if (defined(NAZE) || defined(OLIMEXINO)) && defined(SONAR)
|
||||||
if (feature(FEATURE_SONAR) && !feature(FEATURE_RX_PARALLEL_PWM) && (serialPortConstraint->identifier == SERIAL_PORT_SOFTSERIAL2)) {
|
if (feature(FEATURE_SONAR) && !feature(FEATURE_RX_PARALLEL_PWM) && (serialPortConstraint->identifier == SERIAL_PORT_SOFTSERIAL2)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (functionConstraint->requiredSerialPortFeatures != SPF_NONE) {
|
if (functionConstraint->requiredSerialPortFeatures != SPF_NONE) {
|
||||||
|
|
|
@ -87,16 +87,15 @@ typedef enum {
|
||||||
#define SERIAL_PORT_IDENTIFIER_COUNT 5
|
#define SERIAL_PORT_IDENTIFIER_COUNT 5
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef CCD3
|
#ifdef CC3D
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SERIAL_PORT_USART1,
|
SERIAL_PORT_USART1 = 0,
|
||||||
SERIAL_PORT_USART3,
|
SERIAL_PORT_USART3,
|
||||||
SERIAL_PORT_SOFTSERIAL1,
|
SERIAL_PORT_SOFTSERIAL1,
|
||||||
SERIAL_PORT_SOFTSERIAL2
|
|
||||||
} serialPortIdentifier_e;
|
} serialPortIdentifier_e;
|
||||||
|
|
||||||
#define SERIAL_PORT_IDENTIFIER_COUNT 4
|
#define SERIAL_PORT_IDENTIFIER_COUNT 3
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
Loading…
Reference in New Issue