mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[examples] Fix duplicate port allocations in C++ SwerveBot/SwerveDrivePoseEstimator/RomiReference (#3773)
- Remove duplicate motor port (2) from C++ SwerveBot/SwerveDrivePoseEstimator Java has the correct motor ports. - Fix duplicate port allocation in C++ RomiReference by correcting if/else check Java logic was already correct, and confirms this change.
This commit is contained in:
@@ -17,6 +17,7 @@ OnBoardIO::OnBoardIO(OnBoardIO::ChannelMode dio1, OnBoardIO::ChannelMode dio2) {
|
||||
}
|
||||
if (dio2 == ChannelMode::INPUT) {
|
||||
m_buttonC = std::make_unique<frc::DigitalInput>(2);
|
||||
} else {
|
||||
m_redLed = std::make_unique<frc::DigitalOutput>(2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Drivetrain {
|
||||
frc::Translation2d m_backRightLocation{-0.381_m, -0.381_m};
|
||||
|
||||
SwerveModule m_frontLeft{1, 2, 0, 1, 2, 3};
|
||||
SwerveModule m_frontRight{2, 3, 4, 5, 6, 7};
|
||||
SwerveModule m_frontRight{3, 4, 4, 5, 6, 7};
|
||||
SwerveModule m_backLeft{5, 6, 8, 9, 10, 11};
|
||||
SwerveModule m_backRight{7, 8, 12, 13, 14, 15};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class Drivetrain {
|
||||
frc::Translation2d m_backRightLocation{-0.381_m, -0.381_m};
|
||||
|
||||
SwerveModule m_frontLeft{1, 2, 0, 1, 2, 3};
|
||||
SwerveModule m_frontRight{2, 3, 4, 5, 6, 7};
|
||||
SwerveModule m_frontRight{3, 4, 4, 5, 6, 7};
|
||||
SwerveModule m_backLeft{5, 6, 8, 9, 10, 11};
|
||||
SwerveModule m_backRight{7, 8, 12, 13, 14, 15};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user