diff --git a/RELENTLESS/include/ary-lib/util.hpp b/RELENTLESS/include/ary-lib/util.hpp index 741ea28..9c27214 100644 --- a/RELENTLESS/include/ary-lib/util.hpp +++ b/RELENTLESS/include/ary-lib/util.hpp @@ -22,7 +22,7 @@ namespace ary { /** * Prints our branding all over your pros terminal */ -void print_ez_template(); +void printScr(); /** * Prints to the brain screen in one string. Splits input between lines with diff --git a/RELENTLESS/src/ary-lib/util.cpp b/RELENTLESS/src/ary-lib/util.cpp index 62a9060..23fe3cf 100644 --- a/RELENTLESS/src/ary-lib/util.cpp +++ b/RELENTLESS/src/ary-lib/util.cpp @@ -11,7 +11,7 @@ pros::Controller master(pros::E_CONTROLLER_MASTER); namespace ary { int mode = DISABLE; -void print_ez_template() { +void printScr() { std::cout << R"( diff --git a/RELENTLESS/src/main.cpp b/RELENTLESS/src/main.cpp index 5183345..a9df491 100644 --- a/RELENTLESS/src/main.cpp +++ b/RELENTLESS/src/main.cpp @@ -1,3 +1,9 @@ +/* + main.cpp + + The entry point for the bot +*/ + #include "main.h" #include "wings.h" @@ -13,17 +19,27 @@ e_controlsch currentuser = RENU; * to keep execution time for this mode under a few seconds. */ void initialize() { - ary::print_ez_template(); + ary::printScr(); - pros::delay(500); // legacy ports configure + pros::delay(500); // Give time for legacy ports configure + /* + Construct the chassis and it's constants + chassisInit() -> Adjusts drive curves, active brake constants, among other things + configureConstants() -> Sets PID constants on the chassis + configureExitConditions() -> Sets default values for PID Exit conditions + */ chassisInit(); configureConstants(); configureExitConditions(); + + /* + Add autonomous paths to the auto selection + */ ary::autonselector::auton_selector.add_autons({ - 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) + Auton("Near side (close to alliance goal) \n\nTo run when near alliance goal", near_side), + Auton("Far side (far from alliance goal) \n\nTo run when far from alliance goal", far_side) }); motorsCoast(); // Allow the motors to coast initially @@ -32,57 +48,24 @@ void initialize() { ary::autonselector::initialize(); } -/** - * Runs while the robot is in the disabled state of Field Management System or - * the VEX Competition Switch, following either autonomous or opcontrol. When - * the robot is enabled, this task will exit. - */ void disabled() {} - -/** - * Runs after initialize(), and before autonomous when connected to the Field - * Management System or the VEX Competition Switch. This is intended for - * competition-specific initialization routines, such as an autonomous selector - * on the LCD. - * - * This task will exit when the robot is enabled and autonomous or opcontrol - * starts. - */ void competition_initialize() {} -/** - * Runs the user autonomous code. This function will be started in its own task - * with the default priority and stack size whenever the robot is enabled via - * the Field Management System or the VEX Competition Switch in the autonomous - * mode. Alternatively, this function may be called in initialize or opcontrol - * for non-competition testing purposes. - * - * If the robot is disabled or communications is lost, the autonomous task - * will be stopped. Re-enabling the robot will restart the task, not re-start it - * from where it left off. - */ void autonomous() { autonomousResets(); ary::autonselector::auton_selector.call_selected_auton(); } -/** - * Runs the operator control code. This function will be started in its own task - * with the default priority and stack size whenever the robot is enabled via - * the Field Management System or the VEX Competition Switch in the operator - * control mode. - * - * If no competition control is connected, this function will run immediately - * following initialize(). - * - * If the robot is disabled or communications is lost, the - * operator control task will be stopped. Re-enabling the robot will restart the - * task, not resume it from where it left off. - */ void opcontrol() { - opControlInit(); + opControlInit(); // Configure the chassis for driver control while (true) { + + /* + Handle controls for whoever is driving the bot at the moment, each available user a respective set of controls' + Available Options: + RENU, RIA, CHRIS + */ if (currentuser == RENU) { chassis.tank_control(); renu_control();