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