[wpilibcExamples] Add inline specifier to constexpr constants (#6049)

This commit is contained in:
ncorrea210
2023-12-14 23:52:02 -05:00
committed by GitHub
parent 85c9ae6eff
commit 8798700cec
20 changed files with 362 additions and 362 deletions

View File

@@ -22,26 +22,26 @@
*/
namespace DriveConstants {
constexpr int kLeftMotor1Port = 0;
constexpr int kLeftMotor2Port = 1;
constexpr int kRightMotor1Port = 2;
constexpr int kRightMotor2Port = 3;
inline constexpr int kLeftMotor1Port = 0;
inline constexpr int kLeftMotor2Port = 1;
inline constexpr int kRightMotor1Port = 2;
inline constexpr int kRightMotor2Port = 3;
// These are example values only - DO NOT USE THESE FOR YOUR OWN ROBOT!
// These characterization values MUST be determined either experimentally or
// theoretically for *your* robot's drive. The SysId tool provides a convenient
// method for obtaining these values for your robot.
constexpr auto ks = 1_V;
constexpr auto kv = 0.8_V * 1_s / 1_m;
constexpr auto ka = 0.15_V * 1_s * 1_s / 1_m;
inline constexpr auto ks = 1_V;
inline constexpr auto kv = 0.8_V * 1_s / 1_m;
inline constexpr auto ka = 0.15_V * 1_s * 1_s / 1_m;
constexpr double kp = 1;
inline constexpr double kp = 1;
constexpr auto kMaxSpeed = 3_mps;
constexpr auto kMaxAcceleration = 3_mps_sq;
inline constexpr auto kMaxSpeed = 3_mps;
inline constexpr auto kMaxAcceleration = 3_mps_sq;
} // namespace DriveConstants
namespace OIConstants {
constexpr int kDriverControllerPort = 0;
inline constexpr int kDriverControllerPort = 0;
} // namespace OIConstants