Skip to content

Commit

Permalink
Removed LENGTH enum value
Browse files Browse the repository at this point in the history
  • Loading branch information
jvogt23 committed Jan 20, 2025
1 parent d86225e commit 3175848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Strategy {
/*
OverridingPositions refers to the positions that can be manually set in the UI.
Normally, all robots are set to Auto. If you want to add a new position, add a new value
to this enum before LENGTH, add a string to the overriding_position_labels vector in
to this enum, add a string to the overriding_position_labels vector in
main_window.hpp, and add a case to the check_for_position_override method in
RobotFactoryPosition.
*/
Expand All @@ -22,8 +22,6 @@ enum OverridingPositions {
SMART_IDLE,
ZONER,
IDLE,
LENGTH, // Do not remove - Placeholder to act as the "length" of the enum, or the number of
// elements it contains. Should always be at end of enum
};

} // namespace Strategy
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ std::string RobotFactoryPosition::get_current_state() {

void RobotFactoryPosition::test_play_callback(
const rj_msgs::msg::OverridePosition::SharedPtr message) {
if (message->robot_id == this->robot_id_ &&
message->overriding_position < Strategy::OverridingPositions::LENGTH) {
if (message->robot_id == this->robot_id_) {
override_play_position_ =
static_cast<Strategy::OverridingPositions>(message->overriding_position);
}
Expand Down

0 comments on commit 3175848

Please sign in to comment.