Skip to content

Conversation

JakubAndrysek
Copy link
Contributor

This pull request adds functionality to list all GPIO pins available in the simulation. The main update is the introduction of a new method to the client and its supporting implementation.

@@ -222,6 +251,10 @@ async def listen_pin(self, part: str, pin: str, listen: bool = True) -> Response
"""
return await pin_listen(self._transport, part=part, pin=pin, listen=listen)

async def gpio_list(self) -> ResponseMessage:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's return a useful type (ResponseMessage isn't really useful for someone who is using the API.
IMHO the client should check for error, and throw if there's one, otherwise just return the result with a proper type (so users know which fields to expect and what types they have)

@JakubAndrysek JakubAndrysek requested a review from urish August 20, 2025 12:55
@urish urish self-assigned this Aug 21, 2025
@urish urish merged commit 28f6c1a into wokwi:main Aug 21, 2025
0 of 5 checks passed
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