Skip to content

MAVLink: speed up mavlink processing when disarmed #26024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Jan 18, 2024

This makes AP_Periph firmware load over MAVCAN about 3x faster on plane (with SCHED_LOOP_RATE=50)
It should make other MAVLink processing faster too

@peterbarker
Copy link
Contributor

  • calling notify update more often, not called out in comments...
  • does this annoy the EKF when we're downloading logs now? Could be using a chunk more CPU.

@tridge tridge removed the WIP label Jan 18, 2024
@tridge
Copy link
Contributor Author

tridge commented Jan 18, 2024

calling notify update more often, not called out in comments...

i've fixed it to not change notify rate

does this annoy the EKF when we're downloading logs now? Could be using a chunk more CPU.

it hasn't shown any issues in my testing, likely as we only do this when waiting for IMU sample in main thread (so EKF code is not running)

set_high_priority();
_priority_boosted = true;
_called_boost = true;
}
if (main_thread && !hal.util->get_soft_armed() && usec >= 500) {
const uint32_t start_us = AP_HAL::micros();
call_delay_cb();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the assumption is that this call takes less than 500us? If it does then we spend the time doing something useful rather than sleeping. Why not do the same when armed? Just because we might overrun that 500us?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants