mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Merge pull request #7542 from mikeller/add_mcu_type_msp
Added the MCU type to MSP.
This commit is contained in:
commit
3672bead17
3 changed files with 16 additions and 3 deletions
|
@ -5012,7 +5012,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
||||||
|
|
||||||
if (dumpMask & DUMP_ALL) {
|
if (dumpMask & DUMP_ALL) {
|
||||||
cliMcuId(NULL);
|
cliMcuId(NULL);
|
||||||
#if defined(USE_BOARD_INFO) && defined(USE_SIGNATURE)
|
#if defined(USE_SIGNATURE)
|
||||||
cliSignature("");
|
cliSignature("");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -5342,7 +5342,7 @@ const clicmd_t cmdTable[] = {
|
||||||
CLI_COMMAND_DEF("servo", "configure servos", NULL, cliServo),
|
CLI_COMMAND_DEF("servo", "configure servos", NULL, cliServo),
|
||||||
#endif
|
#endif
|
||||||
CLI_COMMAND_DEF("set", "change setting", "[<name>=<value>]", cliSet),
|
CLI_COMMAND_DEF("set", "change setting", "[<name>=<value>]", cliSet),
|
||||||
#if defined(USE_BOARD_INFO) && defined(USE_SIGNATURE)
|
#if defined(USE_SIGNATURE)
|
||||||
CLI_COMMAND_DEF("signature", "get / set the board type signature", "[signature]", cliSignature),
|
CLI_COMMAND_DEF("signature", "get / set the board type signature", "[signature]", cliSignature),
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_SERVOS
|
#ifdef USE_SERVOS
|
||||||
|
|
|
@ -515,12 +515,21 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
||||||
value = getManufacturerId();
|
value = getManufacturerId();
|
||||||
sbufWriteU8(dst, strlen(value));
|
sbufWriteU8(dst, strlen(value));
|
||||||
sbufWriteString(dst, value);
|
sbufWriteString(dst, value);
|
||||||
|
#else
|
||||||
|
sbufWriteU8(dst, 0);
|
||||||
|
sbufWriteU8(dst, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SIGNATURE)
|
#if defined(USE_SIGNATURE)
|
||||||
// Signature
|
// Signature
|
||||||
sbufWriteData(dst, getSignature(), SIGNATURE_LENGTH);
|
sbufWriteData(dst, getSignature(), SIGNATURE_LENGTH);
|
||||||
|
#else
|
||||||
|
uint8_t emptySignature[SIGNATURE_LENGTH];
|
||||||
|
memset(emptySignature, 0, sizeof(emptySignature));
|
||||||
|
sbufWriteData(dst, &emptySignature, sizeof(emptySignature));
|
||||||
#endif
|
#endif
|
||||||
#endif // USE_BOARD_INFO
|
|
||||||
|
sbufWriteU8(dst, MCU_TYPE_ID);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,3 +265,7 @@
|
||||||
#ifndef USE_DSHOT_TELEMETRY
|
#ifndef USE_DSHOT_TELEMETRY
|
||||||
#undef USE_RPM_FILTER
|
#undef USE_RPM_FILTER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(USE_BOARD_INFO)
|
||||||
|
#undef USE_SIGNATURE
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue