3#include "lemlib/pid.hpp"
4#include "lemlib/timer.hpp"
6#include "pros/motors.h"
7#include "pros/rtos.hpp"
23 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_R2)) {
31 std::cout <<
"Moving to: " << move_to << std::endl;
38 pros::Task move([move_to,
this]() {
MoveToPoint(move_to); });
45 }
else if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_L2)) {
55 std::cout <<
"Moving to: " << move_to << std::endl;
61 pros::Task move([move_to,
this]() {
MoveToPoint(move_to); },
"LadyBrownMove");
75 constexpr double base_location = 30;
76 constexpr double load_location = -2550;
77 constexpr double attack_location = -15500;
81 std::cout <<
"state: " << state << std::endl;
101 std::cout <<
"target: " <<
target << std::endl;
105 lemlib::Timer timer(timeout);
113 if (std::abs(error) < max_error || timer.isDone()) {
void run(bool async=true, int timeout=1000)
lemlib::PID MoveToPointPID
static LADYBROWN_STATE current_state
void MoveToPoint(LadyBrown::LADYBROWN_STATE state, int max_error=150, int timeout=1000)
pros::Rotation LadyBrownRotation(8)
pros::Controller controller(pros::E_CONTROLLER_MASTER)
pros::Motor LadyBrownMotor(-3, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)