[prosv5]Can you publish a copy of the source code of the gyro class?

I want to rewrite a GYRO class. But I have no idea. Can you open the source code of a GYRO class with PROS?
This is my GYRO library that mimics PROS COTEX, but it’s wrong because I didn’t write initialization calculations.

It’s a bit more difficult to do this with the V5, the gyro integration is done in the firmware, specifically in the firmware for the micro controller that supervises the legacy ports. So PROS gets the value of the gyro from vexos and passes it through, not much more. You could set the legacy port as an analog input and attempt integration yourself, but you will only get a new sample at best every 10mS, that’s probably not fast enough.

It’s too imprecise to get the GYRO value of OS directly. Can you tell me how to initialize it in the constructor?

Can you elaborate? You’ll just use the [

](https://pros.cs.purdue.edu/v5/api/cpp/adi.html#pros-adigyro) class instead of 


i want to know loopTime of ADI GYRO.
Then I plan to fuse GYRO and ENCODER’s angle values.
Or I spend more time initializing, recording the gyroscope’s drift law in the forbidden state, subtracting the drift law every iteration.
The current version may have too short initialization time. The self-increasing drift of gyroscope is not fixed after each initialization, which makes the program difficult to write.
The advantage is that I can prevent the gyroscope from drifting.

I wrote an odometer.The requirement of accuracy is very high.

prosv5 gyro value is 0-360
In my architecture, I recalculated the angle of change for each LOOP.

If the robot makes a circle, the integral value will change to a maximum of 360.

How to solve this problem?

In practice, I input 180 degrees. The robot will keep turning around.
What if you don’t want to use gyro. reset ()?