PPM trainer output: update delay on each cycle
This commit is contained in:
committed by
Raphael Coeffic
parent
2254d04643
commit
f881d7e11c
@@ -183,6 +183,7 @@ static const stm32_pulse_timer_t trainerOutputTimer = {
|
||||
static void trainerSendNextFrame()
|
||||
{
|
||||
stm32_pulse_set_polarity(&trainerOutputTimer, GET_TRAINER_PPM_POLARITY());
|
||||
stm32_pulse_set_cmp_val(&trainerOutputTimer, GET_TRAINER_PPM_DELAY() * 2);
|
||||
|
||||
// load the first period: next reload when CC compare event triggers
|
||||
trainerPulsesData.ppm.ptr = trainerPulsesData.ppm.pulses;
|
||||
|
||||
Reference in New Issue
Block a user