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

Update frontPage.py to correct inches/mm conversion #533

Merged
merged 2 commits into from
Jan 2, 2018
Merged

Update frontPage.py to correct inches/mm conversion #533

merged 2 commits into from
Jan 2, 2018

Conversation

madgrizzle
Copy link
Contributor

The code to convert from values on the screen from inches to mm (and vice versa) assumes used 1 in to 25 mm conversion factor. It's more accurate to use the values defined just above in the code.

Just a little clean up.

The code to convert from values on the screen from inches to mm (and vice versa) assumes used 1 in to 25 mm conversion factor.  It's more accurate to use the values defined just above in the code
@BarbourSmith
Copy link
Member

I'm getting the issue I was having before we went to 25 as the conversion factor where the conversion is happening with arbitrarily high precision making the text overflow like this:

image

@madgrizzle
Copy link
Contributor Author

Ah, well, I'll see if I can add some rounding to it. Let's see if I can edit the PR.

@BarbourSmith
Copy link
Member

Great solution! I think commiting to the same branch again should automatically update the pull request

Added a formatting string to round to 2 decimal places
@madgrizzle
Copy link
Contributor Author

I think it updated. Python is strange (and new) to me. As with all things you don't know how to do, https://stackoverflow.com/questions/455612/limiting-floats-to-two-decimal-points FTW.

@BarbourSmith
Copy link
Member

Stack exchange is a life saver.

This works great for me. Good fix!

@BarbourSmith BarbourSmith merged commit 5109417 into MaslowCNC:master Jan 2, 2018
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.

2 participants