Skip to content

Commit

Permalink
updated trainer PPM timer disabling capture interrupt flag order to m…
Browse files Browse the repository at this point in the history
…atch PPM out,

removed comment
  • Loading branch information
ajjjjjjjj committed Jan 20, 2025
1 parent 5466309 commit a919688
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion radio/src/pulses/pulses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void stopPulsesInternalModule()
{
if (moduleState[INTERNAL_MODULE].protocol != PROTOCOL_CHANNELS_UNINITIALIZED) {
mixerSchedulerSetPeriod(INTERNAL_MODULE, 0);
intmoduleStop(); // was disable_afhds2a(INTERNAL_MODULE);
intmoduleStop();
moduleState[INTERNAL_MODULE].protocol = PROTOCOL_CHANNELS_NONE;
}
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/flysky/trainer_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void init_trainer_capture() {
void stop_trainer_capture()
{
// disable PPM input capture
CLEAR_BIT(EXTMODULE_TIMER->CCER, TIM_CCER_CC1E);
CLEAR_BIT(EXTMODULE_TIMER->DIER, TIM_DIER_CC1IE);
CLEAR_BIT(EXTMODULE_TIMER->CCER, TIM_CCER_CC1E);

// Keep timer running because PPM OUT uses the same timer
// NVIC_DisableIRQ(EXTMODULE_TIMER_IRQn);
Expand Down

0 comments on commit a919688

Please sign in to comment.