Robot peut bouger
This commit is contained in:
parent
9bb20dfccd
commit
e6b48545ab
@ -8,6 +8,8 @@ import edu.wpi.first.wpilibj.GenericHID;
|
|||||||
import edu.wpi.first.wpilibj.XboxController;
|
import edu.wpi.first.wpilibj.XboxController;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||||
|
import frc.robot.subsystems.BasePilotable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is where the bulk of the robot should be declared. Since Command-based is a
|
* This class is where the bulk of the robot should be declared. Since Command-based is a
|
||||||
@ -17,12 +19,19 @@ import edu.wpi.first.wpilibj2.command.Command;
|
|||||||
*/
|
*/
|
||||||
public class RobotContainer {
|
public class RobotContainer {
|
||||||
// The robot's subsystems and commands are defined here...
|
// The robot's subsystems and commands are defined here...
|
||||||
|
XboxController manette = new XboxController(0);
|
||||||
|
|
||||||
|
BasePilotable basePilotable = new BasePilotable();
|
||||||
|
|
||||||
/** The container for the robot. Contains subsystems, OI devices, and commands. */
|
/** The container for the robot. Contains subsystems, OI devices, and commands. */
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
// Configure the button bindings
|
// Configure the button bindings
|
||||||
configureButtonBindings();
|
configureButtonBindings();
|
||||||
|
|
||||||
|
basePilotable.setDefaultCommand(
|
||||||
|
new RunCommand(
|
||||||
|
()-> basePilotable.drive(manette.getLeftY(), manette.getLeftX(), manette.getLeftTriggerAxis()-manette.getRightTriggerAxis()), basePilotable)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user