Added flag for unified target to MSP.
This commit is contained in:
parent
0af5c29e8f
commit
ddf76beb55
|
@ -491,17 +491,23 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
||||||
#else
|
#else
|
||||||
sbufWriteU8(dst, 0); // 0 == FC
|
sbufWriteU8(dst, 0); // 0 == FC
|
||||||
#endif
|
#endif
|
||||||
// Board communication capabilities (uint8)
|
// Target capabilities (uint8)
|
||||||
// Bit 0: 1 iff the board has VCP
|
#define TARGET_HAS_VCP_BIT 0
|
||||||
// Bit 1: 1 iff the board supports software serial
|
#define TARGET_HAS_SOFTSERIAL_BIT 1
|
||||||
uint8_t commCapabilities = 0;
|
#define TARGET_IS_UNIFIED_BIT 2
|
||||||
|
|
||||||
|
uint8_t targetCapabilities = 0;
|
||||||
#ifdef USE_VCP
|
#ifdef USE_VCP
|
||||||
commCapabilities |= 1 << 0;
|
targetCapabilities |= 1 << TARGET_HAS_VCP_BIT;
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_SOFTSERIAL1) || defined(USE_SOFTSERIAL2)
|
#if defined(USE_SOFTSERIAL1) || defined(USE_SOFTSERIAL2)
|
||||||
commCapabilities |= 1 << 1;
|
targetCapabilities |= 1 << TARGET_HAS_SOFTSERIAL_BIT;
|
||||||
#endif
|
#endif
|
||||||
sbufWriteU8(dst, commCapabilities);
|
#if defined(USE_UNIFIED_TARGET)
|
||||||
|
targetCapabilities |= 1 << TARGET_IS_UNIFIED_BIT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sbufWriteU8(dst, targetCapabilities);
|
||||||
|
|
||||||
// Target name with explicit length
|
// Target name with explicit length
|
||||||
sbufWriteU8(dst, strlen(targetName));
|
sbufWriteU8(dst, strlen(targetName));
|
||||||
|
|
Loading…
Reference in New Issue