From b2f45991df2498a050352f3c6dd8c956bde535ee Mon Sep 17 00:00:00 2001 From: dodoradio Date: Thu, 7 Apr 2022 01:01:13 +0100 Subject: add support for physical hands --- src/main.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.qml b/src/main.qml index a81f467..4cb01ae 100644 --- a/src/main.qml +++ b/src/main.qml @@ -65,6 +65,16 @@ Application { } } + function toHandsPosition(usec) { + var mod = Math.abs(usec) + return(Math.floor((mod % 60000) / 1000)*3) + } + + PhysicalHands { + minuteHandPosition: toHandsPosition(elapsed.value) + hourHandPosition: toHandsPosition(elapsed.value) + } + Item { id: mainPage anchors.fill: parent -- cgit v1.2.3-54-g00ecf