Code is in this repository under the spark-motor
branch. The issue is that the motors, even if inverted, always spin clockwise. I’ve talked with some people on the unofficial FRC discord, and they suggested that I try inverting them using the .setInvert() method. Adding a print to print the values showed that they I’ve also checked the wiring, and that’s good. Is there something with my code that I’m not seeing?
Diagram to show what I’m talking about with the actual drive train.
If you were reporting a condition with 3-of-4 wheels going the expected direction, one wheel ‘backwards’, then it would be most effective to call .setInverted(true) for that one controller.
As it is you instead seem to have an state where both right wheels are inverted pre-programming (your electrical isn’t ‘wrong’ if they view this as intentional), and then the default state of DifferentialDrive is un-inverting them. Within DifferentialDrive the private variable rightSideInvertedMultiplier is normally -1, but in your case you can reverse it with a call to drive.setRightSideInverted(false); (to use 1 as a multiplier, affecting everything in your Rgroup equally).
Thanks for the reply, we did some trouble shooting and it turned out some issues with the configuration of the Spark Max were present due to me incorrectly configuring it (gave it the wrong can id).