-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Dynamic FIFO Buffering #27841
Open
andyp1per
wants to merge
6
commits into
ArduPilot:master
Choose a base branch
from
andyp1per:pr-primary-gyrp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dynamic FIFO Buffering #27841
+174
−23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IamPete1
reviewed
Aug 15, 2024
andyp1per
force-pushed
the
pr-primary-gyrp
branch
from
August 15, 2024 15:54
4c7d9e3
to
1ce9d84
Compare
Closing because I can live without changing the SPI delay and needs restructuring to fix the layering |
andyp1per
force-pushed
the
pr-primary-gyrp
branch
from
September 5, 2024 14:47
1ce9d84
to
d817f14
Compare
"Not a hard no"... need to be careful precursor for poking the primary sensor into the library, rather than fetching from AP_AHRS would be good |
peterbarker
reviewed
Sep 12, 2024
andyp1per
force-pushed
the
pr-primary-gyrp
branch
2 times, most recently
from
September 16, 2024 10:57
eda3cb6
to
b530458
Compare
add callbacks for when gyrp/accel primary changes
andyp1per
force-pushed
the
pr-primary-gyrp
branch
from
September 19, 2024 13:59
66eea5e
to
7bacefb
Compare
…ding on primary configure dynamic fifo rates based on primary gyro instance add set_primary_gyro() and set_primary_accel() adjust FIFO buffer sizes
…sable for scripting
…r allocation and copying
andyp1per
force-pushed
the
pr-primary-gyrp
branch
from
September 19, 2024 14:28
7bacefb
to
a56660e
Compare
Flown on my 5". This really works very well indeed! Giving the fast rate loop extra CPU cycles results in even smoother flying - it was amazing! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split out from #27029
This normalizes the usage of the "primary" gyro in the IMU drivers and gives an opportunity to take action when it changes. We were doing this before with random calls into the AHRS, but really the IMU needs to know this information. This makes it possible to take specific required action in future PRs.
I've turned this into a demo of what this can be used for, most notably to slow down FIFO read rates on non-primary gyros.
On a CubeOrange+ with
INS_GYRO_RATE=2
(4KHz):Before:
After:
The saving is not as great as you might expect, probably down to SPI overhead which can't be avoided but still substantial.
On my fast rate copter with 2x ICM42688 running at 16Mhz or so I get:
Before:
After:
Which is the difference between on the edge and comfortable
With @bugobliterator 's SPI PR #28093 I get further benefit: