prep stuff

This commit is contained in:
ary 2023-10-18 00:05:32 -04:00
parent 9cadf951d1
commit 445c9dcf35
4 changed files with 18 additions and 18 deletions

View File

@ -2,7 +2,8 @@
#include "ary-lib/drive/drive.hpp"
void test_auton();
void near_side();
void far_side();
void default_constants();
void exit_condition_defaults();

View File

@ -18,7 +18,7 @@ using namespace superstruct;
chassis.wait_until(double measurement) -> Waits for the drivetrain to reach a certain measurement before performing the next task.
*/
void test_auton() {
void near_side() {
// Score the triball preload
driveSync(107, true); // Go forward
@ -42,4 +42,7 @@ void test_auton() {
// chassis.set_drive_pid(2, DRIVE_SPEED, false, true);
// chassis.wait_drive();
}
//pros::task_t intakeTask(run_intake_for, (void*) malloc(sizeof(double)), TASK_PRIORITY_DEFAULT, TASK_STACK_DEPTH_DEFAULT, "runIntakeFor");
void far_side() {
}

View File

@ -1,3 +1,10 @@
/*
globals.cpp
Contains all devices and electronics used for the robot
Holds other mechanicsm classes.
*/
#include "globals.hpp"
using namespace ary;
@ -18,8 +25,7 @@ namespace globals {
pros::Motor_Group right_drive({ motor_trf, motor_trb, motor_brf, motor_brb });
// Electronics / Pneumatics / Sensors
pros::Rotation rot_vert(0);
pros::Rotation rot_horiz(1);
pros::Distance intake_dist_sens(21);
pros::ADIDigitalOut pto_piston('A');
@ -32,17 +38,6 @@ namespace globals {
Wings wings;
lemlib::Drivetrain_t chassis_odom {
&left_drive,
&right_drive,
TRACK_WIDTH,
WHEEL_SIZE,
DRIVE_RPM
};
lemlib::TrackingWheel vert_tracking_wheel(&rot_vert, WHEEL_SIZE, PLACEHOLDER_TC_OFFSET, 1); // subject to change: p3 -> tracking center offset
lemlib::TrackingWheel hroiz_tracking_wheel(&rot_horiz, WHEEL_SIZE, PLACEHOLDER_TC_OFFSET, 1);
Drive chassis(
{-2, -6, 12, 5},
{-16, 1, 4, -3},

View File

@ -22,10 +22,11 @@ void initialize() {
configureExitConditions();
ary::autonselector::auton_selector.add_autons({
Auton("Exhibit One\n\nyo mama", test_auton) // TODO: Change this before putting this in the notebook LOL
Auton("Near side (close to alliance goal) \n\nTo run when near alliance goal", near_side), // TODO: Change this before putting this in the notebook LOL
Auton("Far side (far from alliance goal) \n\nTo run hwhen far from alliance goal", far_side)
});
motorsCoast();
motorsCoast(); // Allow the motors to coast initially
chassis.initialize();
ary::autonselector::initialize();