Files
VEX-OverRide/include/EZ-Template/pneumatics.hpp
T
Carter 24ee947fd5 Fixed a problem where the OPControl was trying to pull values from an array that never had any values to begin with
causeing a segmentation fault and crashing the brain.
Also changed how the function lift_range_finder worked.  Instead of just makeing a variable eqaul to a number it also returns the value
so we can use it outside of the function.
We also added actual values to all the arrays.
2026-09-09 13:29:07 -04:00

54 lines
1.0 KiB
C++

#pragma once
#include "api.h"
#include "pros/adi.hpp"
#include "pros/serial.hpp"
#include "EZ-Template/piston.hpp"
namespace ez {
/**
* Enumeration to hold the current part of a match were in.
*/
enum class ControlPeriodP {
driver,
auton
};
/**
* Enumeration to hold the different controllers avalable.
*/
enum class ControllerP {
master,
slave
};
/**
* Enumeration to hold the different buttons to use.
*/
enum class ButtonsP {
arrow_buttons,
Y_B_buttons,
left_shoulder_buttons,
right_shoulder_buttons
};
/**
* Enumeration to hold all the pistons avalable.
*/
enum class PistonsP {
claw_piston
};
class Pneumatics{
private:
bool pistonState;
public:
Pneumatics();
void control_piston(enum PistonsP, enum ControlPeriodP, enum ControllerP, enum ButtonsP);
bool get_piston_state();
void set_piston_state(bool value);
};
};