application: Only reset the model when starting a new recording.
authorTilman Sauerbeck <tilman@code-monkey.de>
Wed, 25 Mar 2020 16:22:22 +0000 (17:22 +0100)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sat, 28 Mar 2020 16:52:15 +0000 (17:52 +0100)
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

index 6e8d37dccdd282a5f6cddae15936864c28277ae2..95a60dad6d266560a86e045b45f2175020346ebc 100644 (file)
@@ -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) {