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

Rework clear_status status to support newer STM32 devices #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bbrown1867
Copy link
Collaborator

@bbrown1867 bbrown1867 commented Oct 21, 2024

Please explain the changes you made here.

Attempting to use this package with a newer STM32 device (not an F-series) gave an issue - the first download attempt would fail with a pipe error.

I tried removing the dfu.clear_status(dev, interface) call and that fixed it, but then it caused a regression on STM32F2. To make both types of devices work, I reworked the clear_status call to be a retry step only if necessary.

I also discovered the infrastructure in this repo was outdated and needed updating. The new minimum version of Python is 3.9 and a few packages were updated.

Does this close any currently open issues?

No

Checklist:

@bbrown1867 bbrown1867 self-assigned this Oct 21, 2024
@@ -153,7 +178,8 @@ def _dfu_download(
xfer_size: Transfer size to use when downloading.
"""
# Download data
with Progress() as progress:
progress = Progress()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Started getting a weird mypy error and this change fixed it. 🤷🏻

@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ 3.7, 3.8, 3.9 ]
python-version: [ 3.9, 3.11, 3.12 ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

3.10 seemed to be interpreted as 3.1 by the CI runner, not sure why. Skipping since I don't think we need the coverage of 3.10 anyways.

@bbrown1867 bbrown1867 force-pushed the bbrown1867/fix-double-update-issue branch from 5a63542 to 86782ef Compare October 21, 2024 20:57
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.

1 participant