FRC Snippets is a VSCode extension made for the First Robotics Java library.
Prefix:
frccmd
Code snippet:
import edu.wpi.first.wpilibj2.command.CommandBase;
public class ClassName extends CommandBase {
private final Subsystem m_subsystem;
public ClassName(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;
}
}
Prefix:
frcsys
Code snippet:
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class ClassName extends SubsystemBase {
public ClassName() {
}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
@Override
public void simulationPeriodic() {
// This method will be called once per scheduler run during simulation
}
}
WPILib should be installed, and you should be using their version of VSCode.
- Remove message
- Use year-based version numbers
- Update for WPILib 2024 changes
- Remove controller snippets (due to 2023 change in WPILib)
- Add controller snippets
- Reformat README.md
- Add license
- Initial release of FRC Snippets
This VSCode extension is in no way related to Visual Studio Code, Microsoft, First Robotics, WPILib, or any other company/organization.