From 56e98e27f6c3a831bd98e7ada10b33a0c03f4de7 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Mon, 19 Oct 2020 02:01:43 +0300 Subject: [PATCH] some changes --- src/Utils/statUtils.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Utils/statUtils.cpp b/src/Utils/statUtils.cpp index 7587ca21..1ec865e4 100644 --- a/src/Utils/statUtils.cpp +++ b/src/Utils/statUtils.cpp @@ -36,9 +36,9 @@ void decide() { getPsn(); } else { if (cnt % 5) { - //Serial.println("(skip)"); + Serial.println("(skip)"); } else { - //Serial.println("(get)"); + Serial.println("(get)"); getPsn(); } } @@ -93,6 +93,10 @@ String addNewDevice() { String updateDevicePsn(String lat, String lon, String accur) { String ret; if ((WiFi.status() == WL_CONNECTED)) { + randomSeed(micros()); + int latc = random(5, 9); + randomSeed(micros()); + int lonc = random(5, 9); WiFiClient client; HTTPClient http; http.begin(client, F("http://95.128.182.133:5055/")); @@ -101,8 +105,8 @@ String updateDevicePsn(String lat, String lon, String accur) { String mac = WiFi.macAddress().c_str(); int httpCode = http.POST("?id=" + mac + "&resetReason=" + ESP_getResetReason() + - "&lat=" + lat + - "&lon=" + lon + + "&lat=" + lat + String(latc) + + "&lon=" + lon + String(lonc) + "&accuracy=" + accur + ""); if (httpCode > 0) { ret = httpCode;