1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Add and handle USE_PWM_OUTPUT

This commit is contained in:
jflyper 2018-10-09 00:30:31 +09:00
parent de1c1d5377
commit 45b7fa8095
7 changed files with 37 additions and 5 deletions

View file

@ -935,13 +935,18 @@ 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) {
sbufWriteU16(dst, 0);
continue;
}
sbufWriteU16(dst, convertMotorToExternal(motor[i]));
#else
sbufWriteU16(dst, 0);
#endif
}
break;
case MSP_RC: