Skip to content

Commit

Permalink
Match Transition
Browse files Browse the repository at this point in the history
Added support for the match transition state. Note that it happens so fast that it will likely not display on the Pebble.
  • Loading branch information
333fred committed Feb 25, 2016
1 parent 8ed3f17 commit 8683a44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ extern match_state s_match_state;
// Constant text strings for the connection statuses
const char *eth = "Eth", *ds = "DS", *radio = "Rd", *rio = "RIO", *code = "Cd", *estop = "Est", *good = "G", *bwu = "BWU", *byp = "BYP", *bat = "Bat";
const char *not_ready = "Not Ready", *timeout = "Time out", *ready_prestart = "Ready to Prestart", *prestart_initiated = "Prestart Initiated",
*prestart_complete = "Prestart Completed", *match_ready = "Match Ready", *auto_mode = "Auto Running", *teleop_mode = "Teleop Running", *over = "Over",
*aborted = "Aborted";
*prestart_complete = "Prestart Completed", *match_ready = "Match Ready", *auto_mode = "Auto Running", *transition_mode = "Match Transition",
*teleop_mode = "Teleop Running", *over = "Over", *aborted = "Aborted";

// Updates the text on the screen with the current values. It uses the correct display whether
// the current update type is status or team number.
Expand Down Expand Up @@ -142,6 +142,8 @@ void update_match_status() {
case AUTO:
match_text = auto_mode;
break;
case TRANSITION:
match_text = transition_mode;
case TELEOP:
match_text = teleop_mode;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ typedef enum {
} status_type;

typedef enum {
NOT_READY=0, TIMEOUT=1, READY_PRESTART=2, PRESTART_INITATED=3, PRESTART_COMPLETED=4, MATCH_READY=5, AUTO=6, TELEOP=7, OVER=8, ABORTED=9
NOT_READY=0, TIMEOUT=1, READY_PRESTART=2, PRESTART_INITATED=3, PRESTART_COMPLETED=4, MATCH_READY=5, AUTO=6, TRANSITION=7, TELEOP=8, OVER=9, ABORTED=10
} match_state;

char* translate_error(AppMessageResult res);

0 comments on commit 8683a44

Please sign in to comment.