-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a possibility to set a custom timeout time? #25
Comments
Maybe it helps to decrease count parameter... Otherwise check ping.cpp file where you have some places with a chance of time - optimization... |
there is not easy way to do this async.Part is the limiation of the LWIP stack and so on. |
I suggest adding the possibility to override the default values via build flags, it might fix part of the issue for @robsworld
|
Of course getting the possibility to use this libary asynchronously, would be the perfect solution. But even the solution idea of @CriPstian, would be a big step forward. Thanks anybody for paying attention and help :-) PS: for everybody who concerns:
|
@robsworld You can check the latest version which contains the customizable parameters. Cheers! |
I've modified the ESP32.cpp to expose more ping stats as follows float PingClass::averageTime() { byte PingClass::expectedCount(){ byte PingClass::errors(){ byte PingClass::success(){ and in ESP32.h However the 1 second DELAY between pings (in the dancol library) is an issue. Also the default parameters (in the dancol library) are in whole seconds so there is a minimum of 1 second for timeout and interval. EG #define PING_DEFAULT_TIMEOUT 1 ideally it would be good to have that in milliseconds/microseconds, as would seem to be possible from this code in ESP32Ping-Master/ping.cpp. #define PING_DEFAULT_TIMEOUT 1 |
Hi @johnerrington this looks like an easy task as we have all the necessary functionality in place. |
@CriPstian "this looks like an easy task" Maybe easy for you Cristian, buta LONG way outside my limited abilities! "You can check the latest version which contains the customizable parameters" |
Hi @johnerrington, I moved the discussion about your request in #34 so we don't pollute this thread with discussions about converting time units to milliseconds. #34 is not necessarily something to be implemented by you, or myself, but by anyone who feels capable. If you do not feel capable to contribute, you can open issues, like I did, and hope that the contributors will have time to implement. On your second point, you must notice that that commentary was directed to someone else, related to the current issue and not your own feature request. |
Thanks Cristian, I understand. |
This library works great, but it takes a long time for my proposal. I need to ping all 256 IPs of a local network. This takes several minutes. Because I am only working local, for me it is fine to set a shorter timeout to save time. Or is there a possibility to ping several IPs at the same time (asynchronously) ?
The text was updated successfully, but these errors were encountered: