clean stuff up
This commit is contained in:
parent
ae218b1a42
commit
36ff85d5ff
@ -41,9 +41,12 @@
|
||||
*/
|
||||
#include "okapi/api.hpp"
|
||||
#include "ary-lib/api.hpp"
|
||||
#include "lemlib/api.hpp"
|
||||
//#include "pros/api_legacy.h"
|
||||
|
||||
#include "autons.hpp"
|
||||
#include "superstructure.hpp"
|
||||
#include "globals.hpp"
|
||||
|
||||
/**
|
||||
* If you find doing pros::Motor() to be tedious and you'd prefer just to do
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef _wings_h_
|
||||
#define _wings_h_
|
||||
#ifndef _Wings_h
|
||||
#define _Wings_h_
|
||||
|
||||
#include "main.h"
|
||||
|
||||
@ -11,7 +11,6 @@ class Wings {
|
||||
void toggleLeft(int value);
|
||||
void toggleRight(int value);
|
||||
void openFor(double duration);
|
||||
std::uint8_t getState();
|
||||
|
||||
private:
|
||||
std::uint8_t wingsopen;
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
#include "main.h"
|
||||
#include "lemlib/api.hpp"
|
||||
#include "globals.hpp"
|
||||
#include "superstructure.hpp"
|
||||
#include "wings.h"
|
||||
|
||||
using namespace globals;
|
||||
|
||||
@ -1,38 +1,34 @@
|
||||
#include "main.h"
|
||||
#include "globals.hpp"
|
||||
#include "superstructure.hpp"
|
||||
#include "wings.h"
|
||||
|
||||
using namespace globals;
|
||||
|
||||
class Wings {
|
||||
Wings::Wings() {
|
||||
Wings::Wings() {
|
||||
close();
|
||||
};
|
||||
};
|
||||
|
||||
void Wings::open() {
|
||||
void Wings::open() {
|
||||
left_wing_piston.set_value(1);
|
||||
right_wing_piston.set_value(1);
|
||||
}
|
||||
};
|
||||
|
||||
void Wings::close() {
|
||||
void Wings::close() {
|
||||
left_wing_piston.set_value(0);
|
||||
right_wing_piston.set_value(0);
|
||||
}
|
||||
};
|
||||
|
||||
void Wings::toggleLeft(int value) {
|
||||
void Wings::toggleLeft(int value) {
|
||||
left_wing_piston.set_value(value);
|
||||
}
|
||||
};
|
||||
|
||||
void Wings::toggleRight(int value) {
|
||||
void Wings::toggleRight(int value) {
|
||||
right_wing_piston.set_value(value);
|
||||
}
|
||||
};
|
||||
|
||||
void Wings::openFor(double duration) {
|
||||
void Wings::openFor(double duration) {
|
||||
open();
|
||||
pros::delay(duration * 1000);
|
||||
close();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user