mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user