From 65e3d81b8806e96e1bc38b5256c79a8110ef76c4 Mon Sep 17 00:00:00 2001 From: CodeCrafter912 Date: Sat, 7 Jul 2018 23:25:46 +0200 Subject: [PATCH] improved display --- speedclock.ino | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/speedclock.ino b/speedclock.ino index 6a8886d..7bc16d9 100644 --- a/speedclock.ino +++ b/speedclock.ino @@ -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;