Skip to content

Conversation

relic-se
Copy link
Contributor

This update allows request_display_config to automatically configure the display to the user's preference (as determined by CIRCUITPY_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.

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.

One request to update docs with info about this. Looks good to me otherwise.

@relic-se
Copy link
Contributor Author

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: request_display_size(720, 400, use_default=True).

@FoamyGuy
Copy link
Contributor

I think it's goodas-is with None being used as the signal to use defaults from settings.toml.

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.

Thank you! this looks good to me

@FoamyGuy FoamyGuy merged commit 9175c44 into adafruit:main Aug 12, 2025
1 check passed
@relic-se relic-se deleted the request_display_config-default branch August 12, 2025 20:59
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 29, 2025
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
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