-
Notifications
You must be signed in to change notification settings - Fork 22
return index of textbox #53
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
return index of textbox #53
Conversation
…nal and don't check for CHANGE ME
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 change the version back. Also, describe why you made the changes to the secrets check. Was this an accidental inclusion? That doesn't appear to be in the PR description.
adafruit_matrixportal/network.py
Outdated
@@ -46,7 +46,7 @@ | |||
) | |||
raise | |||
|
|||
__version__ = "0.0.0-auto.0" | |||
__version__ = "1.9.4" |
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 leave the version at "0.0.0-auto.0" or the automatic versioning won't work.
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.
Will do.
adafruit_matrixportal/network.py
Outdated
print("Connecting to AP", secrets["ssid"]) | ||
if secrets["ssid"] == "CHANGE ME" or secrets["password"] == "CHANGE ME": | ||
change_me = "\n" + "*" * 45 | ||
change_me += "\nPlease update the 'secrets.py' file on your\n" | ||
change_me += "CIRCUITPY drive to include your local WiFi\n" | ||
change_me += "access point SSID name in 'ssid' and SSID\n" | ||
change_me += "password in 'password'. Then save to reload!\n" | ||
change_me += "*" * 45 | ||
raise OSError(change_me) | ||
if "ssid" in secrets: | ||
if isinstance(secrets["ssid"], (list, tuple)): | ||
print( | ||
'secrets["ssid"] is a list or a tuple. I assume you know what you\'re doing' | ||
) | ||
else: | ||
print("Connecting to AP", secrets["ssid"]) | ||
if ( | ||
secrets["ssid"] == "CHANGE ME" | ||
or secrets["password"] == "CHANGE ME" | ||
): | ||
change_me = "\n" + "*" * 45 | ||
change_me += "\nPlease update the 'secrets.py' file on your\n" | ||
change_me += "CIRCUITPY drive to include your local WiFi\n" | ||
change_me += "access point SSID name in 'ssid' and SSID\n" | ||
change_me += "password in 'password'. Then save to reload!\n" | ||
change_me += "*" * 45 | ||
raise OSError(change_me) |
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.
What is the purpose of the change for the code to check if a user has set their SSID/password yet?
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.
yes, accidental inclusion. Sorry, I'll fix that.
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.
[this is part of another change I have on my side to allow a list of SSID and a list of passwords, allowing the device to connect to a different wifi, depending on which is available]
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, looks good.
Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.1.2 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#29 from slootsky/feature/return_index_of_textbox Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 1.9.6 from 1.9.5: > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#53 from slootsky/feature/return_id_of_textbox
This allows developer to receive the index of the textbox which was just created.
Usage:
`dateBox=matrixportal.add_text(blahblahblah)
timeBox=matrixportal.add_text(blahblahblah)
...various code...
matrixportal.set_text('the date',dateBox)
matrixportal.set_text('the time',timeBox)
`