mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add templates for new commands for vscode plugin (#2016)
This commit is contained in:
@@ -24,6 +24,28 @@ public class ExampleCommand extends CommandBase {
|
||||
*/
|
||||
public ExampleCommand(ExampleSubsystem subsystem) {
|
||||
m_subsystem = subsystem;
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
addRequirements(subsystem);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,8 @@ public class ExampleSubsystem extends SubsystemBase {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called periodically whenever the CommandScheduler runs.
|
||||
*/
|
||||
@Override
|
||||
public void periodic() {
|
||||
|
||||
// This method will be called once per scheduler run
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user