Skip to content
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

Check for inconsistent CIRCUITPY and display CircuitPython update message #29

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

dhalbert
Copy link
Contributor

@dhalbert dhalbert commented Feb 21, 2024

Check for a CIRCUITPY drive that is too large, which indicates that CIRCUITPY was created by a version of CircuitPython older than 9.0.0 beta 2. If so, display and print a message, and hang.

Punctuation has changed slightly since this screen shot.

img_3018_720

@dhalbert
Copy link
Contributor Author

Review from anyone.

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.

check_for_update_needed() method addresses key issue described in the PR.

On L292, you may want to const() the FS size (1000000) as it's not going to be modified by a user and can save some space (likely negligible though, just something I noticed)
if circuitpy_stat[1] * circuitpy_stat[2] > 1000000:

@dhalbert
Copy link
Contributor Author

@brentru Since it doesn't have a name, const() will not save space. const() gets rid of _WHATEVER names that are global so that they are substituted at compile-time. It doesn't affect the actual constant.

@dhalbert dhalbert merged commit 516d9a6 into adafruit:main Feb 21, 2024
1 check passed
@dhalbert dhalbert deleted the circuitpython-update-check branch February 21, 2024 20:58
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 22, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_PyCamera to 1.0.0 from 0.0.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyCamera#29 from dhalbert/circuitpython-update-check
  > add basic_camera code
  > Merge pull request adafruit/Adafruit_CircuitPython_PyCamera#26 from adafruit/fix-spdx
  > Merge pull request adafruit/Adafruit_CircuitPython_PyCamera#25 from adafruit/focus_stack

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_ConnectionManager

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

3 participants