diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a482260d..07fe968f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug Report about: Create a report to help us improve -title: "\U0001F41B[BUG] - " +title: "\U0001F41B - " labels: bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature-request-template.md b/.github/ISSUE_TEMPLATE/feature-request-template.md index 41cb2877..96411760 100644 --- a/.github/ISSUE_TEMPLATE/feature-request-template.md +++ b/.github/ISSUE_TEMPLATE/feature-request-template.md @@ -1,7 +1,7 @@ --- name: Feature Request about: Suggest an idea for this project -title: "✨[FEATURE] - " +title: "✨ - " labels: enhancement assignees: '' --- diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b22f6c71..4aa26461 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,10 +17,10 @@ jobs: - name: Run LemLib/pros-build id: test - uses: LemLib/pros-build@v2.0.1 + uses: LemLib/pros-build@v3.0.0 - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: ${{ steps.test.outputs.name }} - path: ${{ github.workspace }}/template/* + path: ${{ github.workspace }}/template/* \ No newline at end of file diff --git a/EZ-Template-Example-Project.zip b/EZ-Template-Example-Project.zip index 42b2a129..60707b6c 100644 Binary files a/EZ-Template-Example-Project.zip and b/EZ-Template-Example-Project.zip differ diff --git a/EZ-Template-Example-Project/EZ-Template@3.2.1.zip b/EZ-Template-Example-Project/EZ-Template@3.2.1.zip deleted file mode 100644 index e9e26513..00000000 Binary files a/EZ-Template-Example-Project/EZ-Template@3.2.1.zip and /dev/null differ diff --git a/EZ-Template-Example-Project/EZ-Template@3.2.2.zip b/EZ-Template-Example-Project/EZ-Template@3.2.2.zip new file mode 100644 index 00000000..bf022369 Binary files /dev/null and b/EZ-Template-Example-Project/EZ-Template@3.2.2.zip differ diff --git a/EZ-Template-Example-Project/Makefile b/EZ-Template-Example-Project/Makefile index c9c38269..4e183dad 100644 --- a/EZ-Template-Example-Project/Makefile +++ b/EZ-Template-Example-Project/Makefile @@ -14,7 +14,7 @@ INCDIR=$(ROOT)/include WARNFLAGS+= EXTRA_CFLAGS= -EXTRA_CXXFLAGS= +EXTRA_CXXFLAGS=-Wno-deprecated-enum-enum-conversion # Set to 1 to enable hot/cold linking USE_PACKAGE:=1 diff --git a/EZ-Template-Example-Project/common.mk b/EZ-Template-Example-Project/common.mk index 33efe871..a601bcaf 100644 --- a/EZ-Template-Example-Project/common.mk +++ b/EZ-Template-Example-Project/common.mk @@ -34,7 +34,7 @@ LIBRARIES+=$(wildcard $(FWDIR)/*.a) EXCLUDE_COLD_LIBRARIES+=$(FWDIR)/libc.a $(FWDIR)/libm.a COLD_LIBRARIES=$(filter-out $(EXCLUDE_COLD_LIBRARIES), $(LIBRARIES)) wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1) -LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld +LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld --no-warn-rwx-segments ASMFLAGS=$(MFLAGS) $(WARNFLAGS) CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD) diff --git a/EZ-Template-Example-Project/firmware/EZ-Template.a b/EZ-Template-Example-Project/firmware/EZ-Template.a index fb9526d3..06a1a2b1 100644 Binary files a/EZ-Template-Example-Project/firmware/EZ-Template.a and b/EZ-Template-Example-Project/firmware/EZ-Template.a differ diff --git a/EZ-Template-Example-Project/project.pros b/EZ-Template-Example-Project/project.pros index d670ed35..e68a81e1 100644 --- a/EZ-Template-Example-Project/project.pros +++ b/EZ-Template-Example-Project/project.pros @@ -5,7 +5,7 @@ "target": "v5", "templates": { "EZ-Template": { - "location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\EZ-Template@3.2.1", + "location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\EZ-Template@3.2.2", "metadata": { "origin": "local" }, @@ -13,21 +13,21 @@ "py/object": "pros.conductor.templates.local_template.LocalTemplate", "supported_kernels": "^4.1.1", "system_files": [ - "include\\EZ-Template\\slew.hpp", - "include\\EZ-Template\\piston.hpp", - "include\\EZ-Template\\api.hpp", - "include\\EZ-Template\\auton_selector.hpp", "include\\EZ-Template\\sdcard.hpp", - "include\\EZ-Template\\tracking_wheel.hpp", + "include\\EZ-Template\\api.hpp", + "include\\EZ-Template\\piston.hpp", + "include\\EZ-Template\\util.hpp", "include\\EZ-Template\\auton.hpp", + "include\\EZ-Template\\slew.hpp", "include\\EZ-Template\\PID.hpp", - "include\\EZ-Template\\util.hpp", + "include\\EZ-Template\\tracking_wheel.hpp", + "firmware\\EZ-Template.a", "include\\EZ-Template\\drive\\drive.hpp", - "firmware\\EZ-Template.a" + "include\\EZ-Template\\auton_selector.hpp" ], "target": "v5", "user_files": [], - "version": "3.2.1" + "version": "3.2.2" }, "kernel": { "location": "C:\\Users\\union\\AppData\\Roaming\\PROS\\templates\\kernel@4.1.1", diff --git a/EZ-Template-Example-Project/src/main.cpp b/EZ-Template-Example-Project/src/main.cpp index ce7bc638..79d745c4 100644 --- a/EZ-Template-Example-Project/src/main.cpp +++ b/EZ-Template-Example-Project/src/main.cpp @@ -15,12 +15,13 @@ ez::Drive chassis( 4.125, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!) 343); // Wheel RPM = cartridge * (motor gear / wheel gear) -// Are you using tracking wheels? Comment out which ones you're using here! -// `2.75` is the wheel diameter -// `4.0` is the distance from the center of the wheel to the center of the robot -// ez::tracking_wheel right_tracker({-'A', -'B'}, 2.75, 4.0); // ADI Encoders -// ez::tracking_wheel left_tracker(1, {'C', 'D'}, 2.75, 4.0); // ADI Encoders plugged into a Smart port -// ez::tracking_wheel horiz_tracker(1, 2.75, 4.0); // Rotation sensors +// Uncomment the trackers you're using here! +// - `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 +// - `2.75` is the wheel diameter +// - `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 vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels /** * Runs initialization code. This occurs as soon as the program is started. @@ -34,10 +35,14 @@ void initialize() { pros::delay(500); // Stop the user from doing anything while legacy ports configure - // Are you using tracking wheels? Comment out which ones you're using here! - // chassis.odom_tracker_right_set(&right_tracker); - // chassis.odom_tracker_left_set(&left_tracker); - // chassis.odom_tracker_back_set(&horiz_tracker); // Replace `back` to `front` if your tracker is in the front! + // Look at your horizontal tracking wheel and decide if it's in front of the midline of your robot or behind it + // - change `back` to `front` if the tracking wheel is in front of the midline + // - ignore this if you aren't using a horizontal tracker + // chassis.odom_tracker_back_set(&horiz_tracker); + // Look at your vertical tracking wheel and decide if it's to the left or right of the center of the robot + // - change `left` to `right` if the tracking wheel is to the right of the centerline + // - ignore this if you aren't using a vertical tracker + // chassis.odom_tracker_left_set(&vert_tracker); // Configure your chassis controls chassis.opcontrol_curve_buttons_toggle(true); // Enables modifying the controller curve with buttons on the joysticks @@ -66,7 +71,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}, {"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}, - {"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", 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}, }); // Initialize chassis and auton selector diff --git a/EZ-Template@3.2.1.zip b/EZ-Template@3.2.1.zip deleted file mode 100644 index e9e26513..00000000 Binary files a/EZ-Template@3.2.1.zip and /dev/null differ diff --git a/EZ-Template@3.2.2.zip b/EZ-Template@3.2.2.zip new file mode 100644 index 00000000..bf022369 Binary files /dev/null and b/EZ-Template@3.2.2.zip differ diff --git a/Makefile b/Makefile index 66c1449f..5b318ece 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ INCDIR=$(ROOT)/include WARNFLAGS+= EXTRA_CFLAGS= -EXTRA_CXXFLAGS= +EXTRA_CXXFLAGS=-Wno-deprecated-enum-enum-conversion # Set to 1 to enable hot/cold linking USE_PACKAGE:=1 @@ -27,7 +27,7 @@ EXCLUDE_COLD_LIBRARIES:= IS_LIBRARY:=1 # TODO: CHANGE THIS! LIBNAME:=EZ-Template -VERSION:=3.2.1 +VERSION:=3.2.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))) diff --git a/common.mk b/common.mk index 33efe871..a601bcaf 100644 --- a/common.mk +++ b/common.mk @@ -34,7 +34,7 @@ LIBRARIES+=$(wildcard $(FWDIR)/*.a) EXCLUDE_COLD_LIBRARIES+=$(FWDIR)/libc.a $(FWDIR)/libm.a COLD_LIBRARIES=$(filter-out $(EXCLUDE_COLD_LIBRARIES), $(LIBRARIES)) wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1) -LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld +LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld --no-warn-rwx-segments ASMFLAGS=$(MFLAGS) $(WARNFLAGS) CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD) diff --git a/src/EZ-Template/drive/set_pid/set_swing_pid.cpp b/src/EZ-Template/drive/set_pid/set_swing_pid.cpp index 41d2b787..38f932a6 100644 --- a/src/EZ-Template/drive/set_pid/set_swing_pid.cpp +++ b/src/EZ-Template/drive/set_pid/set_swing_pid.cpp @@ -291,9 +291,9 @@ void Drive::pid_swing_set(e_swing type, double target, int speed, int opposite_s used_motion_chain_scale = 0.0; // Flip the swing from left-right if rotation axis is flipped - if (odom_theta_direction_get()) - current_swing = type == ez::LEFT_SWING ? ez::RIGHT_SWING : ez::LEFT_SWING; - + current_swing = type; + if (odom_theta_direction_get()) + current_swing = current_swing == ez::LEFT_SWING ? ez::RIGHT_SWING : ez::LEFT_SWING; // Figure out if going forward or backward int side = type == ez::LEFT_SWING ? 1 : -1; diff --git a/src/main.cpp b/src/main.cpp index 36291630..83e72a43 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,12 +15,13 @@ ez::Drive chassis( 4.125, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!) 420.0); // Wheel RPM = cartridge * (motor gear / wheel gear) -// Are you using tracking wheels? Comment out which ones you're using here! -// `2.75` is the wheel diameter -// `4.0` is the distance from the center of the wheel to the center of the robot -// ez::tracking_wheel right_tracker({-'A', -'B'}, 2.75, 4.0); // ADI Encoders -// ez::tracking_wheel left_tracker(1, {'C', 'D'}, 2.75, 4.0); // ADI Encoders plugged into a Smart port -// ez::tracking_wheel horiz_tracker(1, 2.75, 4.0); // Rotation sensors +// Uncomment the trackers you're using here! +// - `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 +// - `2.75` is the wheel diameter +// - `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 vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels /** * Runs initialization code. This occurs as soon as the program is started. @@ -34,10 +35,14 @@ void initialize() { pros::delay(500); // Stop the user from doing anything while legacy ports configure - // Are you using tracking wheels? Comment out which ones you're using here! - // chassis.odom_tracker_right_set(&right_tracker); - // chassis.odom_tracker_left_set(&left_tracker); - // chassis.odom_tracker_back_set(&horiz_tracker); // Replace `back` to `front` if your tracker is in the front! + // Look at your horizontal tracking wheel and decide if it's in front of the midline of your robot or behind it + // - change `back` to `front` if the tracking wheel is in front of the midline + // - ignore this if you aren't using a horizontal tracker + // chassis.odom_tracker_back_set(&horiz_tracker); + // Look at your vertical tracking wheel and decide if it's to the left or right of the center of the robot + // - change `left` to `right` if the tracking wheel is to the right of the centerline + // - ignore this if you aren't using a vertical tracker + // chassis.odom_tracker_left_set(&vert_tracker); // Configure your chassis controls chassis.opcontrol_curve_buttons_toggle(true); // Enables modifying the controller curve with buttons on the joysticks @@ -66,7 +71,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}, {"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}, - {"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", 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}, }); // Initialize chassis and auton selector diff --git a/version b/version index 0444f320..acf9bf09 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.2.1 \ No newline at end of file +3.2.2 \ No newline at end of file