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