This commit is contained in:
InventorXtreme 2023-12-05 07:52:58 -05:00
parent ae325683f9
commit 8b2d4df313

View file

@ -266,12 +266,12 @@ void autonomous() {
// 1800)), // 1800)),
// 1000); // 1000);
// reqtopull = false; // reqtopull = false;
float temp = std::fmod(pull.getPosition(), 1800); float temp = std::fmod(pull.getPosition(), 900);
if ((1800 - temp) < 150) { if ((900 - temp) < 150) {
temp = -(1800 - temp); temp = -(900 - temp);
} }
pull.moveRelative( pull.moveRelative(
(1800 - (900 -
temp), // pull.moveRelative((1800 - temp), // pull.moveRelative((1800 -
// std::fmod(pull.getPosition(), 1800)), // std::fmod(pull.getPosition(), 1800)),
@ -293,7 +293,7 @@ void autonomous() {
} }
if (autonpick == 5) { 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) { if (is_tapped(r1arr, R1.isPressed()) || reqtoloop == true) {
float temp = std::fmod(pull.getPosition(), 1800); float temp = std::fmod(pull.getPosition(), 900);
if ((1800 - temp) < 150) { if ((900 - temp) < 150) {
temp = -(1800 - temp); temp = -(900 - temp);
} }
pull.moveRelative( pull.moveRelative(
(1800 - (900 -
temp), // pull.moveRelative((1800 - temp), // pull.moveRelative((1800 -
// std::fmod(pull.getPosition(), 1800)), // std::fmod(pull.getPosition(), 1800)),
@ -654,11 +654,11 @@ void opcontrol() {
pros::lcd::set_text(3, "bbb"); pros::lcd::set_text(3, "bbb");
} }
if (dist.get() < 40 && // if (dist.get() < 40 &&
(std::abs(pull.getPosition() - pull.getTargetPosition()) < 5)) { // (std::abs(pull.getPosition() - pull.getTargetPosition()) < 5)) {
pull.moveVoltage(0); // pull.moveVoltage(0);
} else { // } else {
} // }
pros::lcd::set_text(4, std::to_string(pull.getTargetPosition())); pros::lcd::set_text(4, std::to_string(pull.getTargetPosition()));
@ -683,12 +683,12 @@ void opcontrol() {
// testMotor.moveVoltage(0); // testMotor.moveVoltage(0);
// } // }
pros::lcd::set_text(5,std::to_string(pull.getTargetPosition()));
controller.setText( controller.setText(
0, 0, 0, 0,
std::to_string(static_cast<int>(flywheel.getTemperature())) + std::to_string(static_cast<int>(pull.getTemperature())) +
std::to_string(static_cast<int>(lavg)) + std::to_string(static_cast<int>(lavg)) +
std::to_string(static_cast<int>(ravg)) + std::to_string(static_cast<int>(ravg)) +
std::to_string(static_cast<int>(lift.getTemperature())) std::to_string(static_cast<int>(lift.getTemperature()))