Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
a7md0 committed Aug 1, 2019
1 parent ec1b199 commit f628a8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void wakeDeviceTask(void *pvParameters) {
if (device->retrieveStatus == true) {
deviceIP.fromString(device->ip.c_str());

addIcmpRequst(device->mac, deviceIP, device->channel, PING_RETRY_NUM);
icmpRequstAdd(device->mac, deviceIP, device->channel, PING_RETRY_NUM);
}

delete pvParameters;
Expand All @@ -320,7 +320,7 @@ void deviceStatusTask(void *pvParameters) {
IPAddress deviceIP;

deviceIP.fromString(status->ip.c_str());
addIcmpRequst(status->mac, deviceIP, status->channel, 1);
icmpRequstAdd(status->mac, deviceIP, status->channel, 1);

delete pvParameters;
vTaskDelete(NULL);
Expand Down Expand Up @@ -394,7 +394,7 @@ void icmpTask(void *pvParameters) {
}
}

void addIcmpRequst(String &mac, IPAddress ip, String &topic, uint8_t maxTries) {
void icmpRequstAdd(String &mac, IPAddress ip, String &topic, uint8_t maxTries) {
bool addedToQueue = false;

for (uint8_t i = 0; i < icmpQueueSize; i++) {
Expand Down Expand Up @@ -422,7 +422,7 @@ void addIcmpRequst(String &mac, IPAddress ip, String &topic, uint8_t maxTries) {
vTaskResume(icmpTaskHandler);
else {
vTaskDelay(pdMS_TO_TICKS(FAILED_DELAY_MS));
addIcmpRequst(mac, ip, topic, maxTries);
icmpRequstAdd(mac, ip, topic, maxTries);
}
}

Expand Down

0 comments on commit f628a8c

Please sign in to comment.