diff --git a/cpp/Simulation/src/main/include/Robot.h b/cpp/Simulation/src/main/include/Robot.h index 52b37fe2..1a216e43 100644 --- a/cpp/Simulation/src/main/include/Robot.h +++ b/cpp/Simulation/src/main/include/Robot.h @@ -28,7 +28,10 @@ class Robot : public frc::TimedRobot { ctre::phoenix6::sim::CANcoderSimState &rightSensSim = rightSensor.GetSimState(); ctre::phoenix6::sim::Pigeon2SimState &imuSim = imu.GetSimState(); - frc::DifferentialDrive drivetrain{leftFX, rightFX}; + frc::DifferentialDrive drivetrain{ + [this](double output) { leftFX.Set(output); }, + [this](double output) { rightFX.Set(output); } + }; frc::XboxController joystick{0}; diff --git a/cpp/SwerveWithChoreo/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp b/cpp/SwerveWithChoreo/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp index ca8f2a34..46339670 100644 --- a/cpp/SwerveWithChoreo/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp +++ b/cpp/SwerveWithChoreo/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp @@ -1,4 +1,5 @@ #include "subsystems/CommandSwerveDrivetrain.h" +#include using namespace subsystems; diff --git a/cpp/SwerveWithPathPlanner/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp b/cpp/SwerveWithPathPlanner/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp index 6d44b00e..0ac8be26 100644 --- a/cpp/SwerveWithPathPlanner/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp +++ b/cpp/SwerveWithPathPlanner/src/main/cpp/subsystems/CommandSwerveDrivetrain.cpp @@ -1,4 +1,5 @@ #include "subsystems/CommandSwerveDrivetrain.h" +#include #include #include diff --git a/java/Simulation/src/main/java/frc/robot/Robot.java b/java/Simulation/src/main/java/frc/robot/Robot.java index e1bea477..f623caf5 100644 --- a/java/Simulation/src/main/java/frc/robot/Robot.java +++ b/java/Simulation/src/main/java/frc/robot/Robot.java @@ -59,7 +59,7 @@ public class Robot extends TimedRobot { private final CANcoderSimState rightSensSim = rightSensor.getSimState(); private final Pigeon2SimState imuSim = imu.getSimState(); - private final DifferentialDrive drivetrain = new DifferentialDrive(leftFX, rightFX); + private final DifferentialDrive drivetrain = new DifferentialDrive(leftFX::set, rightFX::set); /* * These numbers are an example AndyMark Drivetrain with some additional weight. diff --git a/python/SwerveWithPathPlanner/robotcontainer.py b/python/SwerveWithPathPlanner/robotcontainer.py index 158439bc..80429124 100644 --- a/python/SwerveWithPathPlanner/robotcontainer.py +++ b/python/SwerveWithPathPlanner/robotcontainer.py @@ -55,12 +55,12 @@ def __init__(self) -> None: ) ) - self._logger = Telemetry(self._max_speed) - self._joystick = commands2.button.CommandXboxController(0) self.drivetrain = TunerConstants.create_drivetrain() + self._logger = Telemetry(self._max_speed) + # Path follower self._auto_chooser = AutoBuilder.buildAutoChooser("Tests") SmartDashboard.putData("Auto Mode", self._auto_chooser)