From b7a1c7f6c6c6384b0f18752bb50400e3a4f319a0 Mon Sep 17 00:00:00 2001 From: Nils Hasler Date: Mon, 1 Jul 2024 09:36:26 +0200 Subject: [PATCH] polling example update --- examples/polling.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/polling.cpp b/examples/polling.cpp index 48b8eab..a7bfe8a 100644 --- a/examples/polling.cpp +++ b/examples/polling.cpp @@ -21,6 +21,7 @@ int main(int argc, char** argv) // Additional flags should be added as required. Captury_startStreaming(CAPTURY_STREAM_POSES | CAPTURY_STREAM_COMPRESSED); + uint64_t lastTimestamp = 0; while (true) { // get list of actors - otherwise we won't know whom to poll const CapturyActor* actors; @@ -31,7 +32,10 @@ int main(int argc, char** argv) if (pose == NULL) continue; - + if (pose->timestamp != lastTimestamp) { + Captury_log(CAPTURY_LOG_INFO, "actor %x has new pose at %zd\n", pose->actor, pose->timestamp); + lastTimestamp = pose->timestamp; + } // make sure to free the pose using the provided function - potential binary incompatibilities between different Microsoft compilers Captury_freePose(pose);