print stack watermarks in sysinfo page
This commit is contained in:
2
Config.h
2
Config.h
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define NUKI_HUB_VERSION "8.12-pre-8"
|
#define NUKI_HUB_VERSION "8.12-pre-9"
|
||||||
|
|
||||||
#define MQTT_QOS_LEVEL 1
|
#define MQTT_QOS_LEVEL 1
|
||||||
#define MQTT_CLEAN_SESSIONS false
|
#define MQTT_CLEAN_SESSIONS false
|
||||||
@@ -785,6 +785,14 @@ void WebCfgServer::buildInfoHtml(String &response)
|
|||||||
response.concat(esp_get_free_heap_size());
|
response.concat(esp_get_free_heap_size());
|
||||||
response.concat("\n");
|
response.concat("\n");
|
||||||
|
|
||||||
|
response.concat("Stack watermarks: nw: ");
|
||||||
|
response.concat(uxTaskGetStackHighWaterMark(networkTaskHandle));
|
||||||
|
response.concat(", nuki: ");
|
||||||
|
response.concat(uxTaskGetStackHighWaterMark(nukiTaskHandle));
|
||||||
|
response.concat(", pd: ");
|
||||||
|
response.concat(uxTaskGetStackHighWaterMark(presenceDetectionTaskHandle));
|
||||||
|
response.concat("\n");
|
||||||
|
|
||||||
response.concat("Restart reason FW: ");
|
response.concat("Restart reason FW: ");
|
||||||
response.concat(getRestartReason());
|
response.concat(getRestartReason());
|
||||||
response.concat( "\n");
|
response.concat( "\n");
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
#include "NukiOpenerWrapper.h"
|
#include "NukiOpenerWrapper.h"
|
||||||
#include "Ota.h"
|
#include "Ota.h"
|
||||||
|
|
||||||
|
extern TaskHandle_t networkTaskHandle;
|
||||||
|
extern TaskHandle_t nukiTaskHandle;
|
||||||
|
extern TaskHandle_t presenceDetectionTaskHandle;
|
||||||
|
|
||||||
enum class TokenType
|
enum class TokenType
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
|
|||||||
15
main.cpp
15
main.cpp
@@ -32,6 +32,10 @@ unsigned long restartTs = (2^32) - 5 * 60000;
|
|||||||
RTC_NOINIT_ATTR int restartReason;
|
RTC_NOINIT_ATTR int restartReason;
|
||||||
RTC_NOINIT_ATTR uint64_t restartReasonValid;
|
RTC_NOINIT_ATTR uint64_t restartReasonValid;
|
||||||
|
|
||||||
|
TaskHandle_t networkTaskHandle = nullptr;
|
||||||
|
TaskHandle_t nukiTaskHandle = nullptr;
|
||||||
|
TaskHandle_t presenceDetectionTaskHandle = nullptr;
|
||||||
|
|
||||||
void networkTask(void *pvParameters)
|
void networkTask(void *pvParameters)
|
||||||
{
|
{
|
||||||
while(true)
|
while(true)
|
||||||
@@ -53,7 +57,12 @@ void networkTask(void *pvParameters)
|
|||||||
|
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
|
// if(wmts < millis())
|
||||||
|
// {
|
||||||
|
// Serial.print("# ");
|
||||||
// Serial.println(uxTaskGetStackHighWaterMark(NULL));
|
// Serial.println(uxTaskGetStackHighWaterMark(NULL));
|
||||||
|
// wmts = millis() + 60000;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,9 +105,9 @@ void setupTasks()
|
|||||||
{
|
{
|
||||||
// configMAX_PRIORITIES is 25
|
// configMAX_PRIORITIES is 25
|
||||||
|
|
||||||
xTaskCreatePinnedToCore(networkTask, "ntw", 8192, NULL, 3, NULL, 1);
|
xTaskCreatePinnedToCore(networkTask, "ntw", 8192, NULL, 3, &networkTaskHandle, 1);
|
||||||
xTaskCreatePinnedToCore(nukiTask, "nuki", 4096, NULL, 2, NULL, 1);
|
xTaskCreatePinnedToCore(nukiTask, "nuki", 4096, NULL, 2, &nukiTaskHandle, 1);
|
||||||
xTaskCreatePinnedToCore(presenceDetectionTask, "prdet", 768, NULL, 5, NULL, 1);
|
xTaskCreatePinnedToCore(presenceDetectionTask, "prdet", 768, NULL, 5, &presenceDetectionTaskHandle, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getRandomId()
|
uint32_t getRandomId()
|
||||||
|
|||||||
Reference in New Issue
Block a user