Skip to content

Commit aedb807

Browse files
committed
Merge branch 'bugfix/esp_ping_ms_pr1638' into 'master'
esp_ping - Document that timeout units are in milliseconds See merge request idf/esp-idf!1968
2 parents 0538daa + 86bf879 commit aedb807

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/lwip/apps/ping/esp_ping.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ esp_err_t esp_ping_set_target(ping_target_id_t opt_id, void *opt_val, uint32_t o
4949
break;
5050
case PING_TARGET_RCV_TIMEO:
5151
ESP_PING_CHECK_OPTLEN(opt_len, uint32_t);
52-
ping_option_info->ping_rcv_timeout = (*(uint32_t *)opt_val) * 1000;
52+
ping_option_info->ping_rcv_timeout = (*(uint32_t *)opt_val);
5353
break;
5454
case PING_TARGET_DELAY_TIME:
5555
ESP_PING_CHECK_OPTLEN(opt_len, uint32_t);
56-
ping_option_info->ping_delay = (*(uint32_t *)opt_val) * 1000;
56+
ping_option_info->ping_delay = (*(uint32_t *)opt_val);
5757
break;
5858
case PING_TARGET_ID:
5959
ESP_PING_CHECK_OPTLEN(opt_len, uint16_t);

components/lwip/apps/ping/esp_ping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ typedef struct _ping_found {
4545
typedef enum {
4646
PING_TARGET_IP_ADDRESS = 50, /**< target IP address */
4747
PING_TARGET_IP_ADDRESS_COUNT = 51, /**< target IP address total counter */
48-
PING_TARGET_RCV_TIMEO = 52, /**< receive timeout */
49-
PING_TARGET_DELAY_TIME = 53, /**< delay time */
48+
PING_TARGET_RCV_TIMEO = 52, /**< receive timeout in milliseconds */
49+
PING_TARGET_DELAY_TIME = 53, /**< delay time in milliseconds */
5050
PING_TARGET_ID = 54, /**< identifier */
5151
PING_TARGET_RES_FN = 55, /**< ping result callback function */
5252
PING_TARGET_RES_RESET = 56 /**< ping result statistic reset */

0 commit comments

Comments
 (0)