From 23c12383e612ab8a3a45c367dbb8a4902b3beac6 Mon Sep 17 00:00:00 2001 From: houdisheng Date: Mon, 11 Dec 2023 10:40:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=80=9F=E5=BA=A6dfx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houdisheng --- frameworks/base/geometry/least_square_impl.cpp | 9 +++++++++ frameworks/core/gestures/velocity_tracker.cpp | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frameworks/base/geometry/least_square_impl.cpp b/frameworks/base/geometry/least_square_impl.cpp index bfe3f162329..cb79843a9a6 100644 --- a/frameworks/base/geometry/least_square_impl.cpp +++ b/frameworks/base/geometry/least_square_impl.cpp @@ -50,6 +50,15 @@ bool LeastSquareImpl::GetLeastSquareParams(std::vector& params) break; } } + if (SystemProperties::GetDebugEnabled()) { + LOGI("countNum is %{public}d", countNum); + for (const auto &xVal : xVals) { + LOGE("x val is %{public}f", static_cast(xVal)); + } + for (const auto &yVal : yVals) { + LOGE("x val is %{public}f", static_cast(yVal)); + } + } if (paramsNum_ == Matrix3::DIMENSION) { MatrixN3 matrixn3 { countNum }; for (auto i = 0; i < countNum; i++) { diff --git a/frameworks/core/gestures/velocity_tracker.cpp b/frameworks/core/gestures/velocity_tracker.cpp index 6c892354669..32f7ddef54d 100644 --- a/frameworks/core/gestures/velocity_tracker.cpp +++ b/frameworks/core/gestures/velocity_tracker.cpp @@ -94,7 +94,8 @@ void VelocityTracker::UpdateVelocity() if (yAxis_.GetLeastSquareParams(yAxis)) { yVelocity = linearParam * yAxis[0] * yValue + yAxis[1]; } - + LOGI("Velocity in up date is %{public}f, %{public}f", static_cast(xVelocity) + static_cast(yVelocity)); velocity_.SetOffsetPerSecond({ xVelocity, yVelocity }); isVelocityDone_ = true; } -- Gitee From a54d952b657332cba11b2880381909612f01cb12 Mon Sep 17 00:00:00 2001 From: houdisheng Date: Mon, 11 Dec 2023 10:55:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=80=9F=E5=BA=A6=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houdisheng --- adapter/ohos/entrance/mmi_event_convertor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/ohos/entrance/mmi_event_convertor.cpp b/adapter/ohos/entrance/mmi_event_convertor.cpp index 9a20aacd686..3dc2264e357 100644 --- a/adapter/ohos/entrance/mmi_event_convertor.cpp +++ b/adapter/ohos/entrance/mmi_event_convertor.cpp @@ -381,7 +381,8 @@ void ConvertPointerEvent(const std::shared_ptr& pointerEvent, void LogPointInfo(const std::shared_ptr& pointerEvent) { if (SystemProperties::GetDebugEnabled()) { - LOGI("point source: %{public}d", pointerEvent->GetSourceType()); + LOGI("point source: %{public}d, time: %{public}" PRId64 "", pointerEvent->GetSourceType(), + pointerEvent->GetActionTime()); auto actionId = pointerEvent->GetPointerId(); MMI::PointerEvent::PointerItem item; if (pointerEvent->GetPointerItem(actionId, item)) { -- Gitee From ba92e9dbbed35ce0d1f9ddc217df8dbb15825290 Mon Sep 17 00:00:00 2001 From: houdisheng Date: Mon, 11 Dec 2023 11:45:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houdisheng --- frameworks/core/gestures/velocity_tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/core/gestures/velocity_tracker.cpp b/frameworks/core/gestures/velocity_tracker.cpp index 32f7ddef54d..8029ecd8d53 100644 --- a/frameworks/core/gestures/velocity_tracker.cpp +++ b/frameworks/core/gestures/velocity_tracker.cpp @@ -94,7 +94,7 @@ void VelocityTracker::UpdateVelocity() if (yAxis_.GetLeastSquareParams(yAxis)) { yVelocity = linearParam * yAxis[0] * yValue + yAxis[1]; } - LOGI("Velocity in up date is %{public}f, %{public}f", static_cast(xVelocity) + LOGI("Velocity in update is %{public}f, %{public}f", static_cast(xVelocity), static_cast(yVelocity)); velocity_.SetOffsetPerSecond({ xVelocity, yVelocity }); isVelocityDone_ = true; -- Gitee