Skip to content

Commit 00b3c0c

Browse files
committed
Add suggest-end-of-match option
Remove unused continue-from-halt option btw.
1 parent 2455d1e commit 00b3c0c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/app/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type Game struct {
6060
BallPlacementMinRobotDistance float64 `yaml:"ball-placement-min-robot-distance"`
6161
DistanceToBallInStop float64 `yaml:"distance-to-ball-in-stop"`
6262
AutoApproveGoals bool `yaml:"auto-approve-goals"`
63-
ContinueFromHalt bool `yaml:"continue-from-halt"`
63+
SuggestEndOfMatch bool `yaml:"suggest-end-of-match"`
6464
RecommendHalfTimes bool `yaml:"recommend-half-times"`
6565
ChallengeFlags int32 `yaml:"challenge-flags"`
6666
EmergencyStopGracePeriod time.Duration `yaml:"emergency-stop-grace-period"`
@@ -192,7 +192,7 @@ func DefaultControllerConfig() (c Controller) {
192192
c.Game.BallPlacementMinRobotDistance = 0.05
193193
c.Game.DistanceToBallInStop = 0.5
194194
c.Game.AutoApproveGoals = false
195-
c.Game.ContinueFromHalt = false
195+
c.Game.SuggestEndOfMatch = true
196196
c.Game.RecommendHalfTimes = true
197197
c.Game.ChallengeFlags = 3
198198
c.Game.EmergencyStopGracePeriod = 10 * time.Second

internal/app/config/testdata/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ game:
4343
ball-placement-min-robot-distance: 0.05
4444
distance-to-ball-in-stop: 0.5
4545
auto-approve-goals: false
46-
continue-from-halt: false
46+
suggest-end-of-match: true
4747
recommend-half-times: true
4848
challenge-flags: 3
4949
emergency-stop-grace-period: 10s

internal/app/engine/process_continue_next_action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (e *Engine) actionsToContinueFromStop() (actions []*ContinueAction, hints [
145145
ContinueAction_READY_MANUAL,
146146
))
147147
}
148-
if suggestEndOfMatch(e.currentState) {
148+
if e.gameConfig.SuggestEndOfMatch && suggestEndOfMatch(e.currentState) {
149149
actions = append(actions, createContinueAction(
150150
ContinueAction_END_GAME,
151151
state.Team_UNKNOWN,

0 commit comments

Comments
 (0)