Hej,
I want to get the cycle time between two starts detected through this if statement. This approach however results in ms. If I manually compare the time between starts with the output it's within 2-3s. Would appreciate some help!
counter = 0
stage = "start"
diff = 0
wrist_y = landmarks[mp_pose.PoseLandmark.RIGHT_WRIST.value].y
if wrist_y < 0.3 and stage == "start":
start_time = time.time()
stage = "running"
if wrist_y >= 0.3 and stage == "running":
end_time = time.time()
diff = end_time - start_time
diff = round(diff, 2)
stage = "start"
counter += 1