How to code motor controllers to each side in code

we are moving over to controller this year for our robot drive but i haven’t been able to find out how to cod ethe motors to each side of the drive we are open to changing the code below if its easier a different way

we are using a can bus and below is the code we have to drive it

final CANSparkMax m_leftMotor = new CANSparkMax(Constants.kLeftMotorPort);

final CANSparkMax m_rightMotor = new CANSparkMax(Constants.kRightMotorPort);

final DifferentialDrive m_robotDrive = new DifferentialDrive(m_leftMotor, m_rightMotor);

final GenericHID m_stick = new GenericHID(Constants.kJoystickPort);

By this do you mean making it so one side drives reversed of the other?

Also, I just noticed that you are not passing the motor type in your CANSparkMax contructor, that may also be causing a problem.