Hi, I’m getting an error, in my Differential Drive Subsystem, on the lines …
SpeedControllerGroup m_Right = new SpeedControllerGroup( RightFrontMotor,
RightBackMotor);
&
SpeedControllerGroup m_Right = new SpeedControllerGroup( LeftFrontMotor,
LeftBackMotor);
It says “The constructor SpeedControllerGroup(VictorSPX, VictorSPX) is undefined” and I can not for the life of me figure out why. Below I have Copy and Pasted the majority of my Differential Drive Subsystem. I would really appreciate any help thank you.
import com.ctre.phoenix.motorcontrol.can.VictorSPX;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.SpeedControllerGroup;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import frc.robot.commands.DriveTrainCom;
/**
- Add your docs here.
*/
public class DriveTrainSub extends Subsystem {
// Put methods for controlling this subsystem
// here. Call these from Commands.
VictorSPX RightFrontMotor,RightBackMotor, LeftFrontMotor,LeftBackMotor;
DifferentialDrive m_drive;
public DriveTrainSub() {
RightFrontMotor = new VictorSPX(4);
RightBackMotor = new VictorSPX(1);
LeftFrontMotor = new VictorSPX(2);
LeftBackMotor = new VictorSPX(3);
SpeedControllerGroup m_Right = new SpeedControllerGroup(RightFrontMotor, RightBackMotor);
** SpeedControllerGroup m_Left = new SpeedControllerGroup(LeftFrontMotor, LeftBackMotor);**
DifferentialDrive m_drive = new DifferentialDrive(m_Right, m_Left);
}