[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:
Modelmat
2021-12-07 05:08:34 +00:00
committed by GitHub
parent 1ac02d2f58
commit 15275433d4
3 changed files with 3 additions and 2 deletions

View File

@@ -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);
}
}

View File

@@ -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};

View File

@@ -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};