aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordodoradio <dodoradio@github.com>2022-04-07 01:01:13 +0100
committerdodoradio <dodoradio@github.com>2022-04-07 02:45:45 +0100
commitb2f45991df2498a050352f3c6dd8c956bde535ee (patch)
tree781b26df73427bb313c496986ca2bc12d3c54dca
parent166783694be8a16620e9014027c5cdc061b96a8c (diff)
add support for physical hands
-rw-r--r--src/main.qml10
1 files changed, 10 insertions, 0 deletions
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