-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Log the standard deviation of gyro cycle time in SCHEDULER_DETERMINISM and TIMING_ACCURACY #13377
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
Log the standard deviation of gyro cycle time in SCHEDULER_DETERMINISM and TIMING_ACCURACY #13377
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
Should these extra computations be encapsulated in an |
I thought about this and thought we should be logging real behaviour; ie enabling/disabling logging should have minimal impact on performance. Having thought about it some more the impact of logging here is worst case, so safe to exclude. I agree with your comment. |
e630dcc
to
b6834de
Compare
Add feedback applied and pushed afresh |
…M and TIMING_ACCURACY
b6834de
to
1e2e3db
Compare
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 really good now. Found two double assignments to the float variable. I'm a pain in the rear, I know :)
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
The SCHEDULER_DETERMINISM and TIMING_ACCURACY debug modes focus on task lateness. This PR adds a measure of the impact on the gyro loop timing by reporting the standard deviation in 100ths of a us in debug[7].
This log was taken from a ZEEZF7V3 and shows how, with USB connected at the start and end of the log, this figure was about 2us, however with USB disconnected (between 5 and 10 seconds in the log), the figure was about 30ns!
ZEEZF7V3_STDDEV.bbl.zip
@KarateBrot Please check the maths