Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix elapsed time calculation in live view rate settiing. #300

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

timcnicholls
Copy link
Contributor

The elapsed time calcuation relies on truncating a posix_time duration to milliseconds as an int_32, which can fail with an incorrect value on the initial frame, or if the frame processor has been idling for long periods. To resolve this, the time since last frame variable is now stored and compared as a time_duration.

Also tidied up the live view decision logic so that the elapsed time is only calculated if the per_second rate setting is active

The elapsed time calcuation relies on truncating a posix_time duration
to milliseconds as an int_32, which can fail with an incorrect value
on the initial frame, or if the frame processor has been idling for
long periods. To resolve this, the time since last frame variable
is now stored and compared as a time_duration.
@timcnicholls timcnicholls added this to the 1.8.0 milestone May 27, 2022
@timcnicholls timcnicholls requested a review from ajgdls May 27, 2022 08:19
@timcnicholls timcnicholls self-assigned this May 27, 2022
Copy link
Contributor

@ajgdls ajgdls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this on my system and it is working as expected.

@timcnicholls timcnicholls merged commit 638e8ad into master Jun 14, 2022
@timcnicholls timcnicholls deleted the 299_live_view_rate_calc branch June 14, 2022 08:20
@GDYendell GDYendell mentioned this pull request Feb 7, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants