mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Don't allow MSP_REBOOT and MSP_SET_4WAY_IF to execute when ARMed
This commit is contained in:
parent
ed7f767a16
commit
37022dcd23
1 changed files with 12 additions and 8 deletions
|
@ -1074,20 +1074,24 @@ static bool mspFcProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProcessFn
|
|||
break;
|
||||
|
||||
case MSP_REBOOT:
|
||||
if (mspPostProcessFn) {
|
||||
*mspPostProcessFn = mspRebootFn;
|
||||
if (!ARMING_FLAG(ARMED)) {
|
||||
if (mspPostProcessFn) {
|
||||
*mspPostProcessFn = mspRebootFn;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
#ifdef USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
case MSP_SET_4WAY_IF:
|
||||
// get channel number
|
||||
// switch all motor lines HI
|
||||
// reply with the count of ESC found
|
||||
sbufWriteU8(dst, esc4wayInit());
|
||||
if (mspPostProcessFn) {
|
||||
*mspPostProcessFn = msp4WayIfFn;
|
||||
if (!ARMING_FLAG(ARMED)) {
|
||||
// get channel number
|
||||
// switch all motor lines HI
|
||||
// reply with the count of ESC found
|
||||
sbufWriteU8(dst, esc4wayInit());
|
||||
if (mspPostProcessFn) {
|
||||
*mspPostProcessFn = msp4WayIfFn;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue