Class RobotRoundhouse

java.lang.Object
org.firstinspires.ftc.teamcode.fy24.robots.RobotRoundhouse

public class RobotRoundhouse extends Object
RobotRoundhouse stores Robot24.Parameters for every Robot that currently exists. If you need to change a Robot configuration option, change it here. Everything that could potentially differ between any two real-life robots has been split out to a parameter of either a subsystem or the entire Robot. There are many Parameters, and they are all centralized here. Please get them from here instead of making custom ones inside of OpModes; otherwise we'll have multiple mystery copies of something that has over 100 config. options and can cause physical damage if it is incorrect. The name of a robot in the Roundhouse matches the name of its control hub. So, RobotA = 10107-A-RC and RobotB = 10107-B-RC. You can get the parameters of a specific robot, or you can have the Roundhouse automatically determine which robot this is and give you the correct Parameters. NOTE: If you're using virtual_robot, you must (currently) use getVirtualRobotParams(). getParamsAuto() only works on real hardware.
  • Constructor Details

    • RobotRoundhouse

      public RobotRoundhouse()
  • Method Details

    • getParamsAuto

      public static Robot24.Parameters getParamsAuto(String serialNumber, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Returns the correct Parameters for the specified robot. NOTE: Doesn't work on virtual_robot. By "serialNumber", the SDK actually means the name you set on the Control Hub. So RobotA's "serialNumber" is "10107-A-RC". Pass in the name of the robot controller you want parameters for. Pass in the hardwareMap provided by your OpMode.
    • getParamsAuto

      public static Robot24.Parameters getParamsAuto(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Automatically determines which robot you're running on and returns the correct Parameters. NOTE: Doesn't work on virtual_robot. Pass in the hardwareMap provided by your OpMode.
    • getRobotAParams

      public static Robot24.Parameters getRobotAParams(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Returns the Parameters for RobotA. Pass in the hardwareMap provided by your OpMode.
    • getRobotBParams

      public static Robot24.Parameters getRobotBParams(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Returns the Parameters for RobotB. Pass in the hardwareMap provided by your OpMode.
    • getVirtualRobotParams

      public static Robot24.Parameters getVirtualRobotParams(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Returns the Parameters for virtual_robot. If you haven't created a robot there that matches your real hardware, you'll probably be enabling/disabling subsystems regularly to test different things on one of the provided bots. Pass in the hardwareMap provided by your OpMode.
    • getProgrammingBoardParams

      public static Robot24.Parameters getProgrammingBoardParams(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
      Returns the Parameters for the Programming Board from the book "Learn Java for FTC". virtual_robot provides the Programming Board too. This has usually been used to hook one output from one subsystem to one actuator, so these Parameters get messed with all the time. Pass in the hardwareMap provided by your OpMode.