From d41f27c211ac96151e175c4241b6a8d866001bea Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Wed, 25 Mar 2020 17:22:22 +0100 Subject: [PATCH] application: Only reset the model when starting a new recording. Do not reset it when stopping a recording. This lets us view the recording's data (distance only for now) after it has been stopped. --- src/application/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/application/main.rs b/src/application/main.rs index 6e8d37d..95a60da 100644 --- a/src/application/main.rs +++ b/src/application/main.rs @@ -334,14 +334,14 @@ pub unsafe extern "C" fn _start() -> ! { if is_recording { logger.start_recording(&prev_tap); + model.reset(); + view = View::Distance; } else { logger.stop_recording(&prev_tap); view = View::Time; } - - model.reset(); } let new_view = if pte24.has_been_held_for_ms(250) { -- 2.30.2