pingResult callback is called one too many

ThorstenS
Posts: 5
Joined: Sun Sep 17, 2017 11:52 am

pingResult callback is called one too many

Postby ThorstenS » Sat Apr 27, 2019 11:02 am

I am using esp_ping_set_target() and ping_init(), and found that the callback pingResult() is called 5 times, when I set PING_TARGET_IP_ADDRESS_COUNT to 4. Is this a bug?

ThorstenS
Posts: 5
Joined: Sun Sep 17, 2017 11:52 am

Re: pingResult callback is called one too many

Postby ThorstenS » Sun Apr 28, 2019 6:26 am

By reading the source code of esp_ping.c, I noticed that for the last call of the callback, ping_err is set to PING_RES_FINISH. So the behaviour is intentional. Problem solved.

Who is online

Users browsing this forum: No registered users and 2 guests