Skip to content

Commit

Permalink
Remove testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
sanatd33 authored Jan 22, 2024
1 parent 8a868b6 commit 85ecac3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions soccer/src/soccer/strategy/agent/position/offense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ Offense::State Offense::update_state() {

if (current_state_ == IDLING) {
// send_scorer_request();
if (robot_id_ == 4) {
next_state = AWAITING_SEND_PASS;
} else {
next_state = SEEKING;
}
next_state = SEEKING;
} else if (current_state_ == SEARCHING) {
if (scorer_) {
next_state = STEALING;
Expand Down Expand Up @@ -82,6 +78,7 @@ Offense::State Offense::update_state() {
next_state = IDLING;
}
} else if (current_state_ == AWAITING_SEND_PASS) {
//Only sends a pass request every 0.2 seconds
auto cur = std::chrono::high_resolution_clock::now();
auto diff = cur - start;
if (distance_to_ball < ball_lost_distance_ && diff.count() > 0.2){

Check warning on line 84 in soccer/src/soccer/strategy/agent/position/offense.cpp

View workflow job for this annotation

GitHub Actions / build-and-test

narrowing conversion from 'std::chrono::duration<long, std::ratio<1, 1000000000>>::rep' (aka 'long') to 'double'
Expand All @@ -91,7 +88,7 @@ Offense::State Offense::update_state() {
} else if (current_state_ == SEEKING) {
// if the ball comes close to it while it's trying to seek, it should no longer be trying to seek
if (distance_to_ball < ball_receive_distance_) {
// next_state = IDLING;
// next_state = RECEIVING;
}
}

Expand Down

0 comments on commit 85ecac3

Please sign in to comment.