This repository was archived by the owner on Feb 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Using the Framework
Michael Rood edited this page Jan 24, 2016
·
1 revision
Create a new class and have it extend RobotHardware.
This is an abstract class so it should have methods that are required to be overridden.
public class RobotHardwareTutorial extends RobotHardware
{
@Override
public abstract void initialize()
{
}
@Override
public abstract void teleop()
{
}
@Override
public abstract void addAutons()
{
}
@Override
public abstract String getName()
{
}
}Each method is pretty self explanatory.
getName() is used for displaying the name to the smartdashboard.
addAutons() is for creating autonomous strategies. See Creating Auton Strategies.
You can also optionally override logSmartDashboard() to log data to the SmartDashboard. Make sure to call the super() function.
@Override
public void logSmartDashboard()
{
//Your Smartdashboard code here
super.logSmartDashboard();
}If you want to add a camera, simply override the usesCamera() method.
@Override
public boolean usesCamera()
{
return true;
}## Creating Auton Strategies //To be added soon.
Any other help can be found below:
WPILib Javadoc
WPILib Tutorials