Data structs ready ...

This commit is contained in:
Bertrand Songis
2019-02-04 16:26:44 +01:00
parent 0a0cc962d5
commit 274543a57f
24 changed files with 277 additions and 155 deletions
+2 -2
View File
@@ -98,8 +98,8 @@ void stop_trainer_capture()
void trainerSendNextFrame()
{
TRAINER_TIMER->CCR4 = GET_PPM_DELAY(TRAINER_MODULE)*2;
TRAINER_TIMER->CCER = TIM_CCER_CC4E | (GET_PPM_POLARITY(TRAINER_MODULE) ? 0 : TIM_CCER_CC4P);
TRAINER_TIMER->CCR4 = GET_TRAINER_PPM_DELAY() * 2;
TRAINER_TIMER->CCER = TIM_CCER_CC4E | (GET_TRAINER_PPM_POLARITY() ? 0 : TIM_CCER_CC4P);
TRAINER_TIMER->CCR1 = *(trainerPulsesData.ppm.ptr - 1) - 4000; // 2mS in advance
TRAINER_DMA_STREAM->CR &= ~DMA_SxCR_EN; // Disable DMA