]> granicus.if.org Git - esp-idf/commitdiff
esp_ping - Document that timeout units are in milliseconds
authorChris Morgan <chmorgan@gmail.com>
Sun, 18 Feb 2018 23:47:46 +0000 (18:47 -0500)
committerChris Morgan <chmorgan@gmail.com>
Sun, 18 Feb 2018 23:47:46 +0000 (18:47 -0500)
Remove 1000 multiplier from esp_ping_set_target() parameters that define time

components/lwip/apps/ping/esp_ping.c
components/lwip/apps/ping/esp_ping.h

index 542eb07c4b71fcc4b9afb95c66c3ff44199cfd78..cae4c866b1f2335b46625f832231a97eddec1042 100644 (file)
@@ -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);
index d3c6488281261478c367690ae2272de3d1c92b76..993fee214125623ae38ff94511892895004ff908 100644 (file)
@@ -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 */