Skip to content

Add QwiicCustomOLED #12

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

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Add QwiicCustomOLED #12

merged 3 commits into from
Nov 7, 2023

Conversation

PaulZC
Copy link
Contributor

@PaulZC PaulZC commented Nov 7, 2023

This release adds the QwiicCustomOLED class:

  • The display width, height, contrast etc. can be defined manually before the display is begun
  • This allows a single class to be used for multiple display types
    • This is useful when writing code for a product which could have either a 64x48 Micro OLED or a 128x64 1.3" OLED connected

@PaulZC PaulZC requested a review from gigapod November 7, 2023 10:08
Copy link
Member

@gigapod gigapod left a comment

Choose a reason for hiding this comment

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

Awesome addition!

@gigapod gigapod merged commit 40db6ce into main Nov 7, 2023
@gigapod gigapod deleted the Add_QwiicCustomOLED branch November 7, 2023 17:22
@PaulZC
Copy link
Contributor Author

PaulZC commented Nov 7, 2023

Sweet. Thanks!

@gigapod
Copy link
Member

gigapod commented Nov 7, 2023

Thinking on this -- the one way to get around setting m_device public, is to create accessor methods on the device for the parameters needed. So QwOLEDCustom would have set[value] methods, which would stash the values in the instance data and use them on init. The QwiicCustomOLED class also implement the same methods and just call the same methods on m_device. ... In this case, m_device would need to be protected, not private.

@PaulZC
Copy link
Contributor Author

PaulZC commented Nov 7, 2023

Okie dokie. I'll get on this tomorrow! (I don't think we need to revert anything today. The changes and example work - and haven't been released. We can safely finesse them tomorrow.)

@gigapod
Copy link
Member

gigapod commented Nov 7, 2023

Thanks Paul. In a way, this is just object oriented syntactical sugar :), but it's the correct way to proceed.

@PaulZC PaulZC restored the Add_QwiicCustomOLED branch November 8, 2023 13:02
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