Skip to content

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

Merged
merged 4 commits into from
Dec 3, 2020

Conversation

slootsky
Copy link
Contributor

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)
`

@ladyada ladyada requested a review from makermelissa November 29, 2020 22:46
Copy link
Collaborator

@makermelissa makermelissa left a 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.

@@ -46,7 +46,7 @@
)
raise

__version__ = "0.0.0-auto.0"
__version__ = "1.9.4"
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

Comment on lines 298 to 315
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)
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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]

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Thanks, looks good.

@makermelissa makermelissa merged commit 770a6cc into adafruit:master Dec 3, 2020
@slootsky slootsky deleted the feature/return_id_of_textbox branch December 3, 2020 01:27
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 3, 2020
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
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.

2 participants