From 191e7fbd401ef54d8a7df28a9ee6d6c54c6a985b Mon Sep 17 00:00:00 2001 From: frederic wagner Date: Thu, 18 Jan 2024 15:02:04 +0100 Subject: [PATCH] pushups: better situps detection --- apps/pushups/app.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/pushups/app.js b/apps/pushups/app.js index df8ff4c32..23c2f57d4 100644 --- a/apps/pushups/app.js +++ b/apps/pushups/app.js @@ -9,13 +9,7 @@ const DETECTORS = [ return (xyz.y > 0.4)?1:0; }, (xyz) => { - if (xyz.y > 0.4 && xyz.z > -1) { - return 1; - } else if (xyz.x < 0.4 && xyz.z < -1) { - return 0; - } else { - return null; - } + return (xyz.x > 0)?1:0; }, (xyz) => { if (xyz.z > -1) {