1516X High Stakes 2.0
Codebase for 1516X High Stakes season
Loading...
Searching...
No Matches
Robot::Intake Class Reference

The Intake class represents a robot intake system. More...

#include <intake.h>

Public Member Functions

void run ()
 Runs the main function of the intake system.
 
 Intake ()
 

Private Attributes

bool elevated
 
bool alliance_color
 blue is false, red is true.
 

Detailed Description

The Intake class represents a robot intake system.

Definition at line 8 of file intake.h.

Constructor & Destructor Documentation

◆ Intake()

Intake::Intake ( )

Definition at line 11 of file intake.cpp.

11{ alliance_color = false; }
bool alliance_color
blue is false, red is true.
Definition intake.h:26

References alliance_color.

Member Function Documentation

◆ run()

void Intake::run ( )

Runs the main function of the intake system.

Takes optional user input to control the direction of the intake system in autonomous.

Definition at line 13 of file intake.cpp.

13 {
14
15 if (controller.get_digital(pros::E_CONTROLLER_DIGITAL_R1)) {
16 IntakeMotor.move_velocity(-FASTER_VELOCITY);
17 HookMotor.move_velocity(-SLOWER_VELOCITY);
18 } else if (controller.get_digital(pros::E_CONTROLLER_DIGITAL_L1)) {
19 IntakeMotor.move_velocity(FASTER_VELOCITY);
20 HookMotor.move_velocity(SLOWER_VELOCITY);
21 } else {
22 IntakeMotor.brake();
23 HookMotor.brake();
24 }
25}
#define FASTER_VELOCITY
Definition intake.cpp:6
#define SLOWER_VELOCITY
Definition intake.cpp:5
pros::Motor IntakeMotor(-9, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::Motor HookMotor(7, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)
pros::Controller controller(pros::E_CONTROLLER_MASTER)

References Robot::Globals::controller(), FASTER_VELOCITY, Robot::Globals::HookMotor(), Robot::Globals::IntakeMotor(), and SLOWER_VELOCITY.

Member Data Documentation

◆ alliance_color

bool Robot::Intake::alliance_color
private

blue is false, red is true.

Definition at line 26 of file intake.h.

Referenced by Intake().

◆ elevated

bool Robot::Intake::elevated
private

Definition at line 21 of file intake.h.


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