Updateing files to match the files from the past
This commit is contained in:
1 parent
d16e851b29
commit
4823bb5c5f
4 files changed
+32
-14
No files matched your search
Submodule
+1
Submodule Over-Ride added at 8c2e637526.
@@ -0,0 +1,10 @@
|
|||||||
|
#include "main.h"
|
||||||
|
#include "EZ-Template/api.hpp"
|
||||||
|
#include "api.h"
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
//#include "okapi/api.hpp"
|
//#include "okapi/api.hpp"
|
||||||
//#include "pros/api_legacy.h"
|
//#include "pros/api_legacy.h"
|
||||||
#include "EZ-Template/api.hpp"
|
#include "EZ-Template/api.hpp"
|
||||||
|
#include "initialize/setup.hpp"
|
||||||
|
|
||||||
// More includes here...
|
// More includes here...
|
||||||
#include "autons.hpp"
|
#include "autons.hpp"
|
||||||
|
|||||||
+20
-14
@@ -12,16 +12,16 @@ ez::Drive chassis(
|
|||||||
{-4, -5, -6}, // Right Chassis Ports (negative port will reverse it!)
|
{-4, -5, -6}, // Right Chassis Ports (negative port will reverse it!)
|
||||||
|
|
||||||
7, // IMU Port
|
7, // IMU Port
|
||||||
4.125, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!)
|
3.25, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!)
|
||||||
343); // Wheel RPM = cartridge * (motor gear / wheel gear)
|
360); // Wheel RPM = cartridge * (motor gear / wheel gear)
|
||||||
|
|
||||||
// Uncomment the trackers you're using here!
|
// Uncomment the trackers you're using here!
|
||||||
// - `8` and `9` are smart ports (making these negative will reverse the sensor)
|
// - `8` and `9` are smart ports (making these negative will reverse the sensor)
|
||||||
// - you should get positive values on the encoders going FORWARD and RIGHT
|
// - you should get positive values on the encoders going FORWARD and RIGHT
|
||||||
// - `2.75` is the wheel diameter
|
// - `2.75` is the wheel diameter
|
||||||
// - `4.0` is the distance from the center of the wheel to the center of the robot
|
// - `4.0` is the distance from the center of the wheel to the center of the robot
|
||||||
// ez::tracking_wheel horiz_tracker(8, 2.75, 4.0); // This tracking wheel is perpendicular to the drive wheels
|
// ez::tracking_wheel horiz_tracker(8, 3.25, 4.0); // This tracking wheel is perpendicular to the drive wheels
|
||||||
// ez::tracking_wheel vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels
|
// ez::tracking_wheel vert_tracker(9, 3.25, 4.0); // This tracking wheel is parallel to the drive wheels
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs initialization code. This occurs as soon as the program is started.
|
* Runs initialization code. This occurs as soon as the program is started.
|
||||||
@@ -58,7 +58,9 @@ void initialize() {
|
|||||||
|
|
||||||
// Autonomous Selector using LLEMU
|
// Autonomous Selector using LLEMU
|
||||||
ez::as::auton_selector.autons_add({
|
ez::as::auton_selector.autons_add({
|
||||||
{"Drive\n\nDrive forward and come back", drive_example},
|
//personal autons go here
|
||||||
|
|
||||||
|
/*{"Drive\n\nDrive forward and come back", drive_example},
|
||||||
{"Turn\n\nTurn 3 times.", turn_example},
|
{"Turn\n\nTurn 3 times.", turn_example},
|
||||||
{"Drive and Turn\n\nDrive forward, turn, come back", drive_and_turn},
|
{"Drive and Turn\n\nDrive forward, turn, come back", drive_and_turn},
|
||||||
{"Drive and Turn\n\nSlow down during drive", wait_until_change_speed},
|
{"Drive and Turn\n\nSlow down during drive", wait_until_change_speed},
|
||||||
@@ -71,7 +73,7 @@ void initialize() {
|
|||||||
{"Pure Pursuit Wait Until\n\nGo to (24, 24) but start running an intake once the robot passes (12, 24)", odom_pure_pursuit_wait_until_example},
|
{"Pure Pursuit Wait Until\n\nGo to (24, 24) but start running an intake once the robot passes (12, 24)", odom_pure_pursuit_wait_until_example},
|
||||||
{"Boomerang\n\nGo to (0, 24, 45) then come back to (0, 0, 0)", odom_boomerang_example},
|
{"Boomerang\n\nGo to (0, 24, 45) then come back to (0, 0, 0)", odom_boomerang_example},
|
||||||
{"Boomerang Pure Pursuit\n\nGo to (0, 24, 45) on the way to (24, 24) then come back to (0, 0, 0)", odom_boomerang_injected_pure_pursuit_example},
|
{"Boomerang Pure Pursuit\n\nGo to (0, 24, 45) on the way to (24, 24) then come back to (0, 0, 0)", odom_boomerang_injected_pure_pursuit_example},
|
||||||
{"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", measure_offsets},
|
{"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", measure_offsets},*/
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initialize chassis and auton selector
|
// Initialize chassis and auton selector
|
||||||
@@ -169,10 +171,12 @@ void ez_screen_task() {
|
|||||||
1); // Don't override the top Page line
|
1); // Don't override the top Page line
|
||||||
|
|
||||||
// Display all trackers that are being used
|
// Display all trackers that are being used
|
||||||
screen_print_tracker(chassis.odom_tracker_left, "l", 4);
|
screen_print_tracker(chassis.odom_tracker_left, "LV", 4);
|
||||||
screen_print_tracker(chassis.odom_tracker_right, "r", 5);
|
screen_print_tracker(chassis.odom_tracker_right, "RV", 5);
|
||||||
screen_print_tracker(chassis.odom_tracker_back, "b", 6);
|
screen_print_tracker(chassis.odom_tracker_back, "BH", 6);
|
||||||
screen_print_tracker(chassis.odom_tracker_front, "f", 7);
|
screen_print_tracker(chassis.odom_tracker_front, "FH", 7);
|
||||||
|
|
||||||
|
//More display code goes here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,14 +245,16 @@ void ez_template_extras() {
|
|||||||
*/
|
*/
|
||||||
void opcontrol() {
|
void opcontrol() {
|
||||||
// This is preference to what you like to drive on
|
// This is preference to what you like to drive on
|
||||||
chassis.drive_brake_set(MOTOR_BRAKE_COAST);
|
chassis.drive_brake_set(MOTOR_BRAKE_HOLD);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// Gives you some extras to make EZ-Template ezier
|
// Gives you some extras to make EZ-Template ezier
|
||||||
ez_template_extras();
|
//ez_template_extras();
|
||||||
|
|
||||||
chassis.opcontrol_tank(); // Tank control
|
//Put function you need to call in driver control here
|
||||||
// chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade
|
|
||||||
|
// chassis.opcontrol_tank(); // Tank control
|
||||||
|
chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade
|
||||||
// chassis.opcontrol_arcade_standard(ez::SINGLE); // Standard single arcade
|
// chassis.opcontrol_arcade_standard(ez::SINGLE); // Standard single arcade
|
||||||
// chassis.opcontrol_arcade_flipped(ez::SPLIT); // Flipped split arcade
|
// chassis.opcontrol_arcade_flipped(ez::SPLIT); // Flipped split arcade
|
||||||
// chassis.opcontrol_arcade_flipped(ez::SINGLE); // Flipped single arcade
|
// chassis.opcontrol_arcade_flipped(ez::SINGLE); // Flipped single arcade
|
||||||
|
|||||||
Reference in new issue
Block a user