From f01375f72037f0cad56ba10f5539f04a9f1f99e2 Mon Sep 17 00:00:00 2001 From: doomertheboomer Date: Fri, 28 Jul 2023 18:07:12 +0700 Subject: [PATCH] fix preview code, calibration code was fine --- depthrushConfig/kinectTest.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/depthrushConfig/kinectTest.cpp b/depthrushConfig/kinectTest.cpp index 223d984..7570543 100644 --- a/depthrushConfig/kinectTest.cpp +++ b/depthrushConfig/kinectTest.cpp @@ -72,12 +72,13 @@ int kinectTest(float xGrad, float xOffset, float yGrad, float yOffset, float zGr // check for stepping float errorMargin = 0.05; + if (fixedLeft > (fixedRight + errorMargin)) { rightTouch = true; leftTouch = false; // std::cout << "right step\n"; } - else if (fixedLeft > (fixedRight + errorMargin)) { + else if (fixedRight > (fixedLeft + errorMargin)) { leftTouch = true; rightTouch = false; // std::cout << "left step \n"; @@ -87,7 +88,7 @@ int kinectTest(float xGrad, float xOffset, float yGrad, float yOffset, float zGr rightTouch = true; // std::cout << "both step\n"; } - /* + // print feet for (int i = 0; i < width; i++) { if ((i <= (toolLeft + toolWidth)) && (i >= (toolLeft - toolWidth)) && leftTouch) { @@ -100,8 +101,8 @@ int kinectTest(float xGrad, float xOffset, float yGrad, float yOffset, float zGr std::cout << " "; } } - */ - std::cout << std::to_string(fixedLeft) << " " << std::to_string(fixedRight) << std::endl; + + // std::cout << std::to_string(fixedLeft) << " " << std::to_string(fixedRight) << std::endl; } // Clean up and exit