mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-09 00:38:01 -06:00
71 lines
2.3 KiB
Java
71 lines
2.3 KiB
Java
|
|
/*----------------------------------------------------------------------------*/
|
||
|
|
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||
|
|
/* the project. */
|
||
|
|
/*----------------------------------------------------------------------------*/
|
||
|
|
|
||
|
|
package frc4388.robot;
|
||
|
|
|
||
|
|
import edu.wpi.first.wpilibj.Joystick;
|
||
|
|
import edu.wpi.first.wpilibj.command.Command;
|
||
|
|
import edu.wpi.first.wpilibj.command.InstantCommand;
|
||
|
|
import frc4388.robot.Constants.*;
|
||
|
|
import frc4388.robot.subsystems.Drive;
|
||
|
|
import frc4388.robot.subsystems.LED;
|
||
|
|
import frc4388.utility.controller.IHandController;
|
||
|
|
import frc4388.utility.controller.XboxController;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* This class is where the bulk of the robot should be declared. Since
|
||
|
|
* Command-based is a "declarative" paradigm, very little robot logic should
|
||
|
|
* actually be handled in the {@link Robot} periodic methods (other than the
|
||
|
|
* scheduler calls). Instead, the structure of the robot (including subsystems,
|
||
|
|
* commands, and button mappings) should be declared here.
|
||
|
|
*/
|
||
|
|
public class RobotContainer {
|
||
|
|
/* Subsystems */
|
||
|
|
public static final Drive m_robotDrive = new Drive();
|
||
|
|
public static final LED m_robotLED = new LED();
|
||
|
|
|
||
|
|
/* Controllers */
|
||
|
|
XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
|
||
|
|
XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The container for the robot. Contains subsystems, OI devices, and commands.
|
||
|
|
*/
|
||
|
|
public RobotContainer() {
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Use this to pass the autonomous command to the main {@link Robot} class.
|
||
|
|
*
|
||
|
|
* @return the command to run in autonomous
|
||
|
|
*/
|
||
|
|
public Command getAutonomousCommand() {
|
||
|
|
// no auto
|
||
|
|
return new InstantCommand();
|
||
|
|
}
|
||
|
|
|
||
|
|
public IHandController getDriverController() {
|
||
|
|
return m_driverXbox;
|
||
|
|
}
|
||
|
|
|
||
|
|
public IHandController getOperatorController()
|
||
|
|
{
|
||
|
|
return m_operatorXbox;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Joystick getOperatorJoystick()
|
||
|
|
{
|
||
|
|
return m_operatorXbox.getJoyStick();
|
||
|
|
}
|
||
|
|
|
||
|
|
public Joystick getDriverJoystick()
|
||
|
|
{
|
||
|
|
return m_driverXbox.getJoyStick();
|
||
|
|
}
|
||
|
|
}
|