1
0
Fork 0
mirror of https://github.com/kou029w/k2ping.git synced 2025-01-18 16:07:59 +00:00

resp->resp_timeが0の場合、次のレスポンスのとき意図しない上書きある不具合を修正

This commit is contained in:
Nebel 2017-04-21 19:13:45 +09:00
parent 7b9c0f8858
commit 42769d8c52

View file

@ -102,7 +102,7 @@ void ping_recv_cb(void *_option, void *_resp) {
} else { } else {
success++; success++;
avg_time += resp->resp_time; avg_time += resp->resp_time;
if (min_time == 0 || resp->resp_time < min_time) min_time = resp->resp_time; if (success == 1 || resp->resp_time < min_time) min_time = resp->resp_time;
if (resp->resp_time > max_time) max_time = resp->resp_time; if (resp->resp_time > max_time) max_time = resp->resp_time;
total_bytes += resp->bytes; total_bytes += resp->bytes;
lcd.setCursor(0, 1); lcd.setCursor(0, 1);