diff --git a/applications/gui2/src/modules/camera.cpp b/applications/gui2/src/modules/camera.cpp index 5d019915249c5860f5d3ca60b5a21cdd599e81d4..1bf50c6a93b6388cb983a282f51f75056ad1ae43 100644 --- a/applications/gui2/src/modules/camera.cpp +++ b/applications/gui2/src/modules/camera.cpp @@ -370,13 +370,15 @@ void Camera::sendPose(const Eigen::Matrix4d &pose) { } void Camera::touch(int id, ftl::codecs::TouchType t, int x, int y, float d, int strength) { - UNIQUE_LOCK(mtx_, lk); - point_.id = id; - point_.type = t; - point_.x = x; - point_.y = y; - point_.d = d; - point_.strength = strength; //std::max((unsigned char)strength, point_.strength); + if (value("enable_touch", false)) { + UNIQUE_LOCK(mtx_, lk); + point_.id = id; + point_.type = t; + point_.x = x; + point_.y = y; + point_.d = d; + point_.strength = strength; //std::max((unsigned char)strength, point_.strength); + } // TODO: Check for touch capability first /*if (auto ptr = std::atomic_load(&latest_)) { diff --git a/components/rgbd-sources/src/sources/screencapture/screencapture.cpp b/components/rgbd-sources/src/sources/screencapture/screencapture.cpp index b893cd049ba854cfd410a80858b03e5d6a8f333f..5c9ca286b84726e7e5673d554207b822bc06b28d 100644 --- a/components/rgbd-sources/src/sources/screencapture/screencapture.cpp +++ b/components/rgbd-sources/src/sources/screencapture/screencapture.cpp @@ -251,8 +251,8 @@ void ScreenCapture::_move(int x, int y) { #ifdef HAVE_X11 auto &s = *impl_state_; - //XTestFakeMotionEvent (s.display, 0, x, y, CurrentTime); - //XSync(s.display, 0); + XTestFakeMotionEvent (s.display, 0, x, y, CurrentTime); + XSync(s.display, 0); #endif } @@ -331,9 +331,9 @@ bool ScreenCapture::retrieve(ftl::rgbd::Frame &frame) { // If there is a touch, render it. if (primary_touch_.id >= 0) { if (pressed_) { - cv::circle(img, cv::Point(primary_touch_.x, primary_touch_.y), 5, cv::Scalar(0,0,255), 3); + cv::circle(img, cv::Point(primary_touch_.x, primary_touch_.y), 10, cv::Scalar(0,0,255), 5); } else { - cv::circle(img, cv::Point(primary_touch_.x, primary_touch_.y), 3, cv::Scalar(0,0,255)); + cv::circle(img, cv::Point(primary_touch_.x, primary_touch_.y), 10, cv::Scalar(0,0,255), 3); } } } diff --git a/components/streams/src/renderers/collisions.cpp b/components/streams/src/renderers/collisions.cpp index a5e21c7a081e623b6ff4fb1413e4110c5badb2f9..ddb5c2d5bd75fee56a8f56dcd362c4c081efb86e 100644 --- a/components/streams/src/renderers/collisions.cpp +++ b/components/streams/src/renderers/collisions.cpp @@ -62,7 +62,7 @@ void ftl::render::collision2touch(const ftl::rgbd::Frame &rgbdframe, touch.x = pt.x; touch.y = pt.y; touch.type = ftl::codecs::TouchType::COLLISION; - touch.strength = (cam.maxDepth - campos.z <= tmin) ? 255 : 0; + touch.strength = (std::abs(campos.z - cam.maxDepth) <= tmin) ? 255 : 0; touch.d = campos.z; } }