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

otisserv: Display driving directions #206

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

Conversation

mike8643
Copy link
Contributor

@mike8643 mike8643 commented Sep 13, 2023

Description ( description of the refactor, including the goals it accomplishes.)
Does not include other changes there were in dev-c3 already to tie param "CustomMapBox" to navD, therefore I could not test outside of on dev-c3 branch
Added Navigation driving directions to the local nav web server.
Saves a lightweight json version of the navd mapbox routing pulling out unnecessary components.
Adds to the json, Current Destination and Current Step.
New tpl for javascript to display information on the screen.
After entering destination through webserver, driving directions will immediately show up.
If refreshed, webpage will display driving directions if param NavDestination is populated, in the case where the user enters the address directly onto the Comma device.
Displays Current Destination, and clearer step text while removing previous steps once completed.
Refreshes every 5 seconds for new data.
Known Limitations:
Does not decrease distance as you drive during that step, I did not want to add additional code to support this to make it lighter.
Without Comma device in the onroad state, entering new destination will not refresh destination or directions since navd does not attempt to pull new mapbox api until device is in the onroad state.
I am not a programmer by trade, this code works for me but can always be optimized.
Verification [](Explain how you tested the refactor for regressions.)
Works fine on my end during my testing period of over a week. Used mobile iOS safari browser as well as chrome loaded onto my infotainment system.

@sunnyhaibin sunnyhaibin changed the title nav web server driving directions otisserv: Display driving directions Oct 31, 2023
@mike8643
Copy link
Contributor Author

mike8643 commented Nov 1, 2023

Added code to support metric units based on the param "IsMetric"
Added code to default to showing driving directions only for prime subscribers.

@mike8643
Copy link
Contributor Author

Added dark mode toggle. Default dark mode, set cookie for saved preference.
Reduced data transfer when updating directions throughout route. Helps when remotely viewing directions over mobile internet.

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.

None yet

1 participant