fix preview code, calibration code was fine
This commit is contained in:
parent
76e688b6b2
commit
f01375f720
@ -72,12 +72,13 @@ int kinectTest(float xGrad, float xOffset, float yGrad, float yOffset, float zGr
|
|||||||
|
|
||||||
// check for stepping
|
// check for stepping
|
||||||
float errorMargin = 0.05;
|
float errorMargin = 0.05;
|
||||||
|
|
||||||
if (fixedLeft > (fixedRight + errorMargin)) {
|
if (fixedLeft > (fixedRight + errorMargin)) {
|
||||||
rightTouch = true;
|
rightTouch = true;
|
||||||
leftTouch = false;
|
leftTouch = false;
|
||||||
// std::cout << "right step\n";
|
// std::cout << "right step\n";
|
||||||
}
|
}
|
||||||
else if (fixedLeft > (fixedRight + errorMargin)) {
|
else if (fixedRight > (fixedLeft + errorMargin)) {
|
||||||
leftTouch = true;
|
leftTouch = true;
|
||||||
rightTouch = false;
|
rightTouch = false;
|
||||||
// std::cout << "left step \n";
|
// std::cout << "left step \n";
|
||||||
@ -87,7 +88,7 @@ int kinectTest(float xGrad, float xOffset, float yGrad, float yOffset, float zGr
|
|||||||
rightTouch = true;
|
rightTouch = true;
|
||||||
// std::cout << "both step\n";
|
// std::cout << "both step\n";
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
// print feet
|
// print feet
|
||||||
for (int i = 0; i < width; i++) {
|
for (int i = 0; i < width; i++) {
|
||||||
if ((i <= (toolLeft + toolWidth)) && (i >= (toolLeft - toolWidth)) && leftTouch) {
|
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::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
|
// Clean up and exit
|
||||||
|
Loading…
Reference in New Issue
Block a user