Skip to content

Commit

Permalink
[commands] Fix SysIdRoutine naming (#6277)
Browse files Browse the repository at this point in the history
Previously, this used mechanism.m_subsystem.getName(), instead of mechanism.m_name, meaning differently named SysId routines from the same subsystem would clobber each other when logged.
  • Loading branch information
AngleSideAngle authored Jan 21, 2024
1 parent 3928ed5 commit 19c1556
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class SysIdRoutine extends SysIdRoutineLog {
* @param mechanism Hardware interface for the SysId routine.
*/
public SysIdRoutine(Config config, Mechanism mechanism) {
super(mechanism.m_subsystem.getName());
super(mechanism.m_name);
m_config = config;
m_mechanism = mechanism;
m_recordState = config.m_recordState != null ? config.m_recordState : this::recordState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class SysIdRoutine : public frc::sysid::SysIdRoutineLog {
* @param mechanism Hardware interface for the SysId routine.
*/
SysIdRoutine(Config config, Mechanism mechanism)
: SysIdRoutineLog(mechanism.m_subsystem->GetName()),
: SysIdRoutineLog(mechanism.m_name),
m_config(config),
m_mechanism(mechanism),
m_recordState(config.m_recordState ? config.m_recordState
Expand Down

0 comments on commit 19c1556

Please sign in to comment.