Skip to content

Commit

Permalink
⬆️v3.2.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ssejrog committed Jul 7, 2024
1 parent 30eb8e7 commit 468d40c
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 18 deletions.
Binary file not shown.
Binary file modified EZ-Template-Example-Project/firmware/EZ-Template.a
Binary file not shown.
16 changes: 13 additions & 3 deletions EZ-Template-Example-Project/include/EZ-Template/drive/drive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ class Drive {
void drive_odom_enable(bool input);
pose odom_target = {0, 0, 0};
pose odom_current = {0, 0, 0};
pose odom_second_to_last = {0, 0, 0};
pose odom_start = {0, 0, 0};
pose odom_target_start = {0, 0, 0};
std::vector<odom> pp_movements;
std::vector<int> injected_pp_index;
int pp_index = 0;
Expand All @@ -353,8 +356,10 @@ class Drive {
void odom_reset();
bool imu_calibration_complete = false;
double angle_rad = 0.0;
void pid_turn_set(pose itarget, turn_types dir, int speed, bool slew_on = false);
void pid_turn_set(pose itarget, drive_directions dir, int speed, bool slew_on = false);
pose turn_to_point_target = {0, 0, 0};
void pid_odom_set(odom imovement, bool slew_on = false);
void pid_odom_set(std::vector<odom> imovements, bool slew_on = false);
void pid_odom_ptp_set(odom imovement, bool slew_on = false);
void pid_odom_pp_set(std::vector<odom> imovements, bool slew_on = false);
void pid_odom_injected_pp_set(std::vector<odom> imovements, bool slew_on = false);
Expand All @@ -367,7 +372,9 @@ class Drive {
double SPACING = 0.5;
double LOOK_AHEAD = 7.0;
// bool is_past_target_using_xy = false;
void pid_wait_until_pp(int index);
void pid_wait_until_index(int index);
void pid_wait_until_point(pose target);
void pid_wait_until(pose target);
double dlead = 0.375;
void pid_odom_boomerang_set(odom imovement, bool slew_on = false);
// Odometry
Expand All @@ -377,7 +384,7 @@ class Drive {
/*double h = 0, h2 = 0*/; // rad for big circle
double last_theta = 0;
// double Xx = 0, Yy = 0, Xy = 0, Yx = 0;
turn_types current_drive_direction = fwd;
drive_directions current_drive_direction = fwd;
bool ptf1_running = false;
std::vector<pose> find_point_to_face(pose current, pose target, bool set_global = false);
void raw_pid_odom_ptp_set(odom imovement, bool slew_on);
Expand All @@ -387,6 +394,9 @@ class Drive {
void pp_task();
PID xyPID;
PID aPID;
PID internal_leftPID;
PID internal_rightPID;
bool was_last_pp_mode_boomerang = false;

/////
//
Expand Down
7 changes: 3 additions & 4 deletions EZ-Template-Example-Project/include/EZ-Template/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ enum e_mode { DISABLE = 0,
TURN_TO_POINT = 3,
DRIVE = 4,
POINT_TO_POINT = 5,
PURE_PURSUIT = 6,
BOOMERANG = 7 };
PURE_PURSUIT = 6 };

/**
* Enum for turn types
*/
enum turn_types { FWD = 0,
enum drive_directions { FWD = 0,
FORWARD = FWD,
fwd = FWD,
forward = FWD,
Expand All @@ -103,7 +102,7 @@ typedef struct pose {
*/
typedef struct odom {
pose target;
turn_types turn_type;
drive_directions drive_direction;
int max_xy_speed;
} odom;

Expand Down
18 changes: 9 additions & 9 deletions EZ-Template-Example-Project/project.pros
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
"target": "v5",
"templates": {
"EZ-Template": {
"location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\[email protected].1",
"location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\[email protected].2",
"metadata": {
"origin": "local"
},
"name": "EZ-Template",
"py/object": "pros.conductor.templates.local_template.LocalTemplate",
"supported_kernels": "^4.1.0",
"system_files": [
"firmware\\EZ-Template.a",
"include\\EZ-Template\\PID.hpp",
"include\\EZ-Template\\sdcard.hpp",
"include\\EZ-Template\\auton.hpp",
"include\\EZ-Template\\util.hpp",
"include\\EZ-Template\\drive\\drive.hpp",
"include\\EZ-Template\\auton_selector.hpp",
"include\\EZ-Template\\piston.hpp",
"include\\EZ-Template\\drive\\drive.hpp",
"include\\EZ-Template\\api.hpp",
"include\\EZ-Template\\util.hpp",
"include\\EZ-Template\\slew.hpp"
"include\\EZ-Template\\PID.hpp",
"include\\EZ-Template\\auton.hpp",
"include\\EZ-Template\\slew.hpp",
"firmware\\EZ-Template.a",
"include\\EZ-Template\\sdcard.hpp"
],
"target": "v5",
"user_files": [],
"version": "3.2.0-beta.1"
"version": "3.2.0-beta.2"
},
"kernel": {
"location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\[email protected]",
Expand Down
Binary file renamed [email protected][email protected]
Binary file not shown.
Binary file renamed [email protected][email protected]
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EXCLUDE_COLD_LIBRARIES:=
IS_LIBRARY:=1
# TODO: CHANGE THIS!
LIBNAME:=EZ-Template
VERSION:=3.2.0-beta.1
VERSION:=3.2.0-beta.2
# EXCLUDE_SRC_FROM_LIB= $(SRCDIR)/unpublishedfile.c
# this line excludes opcontrol.c and similar files
EXCLUDE_SRC_FROM_LIB+=$(foreach file, $(SRCDIR)/autons $(SRCDIR)/main,$(foreach cext,$(CEXTS),$(file).$(cext)) $(foreach cxxext,$(CXXEXTS),$(file).$(cxxext)))
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0-beta.1
3.2.0-beta.2

0 comments on commit 468d40c

Please sign in to comment.