Skip to content

Set bitmap and palette to have default values #37

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 4 commits into from
Aug 20, 2020
Merged

Conversation

evaherrada
Copy link
Collaborator

@caternuson My only concern is that this has us importing displayio more than once.

@evaherrada evaherrada requested a review from caternuson August 6, 2020 17:45
@evaherrada evaherrada linked an issue Aug 6, 2020 that may be closed by this pull request
@caternuson
Copy link
Contributor

You could leave the parameter defaults as None and then check for None in the constructor and import as needed.

It might be worth having more discussion over in the issue thread before PR'ing. There may be reasons why my suggestion isn't a good idea? I'm not sure.

@evaherrada
Copy link
Collaborator Author

Good point

@evaherrada
Copy link
Collaborator Author

@caternuson I've made the changes you've suggested, but I'm totally fine waiting for this to be discussed before a decision is made.

@caternuson
Copy link
Contributor

OK, based on issue discussion, seems like no reason to keep pursuing this :)

The next thing I'd suggest is surrounding the displayio import with try/except block. So for setups that don't have displayio, the import will fail, you can catch that, and then just revert to the previous behavior.

@kattni
Copy link
Contributor

kattni commented Aug 17, 2020

@caternuson Dylan is away for a bit. Do you mind taking over this PR?

@caternuson caternuson requested review from a team and removed request for caternuson August 17, 2020 23:11
@caternuson
Copy link
Contributor

@kattni Sure, hopefully just a few minor things, which I just pushed. I removed me as reviewer and opened it up to CP librarians.

@kattni
Copy link
Contributor

kattni commented Aug 19, 2020

@FoamyGuy Please test this PR and if you approve, feel free to merge. Thanks!

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Looks good to me. I tested the changed library and new simpletest on Wio Terminal and CLUE.

I like that we were able to further simplify the simpletest.

@FoamyGuy FoamyGuy merged commit 4aa1c1c into master Aug 20, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 20, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 7.2.0 from 7.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#98 from makerdiary/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 0.11.6 from 0.11.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#37 from adafruit/default-params

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#5 from makermelissa/master
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.

Provide default behavior for bitmap and palette parameters?
4 participants