Skip to content
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

FusionOffsetInitialise() never uses user defined gyroscopeOffset. #68

Closed
LazaroFilm opened this issue Feb 4, 2023 · 3 comments
Closed

Comments

@LazaroFilm
Copy link

LazaroFilm commented Feb 4, 2023

In my previous issue ticket, you noticed I had some drift in my gyro at startup and you had mentioned to use FusionOffsetInitialise() to solve it. It actually was already on, but there is an issue with that function. when called , Line 44 of FusionOffset.c zeroes out the gyroscopeOffset value I defined in my sketch. So the gyro always starts off calibration, then, after a couple of minutes it slowly drifts to the center.

Line 44:
offset->gyroscopeOffset = FUSION_VECTOR_ZERO;

On a side note, I would love to be able to access the updated values used by

@xioTechnologies
Copy link
Owner

Please provide a link to the previous ticket you are referring to, and to your code using Fusion.

@LazaroFilm
Copy link
Author

Previous ticket mentioned: #65
Here is the repo. It's still very much a work in progress. https://github.com/LazaroFilm/CyberLevel

@xioTechnologies
Copy link
Owner

My understanding is that you have defined the variable gyroscopeOffset on line 20 and you believe that line 44 will overwrite this variable with the assignment offset->gyroscopeOffset = FUSION_VECTOR_ZERO;. If this is the case then you are mistaken. gyroscopeOffset and offset->gyroscopeOffset are not the same variable.

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

No branches or pull requests

2 participants