Minor improvements/fixes to new command framework (#2186)

This commit is contained in:
Oblarg
2019-12-23 02:09:25 -05:00
committed by Peter Johnson
parent 1ce24a7a2f
commit 67b59f2b31
9 changed files with 107 additions and 38 deletions

View File

@@ -32,9 +32,13 @@ class ProfiledPIDSubsystem : public SubsystemBase {
* Creates a new ProfiledPIDSubsystem.
*
* @param controller the ProfiledPIDController to use
* @param initialPosition the initial goal position of the subsystem
*/
explicit ProfiledPIDSubsystem(frc::ProfiledPIDController<Distance> controller)
: m_controller{controller} {}
explicit ProfiledPIDSubsystem(frc::ProfiledPIDController<Distance> controller,
Distance_t initialPosition = Distance_t{0})
: m_controller{controller} {
SetGoal(initialPosition);
}
void Periodic() override {
if (m_enabled) {