Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bhall-ctre committed Nov 22, 2024
1 parent 8718834 commit 95a2b81
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cpp/Simulation/src/main/include/Robot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "subsystems/CommandSwerveDrivetrain.h"
#include <frc/RobotController.h>

using namespace subsystems;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "subsystems/CommandSwerveDrivetrain.h"
#include <frc/RobotController.h>
#include <pathplanner/lib/auto/AutoBuilder.h>
#include <pathplanner/lib/controllers/PPHolonomicDriveController.h>

Expand Down
2 changes: 1 addition & 1 deletion java/Simulation/src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions python/SwerveWithPathPlanner/robotcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 95a2b81

Please sign in to comment.