dancol90 / ESP8266Ping

Ping library for ESP8266 Arduino core
GNU Lesser General Public License v2.1
265 stars 136 forks source link

Update coarse_time to intended value #14

Closed eykamp closed 4 years ago

eykamp commented 7 years ago

Pretty minor, but I think this is what you intended. I actually prefer the 1ms delay, as it makes everything feel peppy and overcaffeinated, which is how I like my software.

See: https://github.com/esp8266/Arduino/blob/master/tools/sdk/lwip/include/lwip/app/ping.h lines 24-27

me21 commented 6 years ago

Are you sure coarse_time is in milliseconds? If I call Ping.ping(ip); it returns in 4 seconds, which seems to indicate that coarse_time is in seconds. There are 5 pings by default, and 4 intervals between them.

If I set coarse_time to 2 instead of 1, it takes 8 seconds to ping. Which, again, strongly suggests that coarse_time is in seconds!

dancol90 commented 4 years ago

Hi! I confirm that coarse_time is indeed in seconds, so I cannot accept these changes