-
Notifications
You must be signed in to change notification settings - Fork 4
Update network.py for Issue #7 #11
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
Code prints the status_neopixel to stdout when it should only, perhaps, do that on debug. Fixes #7
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.
adafruit_fruitjam/network.py
Outdated
@@ -88,7 +88,7 @@ def __init__( # noqa: PLR0913 Too many arguments in function definition | |||
image_position=None, | |||
image_dim_json_path=None, | |||
): | |||
print(f"status_neopixel", status_neopixel) | |||
# print(f"status_neopixel", status_neopixel) |
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.
I see the PR mentions debug printing, however the actual PR change is a comment. Was the print line meant to be commented out?
If we want to print only in debug mode as your PR mentions, instead of commenting this line out, check for the network class' debug kwarg and print
if its true
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.
I believe the line was used by the author to print the status and left in when the final version should not be printing the value to the serial monitor (stdout). @FoamyGuy is this correct?
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.
The print was put in during development to check on the status_neopixel state. It was left in accidentally.
I think it can just be removed entirely, no need to leave the commented version. If we did want to keep it then it can have logic added to check for debug like:
if debug:
print(f"status_neopixel", status_neopixel)
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.
Latest version removes the line per @FoamyGuy
Remove debug print from development
👋 Thanks for this pull request! Unfortunately, it looks like the automated continuous integration (CI) test(s) failed. These can be tricky to fix so we've written a guide on how to fix them locally. It has pages about running pre-commit locally and another about building the docs locally with sphinx. Thanks for contributing to CircuitPython! If you have more questions, feel free to join the Adafruit Discord and post in #circuitpython-dev. |
Delete blank line
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.
LGTM! Thanks for making this change
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.
Thank you!
Updating https://github.com/adafruit/Adafruit_CircuitPython_DotStar to 2.2.18 from 2.2.17: > Merge pull request adafruit/Adafruit_CircuitPython_DotStar#71 from dhalbert/spi-lock-managment Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.15.0 from 2.14.0: > Merge pull request adafruit/Adafruit_CircuitPython_EPD#94 from adafruit/UC8197 > Merge pull request adafruit/Adafruit_CircuitPython_EPD#95 from adafruit/ssd1883 > Merge pull request adafruit/Adafruit_CircuitPython_EPD#93 from adafruit/ssd1680_fix > Merge pull request adafruit/Adafruit_CircuitPython_EPD#90 from AJMansfield/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_JD79661 to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_JD79661#1 from adafruit/cleanup Updating https://github.com/adafruit/Adafruit_CircuitPython_TLV320 to 1.2.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_TLV320#11 from samblenny/fix-example-link > Merge pull request adafruit/Adafruit_CircuitPython_TLV320#10 from samblenny/volume-fixes Updating https://github.com/adafruit/Adafruit_CircuitPython_FruitJam to 1.2.0 from 0.5.0: > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#13 from FoamyGuy/volume_api > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#14 from mikeysklar/ntp-helper > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#12 from mikeysklar/headphone-speaker > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#11 from adafruit/TheKitty-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#9 from relic-se/request_display_config-default > Merge pull request adafruit/Adafruit_CircuitPython_FruitJam#8 from relic-se/any_button_pressed-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_UC8253
Code prints the status_neopixel to stdout when it should only, perhaps, do that on debug. Fixes #7