1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 07:15:18 +03:00

Merge pull request #8722 from jflyper/bfdev-isolate-msp-from-pwm_output

Isolate MSP_MOTOR from pwm_output (pwmGetMotors)
This commit is contained in:
jflyper 2019-08-17 11:19:20 +09:00 committed by GitHub
commit f1cd99e6b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 2 deletions

View file

@ -962,8 +962,8 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
case MSP_MOTOR:
for (unsigned i = 0; i < 8; i++) {
#ifdef USE_PWM_OUTPUT
if (i >= MAX_SUPPORTED_MOTORS || !pwmGetMotors()[i].enabled) {
#ifdef USE_MOTOR
if (i >= MAX_SUPPORTED_MOTORS || !motorIsMotorEnabled(i)) {
sbufWriteU16(dst, 0);
continue;
}