Skip to content

Simpletest improvements #14

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 2 commits into from
Aug 17, 2020
Merged

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Aug 3, 2020

These changes improve the simple test by making it more screen size independent.

The background bmp has been removed. Most screens default to black background anyway so this was not visually doing anything in most cases I think.

The width of the progress bar has been changed to be based on the screen width, that way this example will work on more different screen sizes and the progress bar will still fit on the screen.

Changes tested on Wio Terminal, PyGamer, and CLUE.

This resolves #9

@FoamyGuy FoamyGuy added the enhancement New feature or request label Aug 5, 2020
@FoamyGuy FoamyGuy requested a review from a team August 5, 2020 02:59
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

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

Thanks for making the progress bar dynamically sized.

Updating the code in the following guides to match the updated example may be useful to allow them to work with different screen-sizes:

totp

jeplayer

@kattni
Copy link
Contributor

kattni commented Aug 17, 2020

@FoamyGuy Are you up for updating the guides and related code suggested by Brent?

@kattni kattni merged commit 2fb1bd1 into adafruit:master Aug 17, 2020
@FoamyGuy
Copy link
Contributor Author

@kattni I am up for giving it a try.

Those projects UIs could be made a bit more generic which would allow them to fit on differently sized screens a bit better. However I will caution both of them do make use of other hardware peripherals available on their respective target devices. So the options for other devices to run them on might be a bit limited at the moment.

The 2fa code tool uses the Wifi co-processor to access the network to set up the code configuration (if I understand correctly). I think the next closet target device that it could support is maybe a PyBadge, or PyGamer with an Airlift Featherwing or Ethernet Featherwing plugged in. Those both have a smaller screen than the PyPortal so they would require adjusting the UI to fit. The PyPortal Titano has a larger resolution I think. So perhaps there is room to make the UI scale up nicely as well as scale down nicely.

jeplayer uses the SDCard and headphone jack on the PyGamer for storing music files, and listening to them playback via headphones resapectively. The UI could be adjusted to be more screen size independent but I'm not aware of any other strong candidates for target devices that this could be used on. The ideal candidate would have a built-in screen with a different size than PyGamer, and have a built-in SDcard slot, and 3.5mm jack. I will think on it and see if I can come up with a combination of hardware that would be suitable to run this project.

It will likely take me a little while to get to these though. I've got a few other things on my todo list already, and am working with limited time still at the moment for a few more weeks while I teach in the evenings.

@jepler
Copy link
Contributor

jepler commented Aug 18, 2020

pygamer has a speaker, an SD card slot, and a different sized display. but you'd also have to switch the whole UI from being stick-based to being touchscreen-based. I toyed with it but in the end it was outside the scope of the JEplayer project.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 21, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_DHT to 3.5.0 from 3.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_DHT#46 from adafruit/pulseio-fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_HCSR04 to 0.4.3 from 0.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HCSR04#21 from FoamyGuy/dannystaple-readme-patch

Updating https://github.com/adafruit/Adafruit_CircuitPython_INA219 to 3.4.4 from 3.4.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA219#24 from nvtkaszpir/patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_INA219#23 from nvtkaszpir/patch-2
  > Merge pull request adafruit/Adafruit_CircuitPython_INA219#22 from nvtkaszpir/patch-3

Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS to 4.1.0 from 4.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM6DS#20 from adafruit/lsm6dso32

Updating https://github.com/adafruit/Adafruit_CircuitPython_MS8607 to 1.0.1 from 1.0.0:
  > updated PID

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCT2075 to 1.1.4 from 1.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_PCT2075#12 from garrettheath4/readme-fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PM25#6 from dglaude/patch-2

Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.2.0 from 2.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#37 from dunkmann00/listen-for-passive-target

Updating https://github.com/adafruit/Adafruit_CircuitPython_TLC59711 to 1.2.3 from 1.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_TLC59711#14 from FoamyGuy/remove_hardcoded_baudrate

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 1.2.0 from 1.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#27 from FoamyGuy/adding_more_examples
  > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#24 from FoamyGuy/fix_docs_link_in_readme

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit to 1.2.0 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Adafruit#6 from dhalbert/fix-packet-sizes

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.8.2 from 2.8.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#88 from FoamyGuy/fix_load_glyphs_for_builtin

Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.4.2 from 2.4.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#64 from rhooper/adjust-copyright

Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.2.1 from 3.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#46 from caternuson/example_rename
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#44 from caternuson/digi_step

Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 1.3.2 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#14 from FoamyGuy/simpletest_improvement

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.1.0 from 3.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#35 from FoamyGuy/adding_cpb_gizmo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simpletest could use generalized screen size
4 participants