So today we finally reimaged our cRIO to the latest v47 Java image and got a chance to compile our code.
Originally our code had two classes, one being the usual main class that all teams would be using to control their robots and the other being a custom DriveTrain class our lead programmer wrote to handle our Mecanum Drive.
When we tested our code 3 of the 4 jags were not initialized. The 4th jag that was initialized would not give input to the motor it was connected to. In troubleshooting we found that only the port on the Digital Sidecar that the 4th jag seemed to be initializing its respect jaguar. We tested all of our jags on that port and they all got initialized, but still would not take input. At that point, we swapped sidecars and the same issue still popped up.
Then we figured that it must have been something in the code. We implemented the same algorithms in the custom DriveTrain class in a single class and somehow everything seemed to work as it should. The thing that bugs me about all this is that one port on the Digital Sidecar was working with the multiple classes and I have absolutely no idea why that would be the case.
Any ideas on why that may have been the case? Is there something about how FRC Java supports classes that I’m missing here?