Skip to content

make user_data "public" #188

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 5 commits into from
Nov 27, 2023
Merged

make user_data "public" #188

merged 5 commits into from
Nov 27, 2023

Conversation

vladak
Copy link
Contributor

@vladak vladak commented Nov 24, 2023

This change makes using user_data more accessible for received message callbacks.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thank you @vladak.

I do agree with the overall premise that it would be ideal if the on_message() callback matched the signature of all the other callbacks with regards to getting user data passed to it. It stands out as a discrepancy amongst the different callbacks.

Honestly I think in the long term I'd be okay with a breaking change that added it as as the second argument so that the callbacks would match signatures from then on. If you're interested in potentially moving that direction maybe it's worth dropping a note in the meeting doc to discuss it in the weeds to get thoughts from the wider team and community.

I tested this version successfully on a FunHouse device with a slightly modified simpletest using some of the code in the new user_data example.

@FoamyGuy FoamyGuy merged commit 6270110 into adafruit:main Nov 27, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 28, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_HUSB238 to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_HUSB238#3 from millercommamatt/patch-2
  > example typo

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.18 from 2.1.17:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#48 from jerryneedell/jerryn_power

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 7.5.3 from 7.4.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#186 from vladak/var_header_vs_bytearray
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#183 from vladak/wait_for_msg_pkt_type
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#182 from vladak/time_monotonic_ns
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#188 from vladak/user_data_public

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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