#pragma once #include "api.h" #include "pros/adi.hpp" #include "pros/motors.hpp" #include "pros/motor_group.hpp" namespace ez { /** * Enumeration to hold the current part of a match were in. */ enum class ControlPeriodM { driver, auton }; /** * Enumeration to hold the different controllers avalable. */ enum class ControllerM { master, slave }; /** * Enumeration to hold the different buttons to use. */ enum class ButtonsM { arrow_buttons, Y_B_buttons, left_shoulder_buttons, right_shoulder_buttons }; /** * Enumeration to hold all the motors and motor groups available */ enum class MotorGroups { lift_MG, claw_M, roller_M }; /** * Motor mechanism class */ class Mechanisms { private: public: float fw_motor_speed = 0; float rev_motor_speed = 0; /** * Default constructor */ Mechanisms(); /** * Allows you to control your motors * * \param controlPeriodM * The current control period were in * \param controllerM * * */ void motor_control(enum ControlPeriodM, enum ControllerM, enum ButtonsM, enum MotorGroups, float fw_motor_speed, float rev_motor_speed); float get_motor_speed(); float set_motor_speed(float value); }; };