Merge "Changed profiled subsystem dt."
diff --git a/frc971/control_loops/profiled_subsystem.h b/frc971/control_loops/profiled_subsystem.h
index b9ec5c5..439f14f 100644
--- a/frc971/control_loops/profiled_subsystem.h
+++ b/frc971/control_loops/profiled_subsystem.h
@@ -229,7 +229,7 @@
double default_acceleration)
: ProfiledSubsystem<3, 1, ZeroingEstimator>(
::std::move(loop), {{ZeroingEstimator(zeroing_constants)}}),
- profile_(::aos::controls::kLoopFrequency),
+ profile_(this->loop_->plant().coefficients().dt),
range_(range),
default_velocity_(default_velocity),
default_acceleration_(default_acceleration) {
@@ -275,7 +275,7 @@
builder.add_voltage_error(this->X_hat(2, 0));
builder.add_calculated_velocity(
(position() - last_position_) /
- ::aos::time::DurationInSeconds(::aos::controls::kLoopFrequency));
+ ::aos::time::DurationInSeconds(this->loop_->plant().coefficients().dt));
builder.add_estimator_state(estimator_state);