xioTechnologies/Fusion

FusionOffsetInitialise() never uses user defined gyroscopeOffset.

Closed this issue · 3 comments

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

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

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

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.