Pre aouton problems

I dont know why but my pre aotunomus period is working.
Its supposed to clear my sensorvalues but doesnt work, when i check in the Debugger window the values are still really high. since they dont change i know its not doing its job.

heres the pre aouton code

void pre_auton()
{
SensorValue[RightWheels] = 0;
SensorValue[LeftWheels] = 0;
}

this bit is straight off sample code so i dont know why it doesn’t work, or maybe that’s why. I have been told that some of the sample codes don"t work at Worlds by the guy who wrote some of those specific ones.:smiley:

Are these encoders? Are they IMEs?

pre_auton only runs once for each power cycle and not every time you run autonomous. Perhaps post all the code so we can see what you are trying to do.

Have you tried adding a stop point so the program get’s interrupted when it executes the lines so you can make sure it reaches the code?