This commit is contained in:
InventorXtreme 2024-01-27 08:44:49 -05:00
parent 00cf4c6d83
commit 96232c9d78
2 changed files with 259 additions and 195 deletions

42
docs/auton.org Normal file
View file

@ -0,0 +1,42 @@
#+OPTIONS: toc:nil
#+LATEX_HEADER: \usepackage{nopageno}
#+STARTUP: inlineimages
* Autonomous Map
0. [@0] AUTON 0
Auton pushes one tribal into goal, then turns and drives towards the bar and deploys flaps to touch.
+ Opposite Side
+ Total Score: 5?
+ 2/3 of auton win point
1. AUTON 1
Deploys wings to knock triball out of match load zone, then drives forward
+ Close Side
+ Total Score +2?
+ 1/3 of auton win point
2. AUTON 2
Deploys wings to knock triball out of match load zone, then drives forward. Retracts wings, and drives towards the bar before redeploying wings to touch the bar.
+ Close Side
+ Total Score +2?
+ 2/3 of auton win point
+ Sub-auton of auton 1
3. AUTON 3
Uses triball detection distance sensor to shoot 44 triballs over to the other side. Then retracts catapult, moves forward, and pushes triballs under goal.
+ Should be setup 30 degress left of straight
+ Skills auton
+ Currently non functional due to no shooter
4. AUTON 4
Then retracts catapult, moves forward, and pushes triballs under goal.
+ Currently non functional due to no shooter
+ Can be run exclusively
+ Setup should be 30 degrees left of straight
5. AUTON 5
Drives forward grabbing triball in center of field. Then pulls triball back, rotates right, and pushes two triballs towards our side. Then reverses and knocks triball into goal.
+ Opposing side
+ Scores 9 points
+ Can counter other teams
6. AUTON 6
Push auton. Moves 2ft backward then 0.5ft forward.
+ Utility auton

View file

@ -9,6 +9,7 @@
/** /**
* You should add more #includes here * You should add more #includes here
*/ */
#include "display/lv_misc/lv_task.h"
#include "okapi/api.hpp" #include "okapi/api.hpp"
#include "okapi/api/device/motor/abstractMotor.hpp" #include "okapi/api/device/motor/abstractMotor.hpp"
#include "okapi/api/units/QLength.hpp" #include "okapi/api/units/QLength.hpp"
@ -23,6 +24,9 @@
#include <bits/stdc++.h> #include <bits/stdc++.h>
// 1 2 3 5 //left
// 7 8 9 10 //right
int autonpick = 0; int autonpick = 0;
int automod = 0; int automod = 0;
lv_res_t sa0(lv_obj_t *btn) { lv_res_t sa0(lv_obj_t *btn) {
@ -86,6 +90,7 @@ void shiftarray(bool *arr, bool ap) {
bool is_tapped(bool *log, bool ap) { bool is_tapped(bool *log, bool ap) {
shiftarray(log, ap); shiftarray(log, ap);
if (log[0] == true && log[9] == false && log[1] == false) { if (log[0] == true && log[9] == false && log[1] == false) {
printf("a: %d\n", log[0]); printf("a: %d\n", log[0]);
return true; return true;
} else { } else {
@ -201,20 +206,21 @@ void autonomous() {
fclose(usd_file_read); // always close files when you're done with them fclose(usd_file_read); // always close files when you're done with them
autonpick = num; autonpick = num;
// int autonpick = 3; // int autonpick = 3;
std::shared_ptr<ChassisController> drive =
ChassisControllerBuilder()
.withMotors(
{-1, -2, -3}, std::shared_ptr<ChassisController> drive =
{ // -5 is
5, ChassisControllerBuilder()
6, .withMotors({-1, -2, -3, -5}, {7, 8, 9, 10})
7, .withDimensions({AbstractMotor::gearset::blue, (48.0 / 36.0)},
}) {{3.25_in, 11.2_in}, imev5BlueTPR})
.withDimensions({AbstractMotor::gearset::blue, (60.0 / 48.0)},
{{3.25_in, 12_in}, imev5BlueTPR})
.build(); .build();
pros::ADIDigitalOut funnypiston(3);
funnypiston.set_value(false);
pros::ADIDigitalOut upflap(8);
upflap.set_value(false);
pros::Imu IMU(19); pros::Imu IMU(19);
IMU.reset(true); IMU.reset(true);
IMU.tare(); IMU.tare();
@ -229,71 +235,75 @@ void autonomous() {
pros::ADIDigitalOut piston(2); pros::ADIDigitalOut piston(2);
if (autonpick == 0) { // Auton #1, used for adding tribal to goal if (autonpick == 0) { // Auton #1, used for adding tribal to goal
float x = -3.2; float x = -2.7;
drive->moveDistanceAsync(x * 1_ft); drive->moveDistanceAsync(x * 1_ft);
pros::delay(2500); pros::delay(2500);
drive->moveDistance(1_ft); drive->moveDistance(0.5_ft);
double yaw = IMU.get_heading(); double yaw = IMU.get_heading();
std::printf("%f", yaw); std::printf("yaw: %f\n", yaw);
double turn = -92 - yaw; // double turn = -92 - yaw;
double turn = 45 - yaw;
std:
printf("turn: %f\n", turn);
drive->setMaxVelocity(300); drive->setMaxVelocity(300);
drive->turnAngle(turn * 1_deg); drive->turnAngle(turn * 1_deg);
drive->moveDistanceAsync(-4.1_ft); drive->moveDistanceAsync(4.1_ft);
pros::delay(3000); pros::delay(3000);
piston.set_value(true); piston.set_value(true);
} else if (autonpick == 1 || } else if (autonpick == 1 ||
autonpick == autonpick ==
2) { // Auton #2, Used for removing triball from match loader 2) { // Auton #2, Used for removing triball from match loader
piston.set_value(true); piston.set_value(true);
drive->moveDistance(1_ft);
if (autonpick == 2) { if (autonpick == 2) {
drive->setMaxVelocity(300); drive->setMaxVelocity(300);
pros::delay(1000); pros::delay(1000);
piston.set_value(false); piston.set_value(false);
drive->moveDistance(-1.7_ft); // drive->moveDistance(-1.7_ft);
drive->turnAngle(87_deg); drive->turnAngle(115_deg);
drive->moveDistance(-3.5_ft); drive->moveDistance(3.5_ft);
drive->turnAngle(95_deg); drive->turnAngle(95_deg);
drive->moveDistance(-2_in); drive->setMaxVelocity(50);
drive->moveDistanceAsync(2_ft);
pros::delay(2500);
piston.set_value(true); piston.set_value(true);
drive->moveDistance(-4_in); drive->moveDistance(4_in);
} }
// drive->turnAngle(45_deg); // drive->turnAngle(45_deg);
} else if (autonpick == 3) { } else if (autonpick == 3) {
upflap.set_value(true);
bool reqtopull = false; bool reqtopull = false;
bool good[10]; bool good[10];
pros::Distance dist(13); // fixed pros::Distance dist(13); // fixed
int counter = 0; int counter = 0;
pull.tarePosition(); pull.tarePosition();
printf("hereasdsadfasdfsdf\n"); printf("hereasdsadfasdfsdf\n");
bool reqtopullarr[10]; bool reqtopullarr[10];
for (int i = 0; i<10; i++){ for (int i = 0; i < 10; i++) {
reqtopullarr[i] = false; reqtopullarr[i] = false;
} }
while (counter<44) {
while (counter < 44) {
if (is_held(good, dist.get() < 115)) {
if (is_held(good, dist.get() < 115)) { reqtopull = true;
reqtopull = true; }
}
if(is_tapped_short(reqtopullarr,reqtopull)) { if (is_tapped_short(reqtopullarr, reqtopull)) {
counter = counter + 1; counter = counter + 1;
} }
pros::lcd::set_text(7,std::to_string(counter)); pros::lcd::set_text(7, std::to_string(counter));
// if (pros::millis() % 2000 <= 10){
// reqtopull = true;
// if (pros::millis() % 2000 <= 10){ // }
// reqtopull = true;
// }
if (reqtopull) { if (reqtopull) {
// pull.moveRelative((1800 - std::fmod(pull.getPosition(), // pull.moveRelative((1800 - std::fmod(pull.getPosition(),
// 1800)), // 1800)),
// 1000); // 1000);
// reqtopull = false; // reqtopull = false;
float temp = std::fmod(pull.getPosition(), 900); float temp = std::fmod(pull.getPosition(), 900);
if ((900 - temp) < 150) { if ((900 - temp) < 150) {
@ -301,93 +311,129 @@ void autonomous() {
} }
pull.moveRelative( pull.moveRelative(
(900 - (900 -
temp), // pull.moveRelative((1800 - temp), // pull.moveRelative((1800
// std::fmod(pull.getPosition(), 1800)), //-
//std::fmod(pull.getPosition(), 1800)),
10000000); 10000000);
reqtopull = false; reqtopull = false;
} }
pros::delay(10); pros::delay(10);
} }
} }
if (autonpick == 3 || autonpick == 8) { if (autonpick == 3 || autonpick == 4) {
pros::delay(500); pros::delay(500);
pros::Distance distcal(20); pros::Distance distcal(20);
bool good = false; bool good = false;
while (!good) { while (!good) {
if (!(distcal.get() < 35)) { if (!(distcal.get() < 35)) {
// pull.moveVoltage(-12000); // pull.moveVoltage(-12000);
pull.moveVoltage(12000); pull.moveVoltage(12000);
} else { } else {
pullback = false; pullback = false;
ready = true; ready = true;
good = true; good = true;
pull.moveVoltage(0); pull.moveVoltage(0);
pull.tarePosition(); pull.tarePosition();
} }
}
drive->setMaxVelocity(300);
drive->turnAngle(30_deg);
drive->setMaxVelocity(600);
} drive->moveDistance(-7.1_ft);
drive->setMaxVelocity(300);
drive->turnAngle(30_deg);
drive->setMaxVelocity(600);
drive->moveDistance(-7.1_ft); pros::delay(500);
double yaw = IMU.get_heading();
pros::delay(500);
double yaw = IMU.get_heading();
std::printf("%f\n", yaw); std::printf("%f\n", yaw);
double turn = -60 - yaw; double turn = -60 - yaw;
drive->setMaxVelocity(300); drive->setMaxVelocity(300);
drive->turnAngle(turn * 1_deg); drive->turnAngle(turn * 1_deg);
pros::delay(300);
drive->moveDistanceAsync(-5_ft);
pros::delay(2000);
piston.set_value(true); pros::delay(300);
drive->moveDistanceAsync(-5_ft);
pros::delay(2000);
piston.set_value(true);
//drive->turnAngle(90_deg); // drive->turnAngle(90_deg);
yaw = IMU.get_heading(); yaw = IMU.get_heading();
turn = 30 - yaw; turn = 30 - yaw;
drive->turnAngle(turn*1_deg); drive->turnAngle(turn * 1_deg);
drive->moveDistance(-3_ft);
drive->turnAngle(90_deg); drive->moveDistance(-3_ft);
drive->moveDistance(-4_ft);
}
if (autonpick == -1) {
drive->turnAngle(90_deg); drive->turnAngle(90_deg);
} drive->moveDistance(-4_ft);
if (autonpick == 4) {
float x = sqrt(8);
drive->moveDistance(x * -1_ft);
pros::delay(500);
drive->moveDistance(0.5_ft);
} }
if (autonpick == 5) { if (autonpick == 5) {
pull.moveRelative(900, 1000000); pros::Distance distforward(17);
// drive->moveDistanceAsync(500_ft);
drive->getModel()->setBrakeMode(okapi::AbstractMotor::brakeMode::hold);
// piston.set_value(true);
// NEED TO WRTIE IMU CENTER CODE
// update IMU each cycle to get true rotation
while (distforward.get() > 320) {
drive->getModel()->curvature(12000, IMU.get_rotation() * -0.04);
// printf("%i\n", distforward.get());
pros::delay(10);
}
// piston.set_value(false);
drive->stop();
funnypiston.set_value(true);
pros::delay(500);
auto starttime = Timer().millis();
while (Timer().millis() < starttime + 1.5_s ) {
drive->getModel()->curvature(-12000 , IMU.get_rotation() * -0.04);
// printf("%i\n", distforward.get());
pros::delay(10);
}
// piston.set_value(false);
drive->stop();
funnypiston.set_value(true);
pros::delay(500);
drive->moveDistance(1_in);
// drive->turnAngle(15_deg);
//drive->moveDistance(-3.8_ft);
//drive->turnAngle(90_deg);
bool imuholdarray[10];
while (!is_held(imuholdarray, (abs(68.0 - IMU.get_rotation()) < 1)) ) {
drive->getModel()->rotate((68.0 - IMU.get_rotation()) * 0.008 );
pros::delay(10);
}
drive->getModel()->stop();
funnypiston.set_value(false);
drive->moveDistance(2_ft);
drive->moveDistance(-2_ft);
funnypiston.set_value(true);
drive->moveDistance(2_ft);
drive->moveDistance(-2_ft);
funnypiston.set_value(false);
drive->turnAngle(45_deg);
drive->moveDistance(-2_ft);
drive->moveDistance(1_ft);
} }
if (autonpick==6) { if (autonpick == 6) {
drive->moveDistance(-1.95_ft); drive->setMaxVelocity(600);
drive->moveDistance(1_ft); float x = 2;
drive->moveDistance(x * -1_ft);
pros::delay(500);
drive->moveDistance(0.5_ft);
} }
} }
@ -411,16 +457,11 @@ void opcontrol() {
// pros::delay(100); // pros::delay(100);
std::shared_ptr<ChassisController> drive = std::shared_ptr<ChassisController> drive =
ChassisControllerBuilder() ChassisControllerBuilder()
.withMotors( .withMotors({-1, -2, -3, -5}, {7, 8, 9, 10})
{
-5,
-6,
-7,
},
{1, 2, 3})
// Green gearset, 4 in wheel diam, 11.5 in wheel track // Green gearset, 4 in wheel diam, 11.5 in wheel track
.withDimensions({AbstractMotor::gearset::blue, (48.0 / 36.0)}, .withDimensions({AbstractMotor::gearset::blue, (48.0 / 36.0)},
{{3.25_in, 12_in}, imev5BlueTPR}) {{3.25_in, 11.2_in}, imev5BlueTPR})
.build(); .build();
Controller controller; Controller controller;
@ -430,32 +471,27 @@ void opcontrol() {
pros::ADIDigitalOut funnypiston(3); pros::ADIDigitalOut funnypiston(3);
pros::ADIDigitalOut upflap(8); pros::ADIDigitalOut upflap(8);
Motor leftMotor1(-5); Motor leftMotor1(-1);
Motor leftMotor2(-6); Motor leftMotor2(-2);
Motor leftMotor3(-7); Motor leftMotor3(-3);
Motor leftMotor4(-5);
Motor rightMotor1(1); Motor rightMotor1(7);
Motor rightMotor2(2); Motor rightMotor2(8);
Motor rightMotor3(3); Motor rightMotor3(9);
Motor rightMotor4(10);
//lift on Ltrig // lift on Ltrig
// intake on A // intake on A
leftMotor1.setBrakeMode(okapi::AbstractMotor::brakeMode::brake); drive->getModel()->setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
leftMotor2.setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
leftMotor3.setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
rightMotor1.setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
rightMotor2.setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
rightMotor3.setBrakeMode(okapi::AbstractMotor::brakeMode::brake);
bool flipped = false; bool flipped = false;
Motor flywheel(15); Motor flywheel(15);
Motor pull(12); Motor pull(12);
//pull.setReversed(true); // pull.setReversed(true);
Motor lift(18); Motor lift(18);
@ -469,10 +505,10 @@ void opcontrol() {
// MotorGroup pull = MotorGroup({pull1, pull2}); // MotorGroup pull = MotorGroup({pull1, pull2});
flywheel.setBrakeMode(okapi::AbstractMotor::brakeMode::coast); flywheel.setBrakeMode(okapi::AbstractMotor::brakeMode::coast);
flywheel.setGearing(okapi::AbstractMotor::gearset::blue); //should be red for cata flywheel.setGearing(
okapi::AbstractMotor::gearset::blue); // should be red for cata
pull.setBrakeMode(okapi::AbstractMotor::brakeMode::coast); pull.setBrakeMode(okapi::AbstractMotor::brakeMode::coast);
lift.setBrakeMode(okapi::AbstractMotor::brakeMode::hold); lift.setBrakeMode(okapi::AbstractMotor::brakeMode::hold);
ControllerButton R2(ControllerDigital::R2); ControllerButton R2(ControllerDigital::R2);
@ -489,7 +525,6 @@ void opcontrol() {
ControllerButton leftarrow(ControllerDigital::left); ControllerButton leftarrow(ControllerDigital::left);
ControllerButton Abutton(ControllerDigital::A); ControllerButton Abutton(ControllerDigital::A);
ControllerButton uparrow(ControllerDigital::up); ControllerButton uparrow(ControllerDigital::up);
ControllerButton Xbutton(ControllerDigital::X); ControllerButton Xbutton(ControllerDigital::X);
@ -505,14 +540,14 @@ void opcontrol() {
flaparr[i] = false; flaparr[i] = false;
} }
bool l1toggle[10]; bool l1toggle[10];
for (int i=0; i<10; i++) { for (int i = 0; i < 10; i++) {
l1toggle[i] = false; l1toggle[i] = false;
} }
bool l2toggle[10]; bool l2toggle[10];
for (int i=0; i < 10; i++) { for (int i = 0; i < 10; i++) {
l2toggle[i] = false; l2toggle[i] = false;
} }
bool pullback = false; bool pullback = false;
@ -558,11 +593,10 @@ void opcontrol() {
} }
bool barr[10]; bool barr[10];
for (int i = 0; i < 10; i++){ for (int i = 0; i < 10; i++) {
barr[i] = false; barr[i] = false;
} }
bool funnypistonstatus = false; bool funnypistonstatus = false;
auto IMU = okapi::IMU(19, IMUAxes::z); auto IMU = okapi::IMU(19, IMUAxes::z);
bool reqtoloop = false; bool reqtoloop = false;
@ -589,20 +623,20 @@ void opcontrol() {
// every 10 ms. // every 10 ms.
float lsum = leftMotor1.getTemperature() + leftMotor2.getTemperature() + float lsum = leftMotor1.getTemperature() + leftMotor2.getTemperature() +
leftMotor3.getTemperature(); leftMotor3.getTemperature() + leftMotor4.getTemperature();
float lavg = lsum / 3; float lavg = lsum / 4;
float rsum = rightMotor1.getTemperature() + float rsum =
rightMotor2.getTemperature() + rightMotor1.getTemperature() + rightMotor2.getTemperature() +
rightMotor3.getTemperature(); rightMotor3.getTemperature() + rightMotor4.getTemperature();
float ravg = rsum / 3; float ravg = rsum / 4;
if (lavg > 150) { if (lavg > 150) {
lavg = -9; lavg = -9;
} }
if (ravg >150) { if (ravg > 150) {
ravg = -9; ravg = -9;
} }
if (pullback) { if (pullback) {
if (!(dist.get() < 35)) { if (!(dist.get() < 35)) {
@ -626,9 +660,9 @@ void opcontrol() {
tcount++; tcount++;
} }
if(is_tapped(l1toggle, L1.isPressed() )) { if (is_tapped(l1toggle, L1.isPressed())) {
flapsOn = !flapsOn; flapsOn = !flapsOn;
} }
if (is_tapped(manpullarr, if (is_tapped(manpullarr,
(uparrow.isPressed() && Xbutton.isPressed()))) { (uparrow.isPressed() && Xbutton.isPressed()))) {
@ -673,7 +707,7 @@ void opcontrol() {
tempaselect = tempaselect - 1; tempaselect = tempaselect - 1;
} }
if (is_tapped(a, Abutton.isPressed())) { if (is_tapped(a, Abutton.isPressed())) {
// write to file; // write to file;
FILE *autofile = fopen("/usd/auto.txt", "w"); FILE *autofile = fopen("/usd/auto.txt", "w");
fprintf(autofile, "%d", tempaselect); fprintf(autofile, "%d", tempaselect);
fclose(autofile); fclose(autofile);
@ -692,66 +726,64 @@ void opcontrol() {
funnypiston.set_value(funnypistonstatus); funnypiston.set_value(funnypistonstatus);
pros::lcd::set_text(1, std::to_string(tcount)); pros::lcd::set_text(1, std::to_string(tcount));
if (!flipperstatus) { if (flipperstatus) {
pros::lcd::set_text(0, "flip f flippcmdreceive"); pros::lcd::set_text(0, "flip f flippcmdreceive");
drive = ChassisControllerBuilder() drive = ChassisControllerBuilder()
.withMotors({-5, -6, -7}, {1, 2, 3}) .withMotors({-7, -8, -9, -10}, {1, 2, 3, 5})
.withDimensions( .withDimensions(
{AbstractMotor::gearset::blue, (48.0 / 36.0)}, {AbstractMotor::gearset::blue, (48.0 / 36.0)},
{{3.25_in, 12_in}, imev5BlueTPR}) {{3.25_in, 11.2_in}, imev5BlueTPR})
.build();
flipped = false;
}
if (flipperstatus) {
pros::lcd::set_text(0, "flip b flippcmdreceive");
drive = ChassisControllerBuilder()
.withMotors({-1, -2, -3}, {5, 6, 7})
.withDimensions(
{AbstractMotor::gearset::blue, (48.0 / 36.0)},
{{3.25_in, 12_in}, imev5BlueTPR})
.build(); .build();
flipped = true; flipped = true;
} }
if (!flipperstatus) {
pros::lcd::set_text(0, "flip b flippcmdreceive");
drive = ChassisControllerBuilder()
.withMotors({-1, -2, -3, -5}, {7, 8, 9, 10})
.withDimensions(
{AbstractMotor::gearset::blue, (48.0 / 36.0)},
{{3.25_in, 11.2_in}, imev5BlueTPR})
.build();
flipped = false;
}
// if (R1.isPressed()) { // if (R1.isPressed()) {
// flywheel.moveVoltage(-12000); // flywheel.moveVoltage(-12000);
// } // }
// else { // else {
// flywheel.moveVoltage(0); // flywheel.moveVoltage(0);
// } // }
// if (fly.isPressed()) { // if (fly.isPressed()) {
// pullback = true; // pullback = true;
// pros::lcd::set_text(5, "hit while not"); // pros::lcd::set_text(5, "hit while not");
// } // }
// if (is_tapped(loopmodearr, downarrow.isPressed())) { // if (is_tapped(loopmodearr, downarrow.isPressed())) {
// lmode = !lmode; // lmode = !lmode;
// //lmode = false; // //lmode = false;
// } // }
// // printf("%i",dist.get()); // // printf("%i",dist.get());
// if (is_held(distarr, dististriball.get() < 70) && lmode) { // if (is_held(distarr, dististriball.get() < 70) && lmode) {
// reqtoloop = true; // reqtoloop = true;
// // printf("raaaaaaaaaaaaaa"); // // printf("raaaaaaaaaaaaaa");
// } // }
if (is_tapped(r1arr, R1.isPressed()) || reqtoloop == true) { if (is_tapped(r1arr, R1.isPressed()) || reqtoloop == true) {
float temp = std::fmod(pull.getPosition(), 900); float temp = std::fmod(pull.getPosition(), 900);
pros::lcd::set_text(6,std::to_string(temp)); pros::lcd::set_text(6, std::to_string(temp));
if ((900 - temp) < 150) { if ((900 - temp) < 150) {
temp = -(900 - temp); temp = -(900 - temp);
pros::lcd::set_text(7,std::to_string(temp)); pros::lcd::set_text(7, std::to_string(temp));
} }
pull.moveRelative( pull.moveRelative(
(900 - (900 -
temp), // pull.moveRelative((1800 - temp), // pull.moveRelative((1800
// std::fmod(pull.getPosition(), 1800)), //- std::fmod(pull.getPosition(),
// 1800)),
10000000); 10000000);
reqtoloop = false; reqtoloop = false;
@ -767,34 +799,24 @@ void opcontrol() {
} }
// if (dist.get() < 40 && // if (dist.get() < 40 &&
// (std::abs(pull.getPosition() - pull.getTargetPosition()) < 5)) { // (std::abs(pull.getPosition() - pull.getTargetPosition()) <
// pull.moveVoltage(0); // 5)) { 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()));
// pros::lcd::set_text(5, std::to_string(IMU.get()));
//pros::lcd::set_text(5, std::to_string(IMU.get()));
pros::lcd::set_text(5,std::to_string(pull.getPosition()));
pros::lcd::set_text(5, std::to_string(pull.getPosition()));
controller.setText( controller.setText(
0, 0, 0, 0,
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()))
);
);
pros::delay(10); pros::delay(10);
} }
} }