[commands] Fix SysIdRoutine naming (#6277)

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.
This commit is contained in:
Asa Paparo
2024-01-21 01:10:19 -05:00
committed by GitHub
parent 3928ed5647
commit 19c1556472
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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