-
Notifications
You must be signed in to change notification settings - Fork 76
Enable CS "active-high" device support to resolve #71 #72
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
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.
Changes look good here but I have not had a chance to test it yet. Approved the workflow to run to make sure that is okay.
@gamblor21 Pass the dunce cap - I thought I'd checked these but a bug has crept back in - now fixed. |
0d55b6d
to
3259adb
Compare
@gamblor21 Locally, I'm seeing pylint failures only for the examples (f-string recommendations for formatting). Would you like me to include those in this patch, to get it clean? Or a separate PR as that's not anything I've touched? |
edit sorry I missed that this was causing the checks to fail. If you can include the changes in this PR that would work. |
e6ae5f7
to
786fc7e
Compare
@gamblor21 I've included the pylint f-string fix here, so both my PR should (hopefully) now be ready for review / merge. Thanks for your help. |
ffaaa71
to
fad167a
Compare
@gamblor21 - I'm baffled, sorry. The proposed fix to the print issue is now itself failing pylint checks with undefined variable. Could this be a variant of pylint-dev/pylint#3791 or have I messed up - I tried the code in the REPL and all seemed well... but pre-commit fails. |
ad7d8c8
to
43728fa
Compare
I've defined |
@gamblor21 This is ready for a new build test now. |
So a couple comments after checking with others who know pylint and python much better then I:
See: https://github.com/adafruit/Adafruit_CircuitPython_DS18X20/blob/main/.pre-commit-config.yaml for an example that someone else did when they ran into the same problem. If any of this gets confusing please let me know and I can help as well. And thank you so much for your patience with this PR! |
Certainly - that seems like the elegant solution (until pylint can grok comprehensions inside other structures). |
55fd04b
to
7d75df2
Compare
@gamblor21 - all done. I'm happy to help, I will be the beneficiary in the long run! |
One hopefully last thing, can you undo the example changes, the additional ignore flag should remove the need for that. |
@gamblor21 Sure - I misunderstood and thought you only wanted the ugly x="" gone. I'll revert both. |
Reference adafruit#71 Enables SPIDevice to be used for things like the Sitronix ST7920 LCD display which requires CS to be pulled high during commands or data transfers. Adds a new attribute (cs_active_value) to set the preferred logic for the CS line. Default false (active low).
da658b5
to
4b8955b
Compare
Updating https://github.com/adafruit/Adafruit_CircuitPython_DS18X20 to 1.3.7 from 1.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_DS18X20#23 from caternuson/new_example > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3741 to 1.1.2 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3741#6 from adafruit/philb-clip-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 5.1.0 from 5.0.6: > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#72 from michthom/michthom-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#68 from 2bndy5/note-about-builtin-pkg > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold "
Reference #71
Enables SPIDevice to be used for devices which requires CS to be active high.
Adds a new boolean parameter cs_active_value.
Linked PR raised against circuitpython shared bindings / shared module code.