1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Add extra MSP message to get outputs with timer ids

Timer ids are needed to correctly replicate pwm allocation logic in the configurator
This commit is contained in:
Marcelo Bezerra 2023-08-30 23:59:38 +02:00
parent cada1cca14
commit 0d16352fb8
4 changed files with 27 additions and 2 deletions

View file

@ -1516,6 +1516,14 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
}
break;
case MSP2_INAV_OUTPUT_MAPPING_EXT:
for (uint8_t i = 0; i < timerHardwareCount; ++i)
if (!(timerHardware[i].usageFlags & (TIM_USE_PPM | TIM_USE_PWM))) {
sbufWriteU8(dst, timer2id(timerHardware[i].tim));
sbufWriteU8(dst, timerHardware[i].usageFlags);
}
break;
case MSP2_INAV_MC_BRAKING:
#ifdef USE_MR_BRAKING_MODE
sbufWriteU16(dst, navConfig()->mc.braking_speed_threshold);