Updates to the display

This commit is contained in:
CodeCrafter912 2018-07-07 23:14:10 +02:00
parent f6132f1c85
commit 912fd34eee

View file

@ -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));