Skip to content

ESPNow.send argument types / @overloads #16654

Answered by glenn20
Josverl asked this question in ESP32
Discussion options

You must be logged in to vote

@Josverl , sorry for the slow response.

Thanks again for your work on the stubs... they make coding in micropython so much more productive :).

I believe, you should change

class ESPNow(ESPNowBase, Iterator):
    #....
    def send(
        self,
        peer: _MACAddress,
        msg: str | bytes,
        mac: _MACAddress | None = None,
        sync: bool = True,
    ) -> bool:

to

class ESPNow(ESPNowBase, Iterator):
    #....
    def send(
        self,
        peer: _MACAddress,
        msg: str | bytes,
        sync: bool = True,
    ) -> bool:

ie. remove the mac argument. In the docs, I use the name mac for the first argument (that you have called peer). I started with peer, but fo…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Josverl
Comment options

Josverl Feb 10, 2025
Author Sponsor

@Josverl
Comment options

Josverl Feb 10, 2025
Author Sponsor

Answer selected by Josverl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
2 participants