From 8b2d4df3130bca735f533a5a232f5ae681dd63f5 Mon Sep 17 00:00:00 2001 From: InventorXtreme Date: Tue, 5 Dec 2023 07:52:58 -0500 Subject: [PATCH] ta --- src/main.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2b6d9d4..88003df 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -266,12 +266,12 @@ void autonomous() { // 1800)), // 1000); // reqtopull = false; - float temp = std::fmod(pull.getPosition(), 1800); - if ((1800 - temp) < 150) { - temp = -(1800 - temp); + float temp = std::fmod(pull.getPosition(), 900); + if ((900 - temp) < 150) { + temp = -(900 - temp); } pull.moveRelative( - (1800 - + (900 - temp), // pull.moveRelative((1800 - // std::fmod(pull.getPosition(), 1800)), @@ -293,7 +293,7 @@ void autonomous() { } if (autonpick == 5) { - pull.moveRelative(1800, 1000000); + pull.moveRelative(900, 1000000); } } @@ -632,12 +632,12 @@ void opcontrol() { } if (is_tapped(r1arr, R1.isPressed()) || reqtoloop == true) { - float temp = std::fmod(pull.getPosition(), 1800); - if ((1800 - temp) < 150) { - temp = -(1800 - temp); + float temp = std::fmod(pull.getPosition(), 900); + if ((900 - temp) < 150) { + temp = -(900 - temp); } pull.moveRelative( - (1800 - + (900 - temp), // pull.moveRelative((1800 - // std::fmod(pull.getPosition(), 1800)), @@ -654,11 +654,11 @@ void opcontrol() { pros::lcd::set_text(3, "bbb"); } - if (dist.get() < 40 && - (std::abs(pull.getPosition() - pull.getTargetPosition()) < 5)) { - pull.moveVoltage(0); - } else { - } + // if (dist.get() < 40 && + // (std::abs(pull.getPosition() - pull.getTargetPosition()) < 5)) { + // pull.moveVoltage(0); + // } else { + // } pros::lcd::set_text(4, std::to_string(pull.getTargetPosition())); @@ -683,12 +683,12 @@ void opcontrol() { // testMotor.moveVoltage(0); // } - + pros::lcd::set_text(5,std::to_string(pull.getTargetPosition())); controller.setText( 0, 0, - std::to_string(static_cast(flywheel.getTemperature())) + + std::to_string(static_cast(pull.getTemperature())) + std::to_string(static_cast(lavg)) + std::to_string(static_cast(ravg)) + std::to_string(static_cast(lift.getTemperature()))