10000 Convert distance and altitude to imperial measurements when needed by gsarjeant · Pull Request #59 · snicker/zwift_hass · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Convert distance and altitude to imperial measurements when needed #59

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

gsarjeant
Copy link

Resolves #58

Zwift always returns distance and 8000 altitude in meters. This PR converts them to the approriate imperial units (miles for distance, miles per hour for speed, and feet for altitude) before displaying if the user's preference is to use imperial units.

@cagnulein
Copy link

I like it!

@gsarjeant
Copy link
Author

I messed up some of the original formatting while I was working this out, I've added commits to reduce the PR to just the changes I've made. If you'd rather I squash it down to a single commit, just let me know.

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.

useMetric field from API may not be interpreted correctly.
2 participants
0