Display Imrovements

This commit is contained in:
CodeCrafter912 2018-07-08 00:04:43 +02:00
parent 5bec4fa9da
commit 3803db3714

View file

@ -357,28 +357,28 @@ void update_screen(timer_state_e state){
break;
case TIMER_IDLE:
header = "Idle!";
content = "00:00";
content = "00.00 sec";
footer = "Waiting for climber";
break;
case TIMER_READY:
header = "Ready!";
content = "00.00 sek.";
content = "00.00 sec";
footer = "Waiting for start";
break;
case TIMER_STARTED:
header = "Starting ...";
content = "00:00";
content = "00.00 sec";
footer = "...";
break;
case TIMER_RUNNING:
header = "Running ...";
curr_time_local = (millis() - start_time)/1000.000;
content = curr_time_local;
content += " sek.";
content += " sec";
curr_time_local = (runner_start_time - start_time)/1000.000;
footer = "started ";
footer = "Reaction time: ";
footer += curr_time_local;
footer += " too late";
footer += " sec";
break;
case TIMER_CANCELLED:
header = "Cancelled!";
@ -388,7 +388,7 @@ void update_screen(timer_state_e state){
break;
case TIMER_TIMEDOUT:
header = "Time out!";
content = "Invalid GO!";
content = "Invalid!";
break;
case TIMER_FAIL:
header = "False start!";
@ -406,14 +406,6 @@ void update_screen(timer_state_e state){
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));