Merge pull request #5185 from etracer65/arming_disabled_msp_disarm

Disarm when configurator sets ARMING_DISABLED_MSP arming disabled flag
This commit is contained in:
Michael Keller 2018-02-15 01:41:19 +13:00 committed by GitHub
commit 9da7416c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1779,6 +1779,9 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
const uint8_t command = sbufReadU8(src); const uint8_t command = sbufReadU8(src);
if (command) { if (command) {
setArmingDisabled(ARMING_DISABLED_MSP); setArmingDisabled(ARMING_DISABLED_MSP);
if (ARMING_FLAG(ARMED)) {
disarm();
}
} else { } else {
unsetArmingDisabled(ARMING_DISABLED_MSP); unsetArmingDisabled(ARMING_DISABLED_MSP);
} }