1516X High Stakes 2.0
Codebase for 1516X High Stakes season
Loading...
Searching...
No Matches
intake.cpp
Go to the documentation of this file.
1#include "robot/intake.h"
2
3#include "globals.h"
4
5#define SLOWER_VELOCITY 200
6#define FASTER_VELOCITY 600
7
8using namespace Robot;
9using namespace Robot::Globals;
10
12
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}
bool alliance_color
blue is false, red is true.
Definition intake.h:26
void run()
Runs the main function of the intake system.
Definition intake.cpp:13
#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)
Definition auton.h:10