From 62fab6675751ac1f13a7e726ec8977fdb2887529 Mon Sep 17 00:00:00 2001 From: Drew Williams Date: Wed, 10 Apr 2024 16:21:37 -0400 Subject: [PATCH] fixed sysid examples --- .../test/native/cpp/frc2/command/sysid/SysIdRoutineTest.cpp | 2 +- .../src/main/cpp/examples/SysId/include/subsystems/Drive.h | 3 +-- .../src/main/cpp/examples/SysId/include/subsystems/Shooter.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/sysid/SysIdRoutineTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/sysid/SysIdRoutineTest.cpp index 071f79e183c..1cfe39c6ee8 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/sysid/SysIdRoutineTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/sysid/SysIdRoutineTest.cpp @@ -75,7 +75,7 @@ class SysIdRoutineTest : public ::testing::Test { frc2::sysid::SysIdRoutine m_emptySysidRoutine{ frc2::sysid::Config{std::nullopt, std::nullopt, std::nullopt, nullptr}, - frc2::sysid::Mechanism{[this](units::volt_t driveVoltage) {}, nullptr, + frc2::sysid::Mechanism{[](units::volt_t driveVoltage) {}, nullptr, &m_subsystem}}; frc2::CommandPtr m_emptyRoutineForward{ diff --git a/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Drive.h b/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Drive.h index 61d34f131f7..45d4fa3aab0 100644 --- a/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Drive.h +++ b/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Drive.h @@ -39,8 +39,7 @@ class Drive : public frc2::SubsystemBase { constants::drive::kRightEncoderReversed}; frc2::sysid::SysIdRoutine m_sysIdRoutine{ - frc2::sysid::Config{std::nullopt, std::nullopt, std::nullopt, - std::nullopt}, + frc2::sysid::Config{std::nullopt, std::nullopt, std::nullopt, nullptr}, frc2::sysid::Mechanism{ [this](units::volt_t driveVoltage) { m_leftMotor.SetVoltage(driveVoltage); diff --git a/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Shooter.h b/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Shooter.h index 0a33db68ea3..4f10c18277d 100644 --- a/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Shooter.h +++ b/wpilibcExamples/src/main/cpp/examples/SysId/include/subsystems/Shooter.h @@ -33,8 +33,7 @@ class Shooter : public frc2::SubsystemBase { constants::shooter::kEncoderReversed}; frc2::sysid::SysIdRoutine m_sysIdRoutine{ - frc2::sysid::Config{std::nullopt, std::nullopt, std::nullopt, - std::nullopt}, + frc2::sysid::Config{std::nullopt, std::nullopt, std::nullopt, nullptr}, frc2::sysid::Mechanism{ [this](units::volt_t driveVoltage) { m_shooterMotor.SetVoltage(driveVoltage);