From 86bf8798b2381ba7c37bd19a9c12189faf7fe80e Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sun, 18 Feb 2018 18:47:46 -0500 Subject: [PATCH] esp_ping - Document that timeout units are in milliseconds Remove 1000 multiplier from esp_ping_set_target() parameters that define time --- components/lwip/apps/ping/esp_ping.c | 4 ++-- components/lwip/apps/ping/esp_ping.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lwip/apps/ping/esp_ping.c b/components/lwip/apps/ping/esp_ping.c index 542eb07c4..cae4c866b 100644 --- a/components/lwip/apps/ping/esp_ping.c +++ b/components/lwip/apps/ping/esp_ping.c @@ -49,11 +49,11 @@ esp_err_t esp_ping_set_target(ping_target_id_t opt_id, void *opt_val, uint32_t o break; case PING_TARGET_RCV_TIMEO: ESP_PING_CHECK_OPTLEN(opt_len, uint32_t); - ping_option_info->ping_rcv_timeout = (*(uint32_t *)opt_val) * 1000; + ping_option_info->ping_rcv_timeout = (*(uint32_t *)opt_val); break; case PING_TARGET_DELAY_TIME: ESP_PING_CHECK_OPTLEN(opt_len, uint32_t); - ping_option_info->ping_delay = (*(uint32_t *)opt_val) * 1000; + ping_option_info->ping_delay = (*(uint32_t *)opt_val); break; case PING_TARGET_ID: ESP_PING_CHECK_OPTLEN(opt_len, uint16_t); diff --git a/components/lwip/apps/ping/esp_ping.h b/components/lwip/apps/ping/esp_ping.h index d3c648828..993fee214 100644 --- a/components/lwip/apps/ping/esp_ping.h +++ b/components/lwip/apps/ping/esp_ping.h @@ -45,8 +45,8 @@ typedef struct _ping_found { typedef enum { PING_TARGET_IP_ADDRESS = 50, /**< target IP address */ PING_TARGET_IP_ADDRESS_COUNT = 51, /**< target IP address total counter */ - PING_TARGET_RCV_TIMEO = 52, /**< receive timeout */ - PING_TARGET_DELAY_TIME = 53, /**< delay time */ + PING_TARGET_RCV_TIMEO = 52, /**< receive timeout in milliseconds */ + PING_TARGET_DELAY_TIME = 53, /**< delay time in milliseconds */ PING_TARGET_ID = 54, /**< identifier */ PING_TARGET_RES_FN = 55, /**< ping result callback function */ PING_TARGET_RES_RESET = 56 /**< ping result statistic reset */