-
Notifications
You must be signed in to change notification settings - Fork 21
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
https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO/issues/10 #30
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.
THanks for picking this up. A couple comments to simplify things.
simpleio.py
Outdated
@@ -230,9 +230,14 @@ class DigitalOut: | |||
""" | |||
Simple digital output that is valid until soft reset. | |||
""" | |||
def __init__(self, pin): | |||
def __init__(self, pin, value=None, drive_mode=None): |
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.
Simpler to do def __init__(self, pin, **kwargs):
simpleio.py
Outdated
def __init__(self, pin, value=None, drive_mode=None): | ||
""" | ||
value and drive_mode: if passed in will be passed to switch_to_output | ||
see digitalio.DigitalInOut.switch_to_output for more details |
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.
Please copy the docs here. Directing elsewhere doesn't simplify the docs.
ok, fixed all of your comments. again, tested to make sure python doesn't fail. |
Don't mention switch methods which are implementation details.
Thanks @apatt ! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#5 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#4 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_FancyLED to 1.2.0 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_FancyLED#4 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing to 0.9.2 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#15 from kattni/api-doc-fix > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#14 from kattni/busdevice-fix > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#13 from adafruit/revert-8-pypi > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#12 from adafruit/revert-9-pypi-fix > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#11 from adafruit/revert-10-pypi-fix > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#10 from kattni/pypi-fix > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#9 from kattni/pypi-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 3.2.0 from 3.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_HID#26 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.2.0 from 2.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#9 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#31 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#30 from apatt/master > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#28 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_Waveform to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_Waveform#4 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_Waveform#3 from sommersoft/new_docs
I was able to test that the parameter passing works as expected and that there are not python errors, but I don't know to confirm the underlying functions (switch_to_input and switch_to_output) functions work as expected.