base pilotable
This commit is contained in:
parent
1e857b14c3
commit
7cde9027c2
@ -4,11 +4,28 @@
|
||||
|
||||
package frc.robot.subsystems;
|
||||
|
||||
import com.revrobotics.CANSparkMax;
|
||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import frc.robot.Constants;
|
||||
|
||||
public class BasePilotable extends SubsystemBase {
|
||||
final CANSparkMax avantdroit = new CANSparkMax(Constants.avantdroit, MotorType.kBrushless);
|
||||
final CANSparkMax avantgauche = new CANSparkMax(Constants.avantgauche, MotorType.kBrushless);
|
||||
final CANSparkMax arrieredroit = new CANSparkMax(Constants.arrieredroit, MotorType.kBrushless);
|
||||
final CANSparkMax arrieregauche = new CANSparkMax(Constants.arrieregauche, MotorType.kBrushless);
|
||||
|
||||
final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit);
|
||||
final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche);
|
||||
|
||||
final DifferentialDrive drive = new DifferentialDrive(gauche, droit);
|
||||
|
||||
/** Creates a new BasePilotable. */
|
||||
public BasePilotable() {}
|
||||
public BasePilotable() {
|
||||
droit.setInverted(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void periodic() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user