-
Notifications
You must be signed in to change notification settings - Fork 4
Automatically configure display size based on CIRCUITPY_DISPLAY_WIDTH
#9
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
Automatically configure display size based on CIRCUITPY_DISPLAY_WIDTH
#9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request to update docs with info about this. Looks good to me otherwise.
My typical usage for this function now is the following: from adafruit_fruitjam.peripherals import request_display_size
try:
request_display_size() # user display configuration
except ValueError: # invalid user config or no user config provided
request_display_size(720, 400) # default display size I think this is acceptable, but would you rather add another argument to default to the user configuration if provided? Ie: |
I think it's goodas-is with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! this looks good to me
Updating https://github.com/adafruit/Adafruit_CircuitPython_DotStar to 2.2.18 from 2.2.17: > Merge pull request adafruit/Adafruit_CircuitPython_DotStar#71 from dhalbert/spi-lock-managment Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.15.0 from 2.14.0: > Merge pull request adafruit/Adafruit_CircuitPython_EPD#94 from adafruit/UC8197 > Merge pull request adafruit/Adafruit_CircuitPython_EPD#95 from adafruit/ssd1883 > Merge pull request adafruit/Adafruit_CircuitPython_EPD#93 from adafruit/ssd1680_fix > Merge pull request adafruit/Adafruit_CircuitPython_EPD#90 from AJMansfield/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_JD79661 to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_JD79661#1 from adafruit/cleanup Updating https://github.com/adafruit/Adafruit_CircuitPython_TLV320 to 1.2.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_TLV320#11 from samblenny/fix-example-link > Merge pull request adafruit/Adafruit_CircuitPython_TLV320#10 from samblenny/volume-fixes Updating https://github.com/adafruit/Adafruit_CircuitPython_FruitJam to 1.2.0 from 0.5.0: > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#13 from FoamyGuy/volume_api > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#14 from mikeysklar/ntp-helper > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#12 from mikeysklar/headphone-speaker > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#11 from adafruit/TheKitty-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#9 from relic-se/request_display_config-default > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#8 from relic-se/any_button_pressed-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_UC8253
This update allows
request_display_config
to automatically configure the display to the user's preference (as determined byCIRCUITPY_DISPLAY_WIDTH
) if a specific size is not provided. It also allows the user to provide a desired width and automatically determine the appropriate display height.These changes are based on the implementation in Fruit-Jam-OS (adafruit/Fruit-Jam-OS#44) and hopefully could add uniformity to applications based in that ecosystem which support multiple display sizes rather than implementing this functionality independently.