AP_HAL_ChibiOS: add comments to force_push on rcout

This commit is contained in:
Andy Piper 2024-10-25 19:21:31 +09:00 committed by Andrew Tridgell
parent 398a70ec4b
commit 8fc4a6a6e9
2 changed files with 4 additions and 1 deletions

View File

@ -1399,6 +1399,9 @@ void RCOutput::trigger_groups()
#if !defined(HAL_NO_RCOUT_THREAD) || HAL_DSHOT_ENABLED
// trigger a PWM send
if (!in_soft_serial() &&
// we always trigger an output if we are in the main thread
// we also always trigger an output if we are in the rate thread and thus
// force_trigger has been set
(hal.scheduler->in_main_thread() || force_trigger) && rcout_thread_ctx) {
chEvtSignal(rcout_thread_ctx, EVT_PWM_SEND);
}

View File

@ -584,7 +584,7 @@ private:
uint8_t _dshot_cycle;
// virtual timer for post-push() pulses
virtual_timer_t _dshot_rate_timer;
// force triggering of groups
// force triggering of groups, this is used by the rate thread to ensure output occurs
bool force_trigger;
#if HAL_DSHOT_ENABLED