mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilibcExamples] Add inline specifier to constexpr constants (#6049)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user