From 94e0c6bf7a857885ac28bffcae7998bbf8b3ed4c Mon Sep 17 00:00:00 2001 From: Jess Zarchi Date: Tue, 17 Dec 2024 14:43:17 -0800 Subject: [PATCH] Fixed mistakes in all swing motion comments Ran clangd on all .hpp files --- include/EZ-Template/PID.hpp | 12 ++++----- include/EZ-Template/drive/drive.hpp | 38 +++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/include/EZ-Template/PID.hpp b/include/EZ-Template/PID.hpp index 66d78950..7aebb1a9 100644 --- a/include/EZ-Template/PID.hpp +++ b/include/EZ-Template/PID.hpp @@ -102,8 +102,8 @@ class PID { double compute(double current); /** - * Computes PID, but you compute the error yourself. - * + * Computes PID, but you compute the error yourself. + * * Current is only used here for calculative derivative to solve derivative kick. * * \param err @@ -247,8 +247,8 @@ class PID { std::string name_get(); /** - * Enables / disables i resetting when sgn of error changes. - * + * Enables / disables i resetting when sgn of error changes. + * * True resets, false doesn't. * * \param toggle @@ -257,8 +257,8 @@ class PID { void i_reset_toggle(bool toggle); /** - * Returns if i will reset when sgn of error changes. - * + * Returns if i will reset when sgn of error changes. + * * True resets, false doesn't. */ bool i_reset_get(); diff --git a/include/EZ-Template/drive/drive.hpp b/include/EZ-Template/drive/drive.hpp index 6a4004d0..c64494a0 100644 --- a/include/EZ-Template/drive/drive.hpp +++ b/include/EZ-Template/drive/drive.hpp @@ -1153,7 +1153,7 @@ class Drive { /** * Adds/removes motors from drive. - * + * * You cannot add the first index because it's used for autonomous. * * \param pto_list @@ -2069,6 +2069,8 @@ class Drive { * target value as a double, unit is degrees * \param speed * 0 to 127, max speed during motion + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw */ void pid_swing_set(e_swing type, double target, int speed, e_angle_behavior behavior); @@ -2081,6 +2083,8 @@ class Drive { * target value as a double, unit is degrees * \param speed * 0 to 127, max speed during motion + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, double target, int speed, bool slew_on); @@ -2093,6 +2097,8 @@ class Drive { * target value as a double, unit is degrees * \param speed * 0 to 127, max speed during motion + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, double target, int speed, e_angle_behavior behavior, bool slew_on); @@ -2135,6 +2141,8 @@ class Drive { * 0 to 127, max speed during motion * \param opposite_speed * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, double target, int speed, int opposite_speed, bool slew_on); @@ -2149,6 +2157,10 @@ class Drive { * 0 to 127, max speed during motion * \param opposite_speed * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, double target, int speed, int opposite_speed, e_angle_behavior behavior, bool slew_on); @@ -2161,8 +2173,6 @@ class Drive { * target value in okapi angle units * \param speed * 0 to 127, max speed during motion - * \param opposite_speed - * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed); @@ -2175,8 +2185,8 @@ class Drive { * target value in okapi angle units * \param speed * 0 to 127, max speed during motion - * \param opposite_speed - * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, e_angle_behavior behavior); @@ -2189,6 +2199,8 @@ class Drive { * target value in okapi angle units * \param speed * 0 to 127, max speed during motion + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, bool slew_on); @@ -2201,6 +2213,10 @@ class Drive { * target value in okapi angle units * \param speed * 0 to 127, max speed during motion + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, e_angle_behavior behavior, bool slew_on); @@ -2229,6 +2245,8 @@ class Drive { * 0 to 127, max speed during motion * \param opposite_speed * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, int opposite_speed, e_angle_behavior behavior); @@ -2243,6 +2261,8 @@ class Drive { * 0 to 127, max speed during motion * \param opposite_speed * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, int opposite_speed, bool slew_on); @@ -2257,6 +2277,10 @@ class Drive { * 0 to 127, max speed during motion * \param opposite_speed * -127 to 127, max speed of the opposite side of the drive during the swing. this is used for arcs, and is defaulted to 0 + * \param behavior + * changes what direction the robot will turn. can be left, right, shortest, longest, raw + * \param slew_on + * ramp up from a lower speed to your target speed */ void pid_swing_set(e_swing type, okapi::QAngle p_target, int speed, int opposite_speed, e_angle_behavior behavior, bool slew_on); @@ -2617,7 +2641,7 @@ class Drive { * Changes max speed during a drive motion. * * \param speed - * new clipped speed, between 0 and 127 + * new clipped speed, between 0 and 127 */ void pid_speed_max_set(int speed); @@ -3228,7 +3252,7 @@ class Drive { /** * Checks if PID Tuner is enabled. - * + * * True is enabled, false is disabled. */ bool pid_tuner_enabled();