Made a new pneumatics class and implemented it in driver control, also made a few different classes for the rotation sensors. Got all the rotation classes implemented with connection to the physical rotation sensors and the motors. Added another controller to be implemented later.
This commit is contained in:
1 parent
bd0e77e240
commit
b7af93220d
14 files changed
+452
-101
No files matched your search
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "api.h"
|
||||
#include "pros/adi.hpp"
|
||||
#include "pros/serial.hpp"
|
||||
#include "EZ-Template/piston.hpp"
|
||||
|
||||
namespace ez {
|
||||
|
||||
enum class Pistons {
|
||||
claw_piston
|
||||
};
|
||||
enum class ControlPeriod {
|
||||
driver,
|
||||
auton
|
||||
};
|
||||
enum class Controller {
|
||||
master,
|
||||
slave
|
||||
};
|
||||
enum class Buttons {
|
||||
arrow_buttons,
|
||||
Y_B_buttons,
|
||||
left_shoulder_buttons,
|
||||
right_shoulder_buttons
|
||||
};
|
||||
|
||||
class Pneumatics{
|
||||
|
||||
private:
|
||||
bool pistonState;
|
||||
|
||||
public:
|
||||
|
||||
Pneumatics();
|
||||
|
||||
void control_piston(enum Pistons, enum ControlPeriod, enum Controller, enum Buttons);
|
||||
|
||||
bool get_piston_state();
|
||||
void set_piston_state(bool value);
|
||||
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user