improved display

This commit is contained in:
CodeCrafter912 2018-07-07 23:25:46 +02:00
parent ad17222ced
commit 65e3d81b88
1 changed files with 7 additions and 6 deletions

View File

@ -346,7 +346,7 @@ void update_screen(timer_state_e state){
char content_to_char[50];
char footer_to_char[50];
float curr_time_test = 0.0;
float curr_time_local = 0.0;
switch(state){
case TIMER_INIT:
@ -362,7 +362,7 @@ void update_screen(timer_state_e state){
case TIMER_READY:
header = "Ready!";
content = "00:00";
footer = "Press Startbuton to run ...";
footer = "Waiting for start";
break;
case TIMER_STARTED:
header = "Starting ...";
@ -371,8 +371,8 @@ void update_screen(timer_state_e state){
break;
case TIMER_RUNNING:
header = "Running ...";
curr_time_test = (millis() - start_time)/1000.0;
content = curr_time_test;
curr_time_local = (millis() - start_time)/1000.000;
content = curr_time_local;
footer = "sek.";
break;
case TIMER_CANCELLED:
@ -387,8 +387,9 @@ void update_screen(timer_state_e state){
break;
case TIMER_FAIL:
header = "False start!";
content = runner_start_time - start_time;
footer = "milliseconds too early";
curr_time_local = (start_time - runner_start_time)/1000.000;
content = curr_time_local;
footer = "seconds too early";
break;
default:
scr_update = false;