fix deltas zeroing at the end of a pb run

This commit is contained in:
Lexi Quinn 2022-01-28 20:24:22 +11:00
parent 63f91c5f67
commit 02de56dfa9

View File

@ -53,6 +53,8 @@ void start()
{ {
if (timerActive || segCount == 0) if (timerActive || segCount == 0)
return; return;
//for now we do this here for reasons explained in stop()
calculatePB();
clock_gettime(CLOCK_REALTIME, &timestart); clock_gettime(CLOCK_REALTIME, &timestart);
timerActive = true; timerActive = true;
//Reset state of timer //Reset state of timer
@ -84,7 +86,10 @@ void stop()
t.isReset = segments[i].isReset; t.isReset = segments[i].isReset;
pastRuns[((attempts-1) * segCount) + i] = t; pastRuns[((attempts-1) * segCount) + i] = t;
} }
calculatePB(); //If this is done here you wont get a chance to peep your deltas on
//a pb coz the ui will just update and zero them all out if your current
//run is the pb run youre now comparing to
//calculatePB();
saveFile(); saveFile();
} }