prep stuff
This commit is contained in:
parent
9cadf951d1
commit
445c9dcf35
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
#include "ary-lib/drive/drive.hpp"
|
#include "ary-lib/drive/drive.hpp"
|
||||||
|
|
||||||
void test_auton();
|
void near_side();
|
||||||
|
void far_side();
|
||||||
|
|
||||||
void default_constants();
|
void default_constants();
|
||||||
void exit_condition_defaults();
|
void exit_condition_defaults();
|
||||||
@ -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.
|
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
|
// Score the triball preload
|
||||||
driveSync(107, true); // Go forward
|
driveSync(107, true); // Go forward
|
||||||
|
|
||||||
@ -42,4 +42,7 @@ void test_auton() {
|
|||||||
// chassis.set_drive_pid(2, DRIVE_SPEED, false, true);
|
// chassis.set_drive_pid(2, DRIVE_SPEED, false, true);
|
||||||
// chassis.wait_drive();
|
// 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
|
/*
|
||||||
|
globals.cpp
|
||||||
|
|
||||||
|
Contains all devices and electronics used for the robot
|
||||||
|
Holds other mechanicsm classes.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "globals.hpp"
|
#include "globals.hpp"
|
||||||
|
|
||||||
using namespace ary;
|
using namespace ary;
|
||||||
@ -18,8 +25,7 @@ namespace globals {
|
|||||||
pros::Motor_Group right_drive({ motor_trf, motor_trb, motor_brf, motor_brb });
|
pros::Motor_Group right_drive({ motor_trf, motor_trb, motor_brf, motor_brb });
|
||||||
|
|
||||||
// Electronics / Pneumatics / Sensors
|
// Electronics / Pneumatics / Sensors
|
||||||
pros::Rotation rot_vert(0);
|
pros::Distance intake_dist_sens(21);
|
||||||
pros::Rotation rot_horiz(1);
|
|
||||||
|
|
||||||
pros::ADIDigitalOut pto_piston('A');
|
pros::ADIDigitalOut pto_piston('A');
|
||||||
|
|
||||||
@ -32,17 +38,6 @@ namespace globals {
|
|||||||
|
|
||||||
Wings wings;
|
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(
|
Drive chassis(
|
||||||
{-2, -6, 12, 5},
|
{-2, -6, 12, 5},
|
||||||
{-16, 1, 4, -3},
|
{-16, 1, 4, -3},
|
||||||
|
|||||||
@ -22,10 +22,11 @@ void initialize() {
|
|||||||
configureExitConditions();
|
configureExitConditions();
|
||||||
|
|
||||||
ary::autonselector::auton_selector.add_autons({
|
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();
|
chassis.initialize();
|
||||||
ary::autonselector::initialize();
|
ary::autonselector::initialize();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user