From 2b0d091e192db64d7bb66a84c3562a325c14dcab Mon Sep 17 00:00:00 2001 From: frederic wagner Date: Wed, 24 Jul 2024 16:12:26 +0200 Subject: [PATCH] pushups: better detections ? --- apps/pushups/app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/pushups/app.js b/apps/pushups/app.js index a490d9519..afd88dc85 100644 --- a/apps/pushups/app.js +++ b/apps/pushups/app.js @@ -49,10 +49,17 @@ function default_routine() { const DETECTORS = [ (xyz) => { - return xyz.y > 0.4 ? 1 : 0; + return xyz.y > 0.3 ? 1 : 0; }, (xyz) => { - return xyz.x > 0 ? 1 : 0; + if (xyz.x > 0.15) { + return 1; + } else if (xyz.x < -0.15) { + return 0; + } else { + return null; + } + // return xyz.x > 0 ? 1 : 0; }, (xyz) => { if (xyz.z > -1) {