Rotation sensor reset function no being called

I’m having issues with my c++ code in VScode. I’m using a rotation sensor to measure the angle of a shaft on my robot. I have the resetPosition() function in the int main. I have tried putting it in the driver control loop and the autonomous loop and it doesn’t get called in either. I know this because i have a print function in there that prints the value of the sensor to the brain and every time I start the program the sensor is still outputting 306.83. Here is a picture for my reset function
Screen Shot 2023-12-12 at 7.20.17 AM
I am wondering why the function doesn’t get called. Thanks.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.