Added an initialize folder in include also set up the color sorter code

This commit is contained in:
Carter committed 2026-08-17 08:53:07 -04:00
1 parent 6be8dd7070
commit bd0e77e240
6 files changed
+153 -1

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include "EZ-Template/PID.hpp"
#include "EZ-Template/auton.hpp"
#include "EZ-Template/auton_selector.hpp"
#include "EZ-Template/color_sorter.hpp"
#include "EZ-Template/drive/drive.hpp"
#include "EZ-Template/piston.hpp"
#include "EZ-Template/sdcard.hpp"
+45
View File
@@ -0,0 +1,45 @@
#pragma once
#include "api.h"
#include "pros/adi.hpp"
#include "pros/colors.hpp"
namespace ez {
enum wanted_color {
red,
blue,
yellow,
green,
purple
};
enum control_period {
driver,
auton
};
class color_sorter {
public:
color_sorter();
/**
*
* \param sensorNum
* the sensor we want to use for the reading
* \param period
* the current control period where in
* \param selected_color
* the color we want to look for
* \param looped
* do we want to continusly check for that color
*/
color_sorter(int sensorNum, control_period period, wanted_color selected_color, bool looped);
void sensor(int sensorAmount);
void DisplayColor();
};
};