mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
defualt command and soft limits
This commit is contained in:
@@ -13,6 +13,7 @@ import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import frc4388.robot.Constants.*;
|
||||
import frc4388.robot.subsystems.Arm;
|
||||
import frc4388.robot.subsystems.LED;
|
||||
import frc4388.robot.subsystems.SwerveDrive;
|
||||
import frc4388.utility.LEDPatterns;
|
||||
@@ -33,7 +34,9 @@ public class RobotContainer {
|
||||
|
||||
/* Subsystems */
|
||||
private final SwerveDrive m_robotSwerveDrive = new SwerveDrive(m_robotMap.leftFront, m_robotMap.rightFront, m_robotMap.leftBack, m_robotMap.rightBack, m_robotMap.gyro);
|
||||
private final Arm m_robotArm = new Arm(m_robotMap.pivot, m_robotMap.tele);
|
||||
private final LED m_robotLED = new LED(m_robotMap.LEDController);
|
||||
|
||||
|
||||
|
||||
/* Controllers */
|
||||
@@ -58,6 +61,11 @@ public class RobotContainer {
|
||||
getDriverController().getLeftYAxis(),
|
||||
-getDriverController().getRightXAxis(), false), m_robotSwerveDrive)
|
||||
);
|
||||
|
||||
m_robotArm.setDefaultCommand(new RunCommand(() -> m_robotArm.runPivotAndTele(
|
||||
getOperatorController().getLeftYAxis(),
|
||||
getOperatorController().getLeftXAxis()), m_robotArm)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user