Inconsistent Code Behavior following code restart.

While testing new code, designed to handle controlling a swerve drive robot, I ran into an issue that I haven’t seen before, and would like to know if anyone else has, or has any suggestions on what to do.

Upon deploying the code, it functions mostly fine, there are some issues, but those are expected given the code hasn’t been tested at all. The key things that work in this state are that one joystick functions to drive the wheels when it is pushed away from the center, and the second joystick speeds up one side of wheels and slows down the other to turn, as long as left joystick is past the programmed in dead band in the center. The real issue starts when the code is restarted. Whether the restart occurs due to a power cycle of the robot, or just clicking “Restart robot code” in the driver station, after that happens the left joystick doesn’t control the wheels. It still needs to be out of the dead band, and then the turning joystick control of the wheels works. Redeploying restores the initial behavior.

I have never seen an issue like this before, and am looking for any help. I have scped frcUserProgram to my machine before and after restarting the code, to run a diff on them to check for differences, but none were found, and the last edited time-stamp was the same on the RIO. If it matters, the code was written in the 2019 alpha dev-environment, and is found here.

Well, I solved my issue. I had an uninitialized bool that was causing the issue. Was false on deploy starts, and true otherwise. Sorry to bother you all with this.