Skip to content

Commit

Permalink
Only update robot specs in pre-stages
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Apr 17, 2021
1 parent ee8dd21 commit dd9ec29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/simctl/robot_specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ func (r *RobotSpecSetter) LoadRobotSpecs(configFile string) {
}

func (r *RobotSpecSetter) handleRobotSpecs() {
if *r.c.lastRefereeMsg.Command != referee.Referee_HALT {
// Only during HALT
switch *r.c.lastRefereeMsg.Stage {
case referee.Referee_NORMAL_FIRST_HALF_PRE,
referee.Referee_NORMAL_SECOND_HALF_PRE,
referee.Referee_EXTRA_FIRST_HALF_PRE,
referee.Referee_EXTRA_SECOND_HALF_PRE:
// accept
default:
// Only in pre-stages
return
}

Expand Down

0 comments on commit dd9ec29

Please sign in to comment.