The Knights of Ni 2024
CenterStage Off-season Documentation
Loading...
Searching...
No Matches
org.firstinspires.ftc.teamcode.Robot Class Reference

Glue class for all subsystems. More...

Public Member Functions

 Robot (HardwareMap hardwareMap, Telemetry telemetry, ElapsedTime timer, AllianceColor allianceColor, Gamepad gamepad1, Gamepad gamepad2, HashMap< String, Boolean > flags)
 
double getBatteryVoltage ()
 
void telemetryBroadcast (String caption, String value)
 

Static Public Member Functions

static void updateGamepads ()
 

Public Attributes

final String initLogTag = "init"
 
final ElapsedTime timer
 
final boolean visionEnabled
 
final HardwareMap hardwareMap
 
BNO055IMU imu
 
OldDrive drive
 
Control control
 
Vision vision
 
WebThread web
 

Static Public Attributes

static final double length = 18.0
 
static final double width = 18.0
 
static GamepadWrapper gamepad1
 
static GamepadWrapper gamepad2
 

Protected Member Functions

void init ()
 Runs all init operations.
 
void imuInit ()
 
void subsystemInit ()
 

Private Attributes

final MasterLogger logger
 
final AllianceColor allianceColor
 
final boolean webEnabled
 
final boolean odometryEnabled
 
final Telemetry telemetry
 

Detailed Description

Glue class for all subsystems.

All competition OpModes instantiate this class, as well as some Test OpModes.

This will initialize all subsystems, but certain can be disabled with flags ("vision", and "web")

Constructor & Destructor Documentation

◆ Robot()

org.firstinspires.ftc.teamcode.Robot.Robot ( HardwareMap hardwareMap,
Telemetry telemetry,
ElapsedTime timer,
AllianceColor allianceColor,
Gamepad gamepad1,
Gamepad gamepad2,
HashMap< String, Boolean > flags )
Parameters
hardwareMapThe hardware map for the robot
telemetryThe telemetry object
timerThe elapsed time
allianceColorthe alliance color of the robot, usually set on a per-opmode basis
gamepad1The first gamepad (the robot movement controller)
gamepad2The second gamepad (control for the arms and claws)
flagsA hashmap of flags, used to disable certain subsystems

Flags:

  • vision - toggles vision subsystem, enabled by default
  • web - toggles web subsystem, disabled by default
  • odometry - toggles odometry subsystem, disabled by default

The documentation for this class was generated from the following file: