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