Reconfigure motor sensor between auto and teleop

This commit is contained in:
Aarav Shah
2020-02-13 17:34:59 -07:00
parent a280554054
commit a5bdb28d37
3 changed files with 19 additions and 2 deletions
@@ -9,6 +9,7 @@ package frc4388.robot;
import java.util.List;
import com.ctre.phoenix.motorcontrol.FeedbackDevice;
import com.ctre.phoenix.motorcontrol.NeutralMode;
import edu.wpi.first.wpilibj.Joystick;
@@ -156,6 +157,10 @@ public class RobotContainer {
m_robotDrive.setDriveTrainNeutralMode(mode);
}
public void configDriveTrainSensors(FeedbackDevice type) {
m_robotDrive.configMotorSensor(type);
}
public void resetOdometry() {
m_robotDrive.resetGyroAngles();
m_robotDrive.setOdometry(new Pose2d());