-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpinTurret.java
More file actions
29 lines (25 loc) · 1.24 KB
/
SpinTurret.java
File metadata and controls
29 lines (25 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot.commands;
import edu.wpi.first.wpilibj.command.InstantCommand;
import frc.robot.subsystems.Turret;
import frc.robot.subsystems.Vision;
// NOTE: Consider using this command inline, rather than writing a subclass. For more
// information, see:
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
public class SpinTurret extends InstantCommand {
public SpinTurret(Turret subsystem1, Vision subsystem2, int mode, double speed) {
super(subsystem1, () -> {subsystem1.spin(subsystem2, mode, speed);});
requires(subsystem1);
requires(subsystem2);
// Use addRequirements() here to declare subsystem dependencies.
}
// Called when the command is initially scheduled.
@Override
public void initialize() {
}
}