Skip to content

Conversation

@cs
Copy link
Contributor

@cs cs commented May 5, 2018

I came up with this while trying to make the animations "smoother" => currently, it's skipping animation icons quite often due to timing issues on my machine. Haven't been able to improve animation smoothness, though, as it appears to be a deeper issues. In any case, the calls of broadcast() appear to be timed correctly.

@patrick96
Copy link
Member

Thanks for contributing. People in #568 also complained about uneven animations. I will review this and look into why the animations has some deeper issues.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

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

Seems I never did come around to digging deeper on the framerate issue, and so I also never looked at this again, sorry about that 😅

If you are still around, I have reviewed this now.

Maybe the uneven animation come from the fact that we don't use a steady clock (the PR for this is #1725).

int framerate = 1000; // milliseconds
if (m_state == battery_module::state::CHARGING) {
broadcast();
framerate = m_animation_charging->framerate();
Copy link
Member

Choose a reason for hiding this comment

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

m_animation_charging may be NULL

framerate = m_animation_charging->framerate();
} else if (m_state == battery_module::state::DISCHARGING) {
broadcast();
framerate = m_animation_discharging->framerate();
Copy link
Member

Choose a reason for hiding this comment

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

m_animation_discharging may be NULL

@Lomadriel
Copy link
Member

Maybe the uneven animation come from the fact that we don't use a steady clock (the PR for this is #1725).

Nop the problem is the synchronization between the update and the animation thread. I fixed that in my PR (#1683). It also includes this PR.

@cs
Copy link
Contributor Author

cs commented Jan 22, 2020

Closing in favor of #1683.

@cs cs closed this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants