1516b Over Under 2.0
Codebase for 1516b over under season
Loading...
Searching...
No Matches
wings.cpp
Go to the documentation of this file.
1#include "robot/wings.h"
2#include "api.h"
3#include "globals.h"
4
5using namespace Robot::Globals;
6
7void Robot::Wings::run(){
8 if(controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_B)) {
9 state = !state;
10 }
11 if (state) {
12 wing.set_value(true);
13 wing2.set_value(false);
15 }
16 else {
17 wing.set_value(false);
18 wing2.set_value(true);
20 }
21}
22
23void Robot::Wings::setState(bool wingState) {
24 state = wingState;
25}
26
28 return state;
29}
The Wings class represents the wings of a robot.
Definition wings.h:11
void setState(bool wingState)
Sets the state of the wings.
Definition wings.cpp:23
void run()
Runs the wings.
Definition wings.cpp:7
bool getState()
Gets the current state of the wings.
Definition wings.cpp:27
bool state
Definition wings.h:42
Contains global variables and type definitions for the Robot namespace.
Definition globals.cpp:18
pros::Controller controller
pros::ADIDigitalOut wing2
pros::ADIDigitalOut wing
Contains all objects generated by the 1516B team - Contains all of the subsystems,...
Definition globals.cpp:17