From 912fd34eee406123267d1a4edd8f7b8bc5695bbd Mon Sep 17 00:00:00 2001 From: CodeCrafter912 Date: Sat, 7 Jul 2018 23:14:10 +0200 Subject: [PATCH] Updates to the display --- speedclock.ino | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/speedclock.ino b/speedclock.ino index 2345aa5..65482a7 100644 --- a/speedclock.ino +++ b/speedclock.ino @@ -361,6 +361,7 @@ void update_screen(timer_state_e state){ header = "Running ..."; curr_time_test = (millis() - start_time)/1000.0; content = curr_time_test; + footer = "sek."; break; case TIMER_CANCELLED: header = "Cancelled!"; @@ -370,9 +371,12 @@ void update_screen(timer_state_e state){ break; case TIMER_TIMEDOUT: header = "Time out!"; + content = "Invalid GO!"; break; case TIMER_FAIL: header = "False start!"; + content = runner_start_time - start_time; + footer = "milliseconds too early"; break; default: scr_update = false; @@ -381,7 +385,17 @@ void update_screen(timer_state_e state){ if(scr_update == true){ if(timer_new_state != timer_state){ - display.clear(); + display.clear(0,200,0,0); + display.clear(0,200,3,5); + display.clear(0,200,7,7); +// display.setCursor(0,0); +// display.print(" "); +// for(int i=3;i<6;i++){ +// display.setCursor(0,i); +// display.print(" "); +// } +// display.setCursor(0,0); +// display.print(" "); } //snprintf( string_to_char, sizeof(string_to_char),"%s", header); header.toCharArray(header_to_char, sizeof(header_to_char));