Skip to content

Update adafruit_rockblock.py#31

Merged
FoamyGuy merged 3 commits into
adafruit:mainfrom
gr3mlin:patch-1
Jan 15, 2026
Merged

Update adafruit_rockblock.py#31
FoamyGuy merged 3 commits into
adafruit:mainfrom
gr3mlin:patch-1

Conversation

@gr3mlin
Copy link
Copy Markdown
Contributor

@gr3mlin gr3mlin commented Oct 9, 2024

Recommend using the CRISX AT command to pull ring alerts because it includes a timestamp field, which will be added to the returned tuple. The timestamp can be monitored to check for recent ring alerts.

Recommend using the CRISX AT command to pull ring alerts because it includes a timestamp field, which will be added to the returned tuple. The timestamp can be monitored to check for recent ring alerts.
@caternuson
Copy link
Copy Markdown
Contributor

Have you tested this to make sure the parser line doesn't need any updating?

return tuple(resp[1].strip().decode().split(":")[1].split(","))

Seems like it should nominally work since it just splits on the ,. So will now be a 3 tuple instead of a 2 tuple.

image

@gr3mlin
Copy link
Copy Markdown
Contributor Author

gr3mlin commented Oct 15, 2024 via email

@caternuson
Copy link
Copy Markdown
Contributor

caternuson commented Oct 15, 2024

I may provide more commits for a new function as
the ability to interrupt on a change

Please submit that as a separate PR.

For this PR, looks good as is. But please also update the function doc string to cover the new behavior for ring_indication

@gr3mlin
Copy link
Copy Markdown
Contributor Author

gr3mlin commented Oct 15, 2024 via email

Copy link
Copy Markdown
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.

I merged main to this branch and added info to the docstrings about the timestamp field now being returned.

I also made it return a 3-tuple of None instead of 2 when the response is not OK.

@FoamyGuy FoamyGuy merged commit 64fa36e into adafruit:main Jan 15, 2026
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 16, 2026
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.

3 participants