Fix typo and disable debug logging
parent
3e6cfc95a9
commit
4b8490645d
|
|
@ -13,7 +13,7 @@ Therefore it would be great if we could improve this app together :-)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Select the exercise type you want to practive and go for it!
|
Select the exercise type you want to practice and go for it!
|
||||||
Press stop to end your exercise.
|
Press stop to end your exercise.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ function isValidYAxisExercise(slopeY, t) {
|
||||||
if (p1 > 0 && p2 < 0) {
|
if (p1 > 0 && p2 < 0) {
|
||||||
if (lastZeroPassCameFromPositive == false) {
|
if (lastZeroPassCameFromPositive == false) {
|
||||||
lastExerciseHalfCompletionTime = t;
|
lastExerciseHalfCompletionTime = t;
|
||||||
console.log(t, exerciseName + " half complete...");
|
//console.log(t, exerciseName + " half complete...");
|
||||||
|
|
||||||
layout.progress.label = "½";
|
layout.progress.label = "½";
|
||||||
g.clear();
|
g.clear();
|
||||||
|
|
@ -201,7 +201,7 @@ function isValidYAxisExercise(slopeY, t) {
|
||||||
if (lastZeroPassCameFromPositive == true) {
|
if (lastZeroPassCameFromPositive == true) {
|
||||||
const tDiffLastExercise = t - lastExerciseCompletionTime;
|
const tDiffLastExercise = t - lastExerciseCompletionTime;
|
||||||
const tDiffStart = t - tStart;
|
const tDiffStart = t - tStart;
|
||||||
console.log(t, exerciseName + " maybe complete?", Math.round(tDiffLastExercise), Math.round(tDiffStart));
|
//console.log(t, exerciseName + " maybe complete?", Math.round(tDiffLastExercise), Math.round(tDiffStart));
|
||||||
|
|
||||||
// check minimal time between exercises:
|
// check minimal time between exercises:
|
||||||
if ((lastExerciseCompletionTime <= 0 && tDiffStart >= thresholdMinTime) || tDiffLastExercise >= thresholdMinTime) {
|
if ((lastExerciseCompletionTime <= 0 && tDiffStart >= thresholdMinTime) || tDiffLastExercise >= thresholdMinTime) {
|
||||||
|
|
@ -212,7 +212,7 @@ function isValidYAxisExercise(slopeY, t) {
|
||||||
// check minimal duration of exercise:
|
// check minimal duration of exercise:
|
||||||
const tDiffExerciseHalfCompletion = t - lastExerciseHalfCompletionTime;
|
const tDiffExerciseHalfCompletion = t - lastExerciseHalfCompletionTime;
|
||||||
if (tDiffExerciseHalfCompletion > thresholdMinDurationTime) {
|
if (tDiffExerciseHalfCompletion > thresholdMinDurationTime) {
|
||||||
console.log(t, exerciseName + " complete!!!");
|
//console.log(t, exerciseName + " complete!!!");
|
||||||
|
|
||||||
lastExerciseCompletionTime = t;
|
lastExerciseCompletionTime = t;
|
||||||
exerciseCounter++;
|
exerciseCounter++;
|
||||||
|
|
@ -225,15 +225,15 @@ function isValidYAxisExercise(slopeY, t) {
|
||||||
if (settings.buzz)
|
if (settings.buzz)
|
||||||
Bangle.buzz(100, 0.4);
|
Bangle.buzz(100, 0.4);
|
||||||
} else {
|
} else {
|
||||||
console.log(t, exerciseName + " to quick for duration time threshold!");
|
//console.log(t, exerciseName + " to quick for duration time threshold!");
|
||||||
lastExerciseCompletionTime = t;
|
lastExerciseCompletionTime = t;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(t, exerciseName + " to slow for time threshold!");
|
//console.log(t, exerciseName + " to slow for time threshold!");
|
||||||
lastExerciseCompletionTime = t;
|
lastExerciseCompletionTime = t;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(t, exerciseName + " to quick for time threshold!");
|
//console.log(t, exerciseName + " to quick for time threshold!");
|
||||||
lastExerciseCompletionTime = t;
|
lastExerciseCompletionTime = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue