Files
Carter 24ee947fd5 Fixed a problem where the OPControl was trying to pull values from an array that never had any values to begin with
causeing a segmentation fault and crashing the brain.
Also changed how the function lift_range_finder worked.  Instead of just makeing a variable eqaul to a number it also returns the value
so we can use it outside of the function.
We also added actual values to all the arrays.
2026-09-09 13:29:07 -04:00

48 lines
976 B
C++

#include "main.h"
#include "EZ-Template/api.hpp"
#include "api.h"
#pragma once
#ifndef CONFIG_H
#define CONFIG_H
/**
* Sets up the master and slave controllers.
*/
inline pros::Controller master(pros::E_CONTROLLER_MASTER);
inline pros::Controller slave(pros::E_CONTROLLER_PARTNER);
/**
* Declares mechinism motors and motor groups.
*/
inline pros::MotorGroup lift({15, -19});
inline pros::MotorGroup wrist({1, 9});
inline pros::Motor arm({6});
/**
* Declares piston mechanisms.
*/
inline ez::Piston claw({'G',true});
/**
* Declare limit switches and other ADI sensors
*/
inline pros::ADIButton liftReset({'A'});
inline pros::ADIButton armReset({'B'});
/**
* Declares all sensors.
*
* [1] - Rotation sensors
*
* [2] - Color sensors
*/
inline pros::Rotation liftRotation({17});
inline pros::Rotation armRotation({8});
inline pros::Rotation wristRotation({21});
inline pros::Optical colorSensorOne({18});
inline pros::Optical colorSensorTwo({19});
#endif