Skip to content

Commit

Permalink
Send a message when the repair timer has expired
Browse files Browse the repository at this point in the history
According to RC-4.5.1, this should be a feature of the RefBox
  • Loading branch information
Jorrit Olthuis authored and Sirkle23 committed Nov 8, 2022
1 parent 10e27ea commit d2da867
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mslrb2015/Comms.pde
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ public static final String COMM_DROP_BALL = "DROP_BALL";

// specific team Commands
public static final String COMM_REPAIR = "REPAIR";
public static final String COMM_REPAIR_END = "REPAIR_END";
public static final String COMM_SUBSTITUTION = "SUBSTITUTION";
public static final String COMM_ISALIVE = "IS_ALIVE";

Expand Down Expand Up @@ -417,7 +418,8 @@ void comms_initDescriptionDictionary() {
Description.set(COMM_PENALTY, "Penalty");
Description.set(COMM_GOAL, "Goal+");
Description.set(COMM_SUBGOAL, "Goal-");
Description.set(COMM_REPAIR, "Repair");
Description.set(COMM_REPAIR, "Repair");
Description.set(COMM_REPAIR_END, "Repair ended");
Description.set(COMM_RED_CARD, "Red Card");
Description.set(COMM_YELLOW_CARD, "Yellow Card");
Description.set(COMM_DOUBLE_YELLOW, "Double Yellow");
Expand Down
2 changes: 2 additions & 0 deletions mslrb2015/Team.pde
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ class Team {
}
else
{
// Repair timer has finished
r[rpCount].RepairTimer.resetStopWatch();
RepairCount--;
println("Repair OUT: "+shortName+":"+(rpCount+1)+" @"+(isLeft?"left":"right"));
send_event_v2(""+COMM_REPAIR_END, Description.get(COMM_REPAIR_END), this, -1);
r[rpCount].setState("play");
}
}
Expand Down

0 comments on commit d2da867

Please sign in to comment.