Drivetrain Help

So I took some code from our last robot that worked on that robot


and I put it in our new robot, and it is opposite, it thinks the back of the robot is the front of it. I was wondering if anyone could help, thank you so much.

Please post a link to your code. Those two lines do not provide anywhere near enough information.

if you are using talon srx as your motor controller, you can set them to run the other way by using “setinverted(true/false)”. I advise that you have this for all motors to make sure you know the state of all the motors. My team likes to do “safe programming” where we always set the settings of the controller so we know exactly where we start.

we are using bursheless neos and coding timed based java, here is a github link.

we are using Burshelss neos

There should be the similar setting for sparkMax. I would check their documentation for that, not too familiar with it.

there is such a things as setinverted, just to be clear, I would write, left.setinverted(true);