From 36ff85d5ff13fba9865d095aacb917321ef1d0ea Mon Sep 17 00:00:00 2001 From: ary Date: Tue, 10 Oct 2023 08:31:24 -0400 Subject: [PATCH] clean stuff up --- RELENTLESS/include/main.h | 3 +++ RELENTLESS/include/wings.h | 5 ++--- RELENTLESS/src/main.cpp | 3 --- RELENTLESS/src/wings.cpp | 46 +++++++++++++++++--------------------- 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/RELENTLESS/include/main.h b/RELENTLESS/include/main.h index ab86527..57a8447 100644 --- a/RELENTLESS/include/main.h +++ b/RELENTLESS/include/main.h @@ -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 diff --git a/RELENTLESS/include/wings.h b/RELENTLESS/include/wings.h index e707e13..8e4d90f 100644 --- a/RELENTLESS/include/wings.h +++ b/RELENTLESS/include/wings.h @@ -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; diff --git a/RELENTLESS/src/main.cpp b/RELENTLESS/src/main.cpp index d64bf87..ed9e1f8 100644 --- a/RELENTLESS/src/main.cpp +++ b/RELENTLESS/src/main.cpp @@ -1,7 +1,4 @@ #include "main.h" -#include "lemlib/api.hpp" -#include "globals.hpp" -#include "superstructure.hpp" #include "wings.h" using namespace globals; diff --git a/RELENTLESS/src/wings.cpp b/RELENTLESS/src/wings.cpp index c7cc513..2bd63aa 100644 --- a/RELENTLESS/src/wings.cpp +++ b/RELENTLESS/src/wings.cpp @@ -1,38 +1,34 @@ #include "main.h" -#include "globals.hpp" -#include "superstructure.hpp" #include "wings.h" using namespace globals; -class Wings { - Wings::Wings() { - close(); - }; +Wings::Wings() { + close(); +}; - void Wings::open() { - left_wing_piston.set_value(1); - right_wing_piston.set_value(1); - } +void Wings::open() { + left_wing_piston.set_value(1); + right_wing_piston.set_value(1); +}; - void Wings::close() { - left_wing_piston.set_value(0); - right_wing_piston.set_value(0); - } +void Wings::close() { + left_wing_piston.set_value(0); + right_wing_piston.set_value(0); +}; - void Wings::toggleLeft(int value) { - left_wing_piston.set_value(value); - } +void Wings::toggleLeft(int value) { + left_wing_piston.set_value(value); +}; - void Wings::toggleRight(int value) { - right_wing_piston.set_value(value); - } +void Wings::toggleRight(int value) { + right_wing_piston.set_value(value); +}; - void Wings::openFor(double duration) { - open(); - pros::delay(duration * 1000); - close(); - } +void Wings::openFor(double duration) { + open(); + pros::delay(duration * 1000); + close(); };