mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 08:38:02 -06:00
sum change
This commit is contained in:
@@ -17,6 +17,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.ConditionalCommand;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import edu.wpi.first.wpilibj2.command.WaitCommand;
|
||||
@@ -160,7 +161,8 @@ public class RobotContainer {
|
||||
private SequentialCommandGroup placeConeHigh = new SequentialCommandGroup(
|
||||
new PivotCommand(m_robotArm, 178),
|
||||
new WaitCommand(0.3),
|
||||
new TeleCommand(m_robotArm, 56000)
|
||||
new TeleCommand(m_robotArm, 56000),
|
||||
new ParallelRaceGroup(new InstantCommand(() -> m_robotClaw.toggle()), new RunCommand(() -> m_robotClaw.outtake()))
|
||||
// toggleClaw.asProxy(),
|
||||
// armToHome.asProxy()
|
||||
);
|
||||
@@ -313,12 +315,12 @@ public class RobotContainer {
|
||||
|
||||
// outtake
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON) // final
|
||||
.whileTrue (new RunCommand(() -> m_robotClaw.reversespinnyspin()))
|
||||
.whileTrue (new RunCommand(() -> m_robotClaw.outtake()))
|
||||
.onFalse (new InstantCommand(() -> m_robotClaw.nospinnyspin()));
|
||||
|
||||
// intake
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON) // final
|
||||
.whileTrue (new RunCommand(() -> m_robotClaw.yesspinnyspin()))
|
||||
.whileTrue (new RunCommand(() -> m_robotClaw.intake()))
|
||||
.onFalse (new InstantCommand(() -> m_robotClaw.nospinnyspin()));
|
||||
|
||||
// arm to Home
|
||||
|
||||
@@ -40,6 +40,7 @@ public class RobotMap {
|
||||
configureLEDMotorControllers();
|
||||
configureDriveMotors();
|
||||
configArmMotors();
|
||||
configIntake();
|
||||
}
|
||||
|
||||
/* LED Subsystem */
|
||||
@@ -177,5 +178,10 @@ public class RobotMap {
|
||||
Servo leftClaw = new Servo(0);
|
||||
Servo rightClaw = new Servo(1);
|
||||
CANSparkMax spinnyspin = new CANSparkMax(18, MotorType.kBrushless);
|
||||
spinnyspin.setIdleMode(IdleMode.kBrake);
|
||||
|
||||
public void configIntake() {
|
||||
spinnyspin.setIdleMode(IdleMode.kBrake);
|
||||
}
|
||||
|
||||
// spinnyspin.setIdleMode(IdleMode.kBrake);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class Claw extends SubsystemBase {
|
||||
return m_open;
|
||||
}
|
||||
|
||||
public void yesspinnyspin() {
|
||||
public void intake() {
|
||||
m_spinnyspin.set(0.2);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class Claw extends SubsystemBase {
|
||||
m_spinnyspin.set(0);
|
||||
}
|
||||
|
||||
public void reversespinnyspin() {
|
||||
public void outtake() {
|
||||
m_spinnyspin.set(-0.2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user