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

HITL - Fix debug viewport size calculation. #1777

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

0mdc
Copy link
Contributor

@0mdc 0mdc commented Jan 29, 2024

Motivation and Context

Use floating point division instead of integer division to resolve viewport multiplier. Fractional DPI (<1.0) would result in a 0 viewport multiplier when rounding down after division.

This fixes the following error when creating a debug view in the HITL tool:
assert viewport_multiplier[0] > 0 and viewport_multiplier[1] > 0 (hitl_main.py)

How Has This Been Tested

Tested locally on: Fedora + KDE + RPM Fusion NVIDIA drivers

Types of changes

  • [Bug Fix] (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes if required.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 29, 2024
@0mdc 0mdc changed the title Fix debug viewport calculation size. Fix debug viewport size calculation. Jan 29, 2024
Copy link
Contributor

@henrysamer henrysamer left a comment

Choose a reason for hiding this comment

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

Tested locally. Looks good.

@0mdc 0mdc changed the title Fix debug viewport size calculation. HITL - Fix debug viewport size calculation. Jan 30, 2024
@0mdc 0mdc merged commit cd10143 into main Jan 30, 2024
4 checks passed
@0mdc 0mdc deleted the hitl-fix-debug-viewport-size branch January 30, 2024 21:07
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
HHYHRHY pushed a commit to SgtVincent/habitat-lab that referenced this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants