Spark Max Motor Controller Group Help!

    private CANSparkMax driveRightMotor1 = new CANSparkMax(DriveConstants.kRightMotorFront, MotorType.kBrushed);
    private CANSparkMax driveRightMotor2 = new CANSparkMax(DriveConstants.kRightMotorRear, MotorType.kBrushed);
    private CANSparkMax driveLeftMotor1 = new CANSparkMax(DriveConstants.kLeftMotorFront, MotorType.kBrushed);
    private CANSparkMax driveLeftMotor2 = new CANSparkMax(DriveConstants.kLeftMotorRear, MotorType.kBrushed);

How can i create a motor controller group for CANSparkMax.

Thanks for your help!

Here is the link to the WPILib javadoc for “MotorControllerGroup”

MotorControllerGroup (WPILib API 2024.2.1)

However, CANSparkMax’s have a .follow() ability which is largely the same to groups. Read this thread for more info: SpeedControllerGroup vs .follow on CAN motor controllers - Technical - Chief Delphi