Skip to content

Commit

Permalink
remove breaking .erase calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Exortions committed Nov 19, 2023
1 parent a7b8f59 commit 79607ce
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lemlib/odom/differentialArc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "lemlib/devices/trackingWheel.hpp"
#include "lemlib/util.hpp"
#include "lemlib/timer.hpp"
#include "lemlib/logger/logger.hpp"
Expand Down Expand Up @@ -39,15 +38,13 @@ void DifferentialArc::calibrate(bool calibrateGyros) {
for (auto it = verticals.begin(); it != verticals.end(); it++) {
if (it->reset()) {
infoSink()->warn("Vertical tracker at offset {} failed calibration!", it->getOffset());
verticals.erase(it);
} else newVerticals.push_back(*it);
}

// calibrate horizontal tracking wheels
for (auto it = horizontals.begin(); it != horizontals.end(); it++) {
if (it->reset()) {
infoSink()->warn("Horizontal tracker at offset {} failed calibration!", it->getOffset());
horizontals.erase(it);
} else newHorizontals.push_back(*it);
}

Expand Down

0 comments on commit 79607ce

Please sign in to comment.