mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge pull request #8825 from jflyper/bfdev-fix-MOTOR_MSP-hard-fault-with-no-motors
Provide isMotorEnabled function for motorNullDevice
This commit is contained in:
commit
1298d3d4c9
2 changed files with 9 additions and 1 deletions
|
@ -991,7 +991,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
case MSP_MOTOR:
|
||||
for (unsigned i = 0; i < 8; i++) {
|
||||
#ifdef USE_MOTOR
|
||||
if (i >= MAX_SUPPORTED_MOTORS || !motorIsMotorEnabled(i)) {
|
||||
if (!motorIsEnabled() || i >= MAX_SUPPORTED_MOTORS || !motorIsMotorEnabled(i)) {
|
||||
sbufWriteU16(dst, 0);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue