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

Fixed FPS Widget #3336

Merged
merged 5 commits into from
Oct 5, 2024
Merged

Conversation

Mr-Anyone
Copy link
Contributor

@Mr-Anyone Mr-Anyone commented Oct 3, 2024

Fix FPS Widget in Replay

Description

When viewing replay, there is an uncaught exception due to FrametimeCounter not being initialized. This PR fixes that I think.

Testing Done

Ran a replay file.

Resolved Issues

None

Length Justification and Key Files to Review

N/A

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@Mr-Anyone Mr-Anyone requested review from a team, nimazareian and mkhlb and removed request for a team October 3, 2024 07:58
Comment on lines 493 to 494
frame_swap_counter=frame_swap_frametime_counter,
refresh_counter=refresh_func_frametime_counter,
Copy link
Contributor

Choose a reason for hiding this comment

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

You should instantiate the FrametimeCounters right here instead of using the same variables for both the blue_replay_log and yellow_replay_log branches, since I think you might be able to run thunderscope with both a blue and yellow replay at the same time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait, this is a thing. Ok will do

@@ -487,11 +488,15 @@ def configure_replay_view(
replay_log=blue_replay_log,
visualization_buffer_size=visualization_buffer_size,
extra_widgets=[],
frame_swap_counter=FrameTimeCounter(),
refresh_counter=blue_refresh_func_counter,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to give some context:

This is not an anonymous object object because the same counter need to be used in both the confiure_replay_view and the TScopeTab widget. If we initialize two different object, then we run the trouble of displaying the wrong data.

Copy link
Contributor

@Lmh-java Lmh-java left a comment

Choose a reason for hiding this comment

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

Just tested, It works well on my machine 👍 👍

@Mr-Anyone Mr-Anyone merged commit 2b3cc8b into UBC-Thunderbots:master Oct 5, 2024
6 checks passed
Lmh-java pushed a commit to Lmh-java/Software that referenced this pull request Oct 25, 2024
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