1516b Over Under 2.0
Codebase for 1516b over under season
Loading...
Searching...
No Matches
wings.h
Go to the documentation of this file.
1#pragma once
2
3
4namespace Robot {
5/**
6 * @brief The Wings class represents the wings of a robot.
7 *
8 * The Wings class provides functionality to control and operate the wings of a robot.
9 * It allows the robot to perform various actions related to the wings, such as running them.
10 */
11class Wings {
12public:
13 /**
14 * @brief Runs the wings.
15 *
16 * This function activates the wings and starts their operation.
17 * It allows the robot to perform actions that involve the movement or control of the wings.
18 *
19 * @note Make sure to initialize the wings before calling this function.
20 */
21
22 void run();
23
24 /**
25 * @brief Sets the state of the wings.
26 * @param wingState The state of the wings.
27 */
28 void setState(bool wingState);
29
30 /**
31 * @brief Gets the current state of the wings.
32 * @return The current state of the wings.
33 */
34 bool getState();
35
36private:
37 /** The current state of the wings.
38 * The state variable represents the current state of the wings.
39 * It can be either true or false, indicating whether the wings are activated or deactivated.
40 * This variable is used to control the behavior of the wings and to query their current state.
41 */
42 bool state;
43};
44
45}
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
lemlib::ChassisController_t angularController
Definition globals.cpp:73
pros::Motor LeftMid
pros::Motor IntakeMotor
pros::Distance distance
pros::Motor_Group drive_
pros::Imu inertial_sensor
pros::Motor RightBack
pros::ADIDigitalOut wing2
pros::Motor_Group drive_right
pros::Motor_Group drive_left
pros::Motor RightFront
pros::ADIDigitalOut wing
pros::ADIDigitalOut pto_2
pros::ADIDigitalOut pto_1
pros::Motor RightMid
lemlib::OdomSensors_t sensors
Definition globals.cpp:52
pros::Motor LeftFront
pros::Motor PuncherMotor2
lemlib::ChassisController_t lateralController
Definition globals.cpp:62
Robot::Wings robotWings
lemlib::Chassis chassis
pros::Motor PuncherMotor
lemlib::Drivetrain_t drivetrain
Definition globals.cpp:44
pros::Motor_Group punchers
pros::Motor LeftBack
Contains all objects generated by the 1516B team - Contains all of the subsystems,...
Definition globals.cpp:17