From 219f2347da3b75b10965bc8ccad31be027888b01 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Wed, 3 Oct 2018 20:18:01 +0200 Subject: [PATCH] code sanitizations --- src/main.cpp | 36 ++++++++++++++++++------------------ src/statemachine.cpp | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4b61abdf..29d1b433 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,10 +39,10 @@ IDLE 1 0 ESP32 arduino scheduler ESP32 hardware timers ========================== - 0 Display-Refresh - 1 Wifi Channel Switch - 2 Send Cycle - 3 Housekeeping + 0 Trigger display refresh + 1 Trigger Wifi channel switch + 2 Trigger send payload cycle + 3 Trigger housekeeping cycle */ @@ -320,24 +320,24 @@ void setup() { #if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED) // start led loop ESP_LOGI(TAG, "Starting LEDloop..."); - xTaskCreatePinnedToCore(ledLoop, /* task function */ - "ledloop", /* name of task */ - 1024, /* stack size of task */ - (void *)1, /* parameter of the task */ - 3, /* priority of the task */ - &ledLoopTask, /* task handle */ - 0); /* CPU core */ + xTaskCreatePinnedToCore(ledLoop, // task function + "ledloop", // name of task + 1024, // stack size of task + (void *)1, // parameter of the task + 3, // priority of the task + &ledLoopTask, // task handle + 0); // CPU core #endif // start wifi channel rotation task ESP_LOGI(TAG, "Starting Wifi Channel rotation..."); - xTaskCreatePinnedToCore(switchWifiChannel, /* task function */ - "wifiloop", /* name of task */ - 2048, /* stack size of task */ - NULL, /* parameter of the task */ - 4, /* priority of the task */ - &wifiSwitchTask, /* task handle*/ - 0); /* CPU core */ + xTaskCreatePinnedToCore(switchWifiChannel, // task function + "wifiloop", // name of task + 2048, // stack size of task + NULL, // parameter of the task + 4, // priority of the task + &wifiSwitchTask, // task handle + 0); // CPU core } // setup() diff --git a/src/statemachine.cpp b/src/statemachine.cpp index 2592aa07..c1607fb6 100644 --- a/src/statemachine.cpp +++ b/src/statemachine.cpp @@ -28,10 +28,10 @@ void stateMachine(void *pvParameters) { if (HomeCycleIRQ) doHousekeeping(); - // check send cycle and if due enqueue payload to send + // check send cycle and if due enqueue payload to send if (SendCycleTimerIRQ) sendPayload(); - + // give yield to CPU vTaskDelay(2 / portTICK_PERIOD_MS); }