Merge pull request #7542 from mikeller/add_mcu_type_msp
Added the MCU type to MSP.
This commit is contained in:
commit
3672bead17
|
@ -5012,7 +5012,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
|
||||
if (dumpMask & DUMP_ALL) {
|
||||
cliMcuId(NULL);
|
||||
#if defined(USE_BOARD_INFO) && defined(USE_SIGNATURE)
|
||||
#if defined(USE_SIGNATURE)
|
||||
cliSignature("");
|
||||
#endif
|
||||
}
|
||||
|
@ -5342,7 +5342,7 @@ const clicmd_t cmdTable[] = {
|
|||
CLI_COMMAND_DEF("servo", "configure servos", NULL, cliServo),
|
||||
#endif
|
||||
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),
|
||||
#endif
|
||||
#ifdef USE_SERVOS
|
||||
|
|
|
@ -515,12 +515,21 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
value = getManufacturerId();
|
||||
sbufWriteU8(dst, strlen(value));
|
||||
sbufWriteString(dst, value);
|
||||
#else
|
||||
sbufWriteU8(dst, 0);
|
||||
sbufWriteU8(dst, 0);
|
||||
#endif
|
||||
|
||||
#if defined(USE_SIGNATURE)
|
||||
// Signature
|
||||
sbufWriteData(dst, getSignature(), SIGNATURE_LENGTH);
|
||||
#else
|
||||
uint8_t emptySignature[SIGNATURE_LENGTH];
|
||||
memset(emptySignature, 0, sizeof(emptySignature));
|
||||
sbufWriteData(dst, &emptySignature, sizeof(emptySignature));
|
||||
#endif
|
||||
#endif // USE_BOARD_INFO
|
||||
|
||||
sbufWriteU8(dst, MCU_TYPE_ID);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -265,3 +265,7 @@
|
|||
#ifndef USE_DSHOT_TELEMETRY
|
||||
#undef USE_RPM_FILTER
|
||||
#endif
|
||||
|
||||
#if !defined(USE_BOARD_INFO)
|
||||
#undef USE_SIGNATURE
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue