Inertial sensor calibration at start of driver mode (not at program start)

We are using an inertial sensor for our drivetrain. Our problem is that the inertial sensor does calibration at the start of each driver mode section instead of at the program startup / initialize (and makes our robot pause for the first two seconds of each driver portion of the match). This seems to be a problem with the blocks version of programming, as there is no drivetrain calibration command available.

If I create a program without a “when driver control” event, the inertial sensor will do calibration as soon as the program is started.

Is this a bug in the blocks programming option?

Hey @Dowd I’m from the VEXcode dev team. Looks like this is a codegen issue on our end when generating the driver code in blocks. We have a VEXcode V5 release planned for this Friday which will address this issue.

For now if you need a quick fix until then, what you can do is convert the project to C++ or Python and move the calibration code from the Driver control function to the main function. In C++ it would just be moving the calibrateDrivetrain(); function call to the first line of the main() function.

If you need a quick overview on how to convert to text here’s the KB article for converting with V5 https://kb.vex.com/hc/en-us/articles/360044971772-Converting-a-Blocks-Project-to-Text-in-VEXcode-V5

Thanks for catching this!

Tyler

5 Likes

Thank you much for the quick response!

1 Like