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 analog-clock example #8

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Conversation

rfuest
Copy link
Member

@rfuest rfuest commented Nov 16, 2020

Thank you for helping out with embedded-graphics-simulator development! Please:

  • Check that you've added passing tests and documentation
  • Add an example where applicable
  • Add a CHANGELOG.md entry in the Unreleased section under the appropriate heading (Added, Fixed, etc) if your changes affect the public API
  • Run rustfmt on the project
  • Run just build (Linux/macOS only) and make sure it passes. If you use Windows, check that CI passes once you've opened the PR.

PR description

This PR updates the analog-clock example.

Summary of the changes:

  • Removed the use of chaining
  • Merged the draw_..._ hand methods into one draw_hand method
  • Replaced some magic values by calculations
  • Added simple layout function create_face to make the code work on non square displays

@rfuest rfuest requested a review from jamwaffles November 16, 2020 18:17
@rfuest rfuest merged commit bde6b57 into embedded-graphics:master Nov 16, 2020
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