Implement new Command Based Framework

This commit is contained in:
Keenan D. Buckley
2020-01-05 18:59:50 -07:00
parent 6fb373969d
commit c52bbdd2ee
13 changed files with 185 additions and 314 deletions
@@ -10,16 +10,16 @@ package frc4388.robot.subsystems;
import com.ctre.phoenix.motorcontrol.InvertType;
import com.ctre.phoenix.motorcontrol.NeutralMode;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.DriveConstants;
import frc4388.robot.commands.Drive.DriveWithJoystick;
/**
* Add your docs here.
*/
public class Drive extends Subsystem {
public class Drive extends SubsystemBase {
// Put methods for controlling this subsystem
// here. Call these from Commands.
@@ -58,10 +58,10 @@ public class Drive extends Subsystem {
m_driveTrain.arcadeDrive(move, steer);
}
@Override
/* @Override
public void initDefaultCommand(){
// Set the default command for a subsystem here.
// setDefaultCommand(new MySpecialCommand());
setDefaultCommand(new DriveWithJoystick());
}
} */
}
@@ -8,17 +8,17 @@
package frc4388.robot.subsystems;
import edu.wpi.first.wpilibj.Spark;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.LEDConstants;
import frc4388.robot.commands.LED.UpdateLED;
import frc4388.robot.constants.LEDPatterns;
/**
* Allows for the control of a 5v LED Strip using a Rev Robotics Blinkin LED Driver
* Allows for the control of a 5v LED Strip using a Rev Robotics Blinkin LED
* Driver
*/
public class LED extends Subsystem {
public class LED extends SubsystemBase {
public static float currentLED;
public static Spark LEDController;
@@ -43,10 +43,10 @@ import frc4388.robot.constants.LEDPatterns;
SmartDashboard.putNumber("LED", currentLED);
}
@Override
/* @Override
public void initDefaultCommand() {
// Set the default command for a subsystem here.
// setDefaultCommand(new MySpecialCommand());
setDefaultCommand(new UpdateLED());
}
} */
}