1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Merge pull request #8680 from hydra/bf-msp-external-flash-capability

Allow MSP clients to know if the target has a flash bootloer.
This commit is contained in:
Dominic Clifton 2019-08-09 12:41:24 +02:00 committed by GitHub
commit 7a26a47d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -515,6 +515,7 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
#define TARGET_HAS_VCP_BIT 0 #define TARGET_HAS_VCP_BIT 0
#define TARGET_HAS_SOFTSERIAL_BIT 1 #define TARGET_HAS_SOFTSERIAL_BIT 1
#define TARGET_IS_UNIFIED_BIT 2 #define TARGET_IS_UNIFIED_BIT 2
#define TARGET_HAS_FLASH_BOOTLOADER_BIT 3
uint8_t targetCapabilities = 0; uint8_t targetCapabilities = 0;
#ifdef USE_VCP #ifdef USE_VCP
@ -526,7 +527,9 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
#if defined(USE_UNIFIED_TARGET) #if defined(USE_UNIFIED_TARGET)
targetCapabilities |= 1 << TARGET_IS_UNIFIED_BIT; targetCapabilities |= 1 << TARGET_IS_UNIFIED_BIT;
#endif #endif
#if defined(USE_FLASH_BOOT_LOADER)
targetCapabilities |= 1 << TARGET_HAS_FLASH_BOOTLOADER_BIT;
#endif
sbufWriteU8(dst, targetCapabilities); sbufWriteU8(dst, targetCapabilities);
// Target name with explicit length // Target name with explicit length