improved display

This commit is contained in:
CodeCrafter912 2018-07-07 23:50:28 +02:00
parent 65e3d81b88
commit 5bec4fa9da

View file

@ -31,6 +31,7 @@ signed long runner_run_time = 0; // this is the time the runner rea
unsigned long run_time = 0; // if the timer is running this is that start time ...
boolean warn_during_run = false; // will be set to true if there is a warning during the run - usually an offset sync error
timer_state_e timer_state = TIMER_WAIT; // timer needs to be initialized ...
timer_state_e timer_new_state = TIMER_INIT; // timer needs to be initialized ...
@ -361,7 +362,7 @@ void update_screen(timer_state_e state){
break;
case TIMER_READY:
header = "Ready!";
content = "00:00";
content = "00.00 sek.";
footer = "Waiting for start";
break;
case TIMER_STARTED:
@ -373,7 +374,11 @@ void update_screen(timer_state_e state){
header = "Running ...";
curr_time_local = (millis() - start_time)/1000.000;
content = curr_time_local;
footer = "sek.";
content += " sek.";
curr_time_local = (runner_start_time - start_time)/1000.000;
footer = "started ";
footer += curr_time_local;
footer += " too late";
break;
case TIMER_CANCELLED:
header = "Cancelled!";
@ -428,13 +433,15 @@ void update_screen(timer_state_e state){
display.setLetterSpacing(0);
display.print("----------------------------");
//end of the Header
//display.setLetterSpacing(1);
display.set2X();
display.setCursor(64 - (display.strWidth(content_to_char) / 2), 3);
display.print(content_to_char);
//end of the Content
display.set1X();
display.setCursor(0,6);
display.print("___________________________");
display.setLetterSpacing(0);
display.print("----------------------------");
display.setCursor(64 - (display.strWidth(footer_to_char) / 2), 7);
display.print(footer_to_char);
}