Merge pull request #4320 from mikeller/add_disable_arming_msp_command
Added MSP command to disable arming.
This commit is contained in:
commit
ed29295d7a
|
@ -1705,6 +1705,17 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
case MSP_ARMING_DISABLE:
|
||||||
|
{
|
||||||
|
const uint8_t command = sbufReadU8(src);
|
||||||
|
if (command) {
|
||||||
|
setArmingDisabled(ARMING_DISABLED_MSP);
|
||||||
|
} else {
|
||||||
|
unsetArmingDisabled(ARMING_DISABLED_MSP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
#ifdef USE_FLASHFS
|
#ifdef USE_FLASHFS
|
||||||
case MSP_DATAFLASH_ERASE:
|
case MSP_DATAFLASH_ERASE:
|
||||||
flashfsEraseCompletely();
|
flashfsEraseCompletely();
|
||||||
|
|
|
@ -33,7 +33,7 @@ static uint32_t enabledSensors = 0;
|
||||||
const char *armingDisableFlagNames[]= {
|
const char *armingDisableFlagNames[]= {
|
||||||
"NOGYRO", "FAILSAFE", "RXLOSS", "BADRX", "BOXFAILSAFE",
|
"NOGYRO", "FAILSAFE", "RXLOSS", "BADRX", "BOXFAILSAFE",
|
||||||
"THROTTLE", "ANGLE", "BOOTGRACE", "NOPREARM", "ARMSWITCH",
|
"THROTTLE", "ANGLE", "BOOTGRACE", "NOPREARM", "ARMSWITCH",
|
||||||
"LOAD", "CALIB", "CLI", "CMS", "OSD", "BST"
|
"LOAD", "CALIB", "CLI", "CMS", "OSD", "BST", "MSP"
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,11 @@ typedef enum {
|
||||||
ARMING_DISABLED_CLI = (1 << 12),
|
ARMING_DISABLED_CLI = (1 << 12),
|
||||||
ARMING_DISABLED_CMS_MENU = (1 << 13),
|
ARMING_DISABLED_CMS_MENU = (1 << 13),
|
||||||
ARMING_DISABLED_OSD_MENU = (1 << 14),
|
ARMING_DISABLED_OSD_MENU = (1 << 14),
|
||||||
ARMING_DISABLED_BST = (1 << 15)
|
ARMING_DISABLED_BST = (1 << 15),
|
||||||
|
ARMING_DISABLED_MSP = (1 << 16)
|
||||||
} armingDisableFlags_e;
|
} armingDisableFlags_e;
|
||||||
|
|
||||||
#define NUM_ARMING_DISABLE_FLAGS 16
|
#define NUM_ARMING_DISABLE_FLAGS 17
|
||||||
|
|
||||||
#if defined(OSD) || !defined(MINIMAL_CLI)
|
#if defined(OSD) || !defined(MINIMAL_CLI)
|
||||||
extern const char *armingDisableFlagNames[NUM_ARMING_DISABLE_FLAGS];
|
extern const char *armingDisableFlagNames[NUM_ARMING_DISABLE_FLAGS];
|
||||||
|
|
|
@ -214,6 +214,8 @@
|
||||||
|
|
||||||
#define MSP_CAMERA_CONTROL 98
|
#define MSP_CAMERA_CONTROL 98
|
||||||
|
|
||||||
|
#define MSP_ARMING_DISABLE 99
|
||||||
|
|
||||||
//
|
//
|
||||||
// OSD specific
|
// OSD specific
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue