-
Notifications
You must be signed in to change notification settings - Fork 13.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
sensors: filter sample rate calculate with simple interval average instead of perf count #14098
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the hard periodic reset.
Have you verified that this solves the decreasing sampling rate issue?
src/modules/sensors/vehicle_acceleration/VehicleAcceleration.cpp
Outdated
Show resolved
Hide resolved
7c08b05
to
da1489a
Compare
…stead of perf count
da1489a
to
46aca39
Compare
Codecov Report
@@ Coverage Diff @@
## master #14098 +/- ##
===========================================
- Coverage 53.72% 36.18% -17.54%
===========================================
Files 606 546 -60
Lines 51218 46843 -4375
===========================================
- Hits 27517 16952 -10565
- Misses 23701 29891 +6190
|
I'd like to run it overnight again, but so far I don't see it decreasing over time (rarely changing at all past boot). |
All right, let's see |
On fmu-v3 there were a few resets over several hours (down ~ 10 Hz, then back up), but if anything I'm surprised it's not more erratic given how overloaded that board is at the moment (many sensors on the same bus, very high cpu load) combined with the questionable sensor oversampling. On fmu-v5 it only changed once at boot. |
The perf counter intervals aren't numerically stable over extended periods (#14046), so are obviously not ideal for automatically setting filter sample rates. Here's a simpler solution.