Skip to content

New features added#5

Open
novalore wants to merge 12 commits into
bendardenne:masterfrom
novalore:dev
Open

New features added#5
novalore wants to merge 12 commits into
bendardenne:masterfrom
novalore:dev

Conversation

@novalore
Copy link
Copy Markdown

The module works again with the new API and I am using it on my mirror, but noticed that waiting times are not always very easy to read and keep in mind, so I added options to visualize actual arrival times.

Added other options too and documented them in the README.
PollInterval is particularly useful when testing without Api key or checking the CSS on the MagicMirror page.

Merge if you like it

Added configurable pollInterval
Added functions to calculate actual arrival time from waiting time and display it (or not) based on configuration (24h or 12h formats supported
Third option added to the if in getTimeDiv
Comment thread MMM-stib2.js
.then(() => this.update())
.then(() => {
// Schedule updates
// Convert pollInterval to a number if it's a string representation of a number
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

polInterval can be dangerous. To avoid issues I added validation here

Comment thread MMM-stib2.js

icon.appendChild(bus);
icon.appendChild(slash);
} else {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Forgot about this special case.
Restore this section if needed

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.

1 participant