mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpimath] Fix dt type in C++ tests (#8179)
The UKF test was calling `.value()` on an implicit `units::millisecond_t` type assuming it was `units::second_t`. I normalized the rest of the dt declarations while I was at it.
This commit is contained in:
@@ -20,7 +20,7 @@ TEST(DifferentialDriveFeedforwardTest, CalculateWithTrackwidth) {
|
||||
constexpr auto kVAngular = 1_V / 1_rad_per_s;
|
||||
constexpr auto kAAngular = 1_V / 1_rad_per_s_sq;
|
||||
constexpr auto trackwidth = 1_m;
|
||||
constexpr auto dt = 20_ms;
|
||||
constexpr units::second_t dt = 20_ms;
|
||||
|
||||
frc::DifferentialDriveFeedforward differentialDriveFeedforward{
|
||||
kVLinear, kALinear, kVAngular, kAAngular, trackwidth};
|
||||
@@ -54,7 +54,7 @@ TEST(DifferentialDriveFeedforwardTest, CalculateWithoutTrackwidth) {
|
||||
constexpr auto kALinear = 1_V / 1_mps_sq;
|
||||
constexpr auto kVAngular = 1_V / 1_mps;
|
||||
constexpr auto kAAngular = 1_V / 1_mps_sq;
|
||||
constexpr auto dt = 20_ms;
|
||||
constexpr units::second_t dt = 20_ms;
|
||||
|
||||
frc::DifferentialDriveFeedforward differentialDriveFeedforward{
|
||||
kVLinear, kALinear, kVAngular, kAAngular};
|
||||
|
||||
Reference in New Issue
Block a user