Add HASP_LOG_TASKS

This commit is contained in:
fvanroie 2023-01-17 23:05:07 +01:00
parent f542195dd6
commit d5337fe147
3 changed files with 13 additions and 4 deletions

View File

@ -1,10 +1,10 @@
/* MIT License - Copyright (c) 2019-2022 Francis Van Roie
/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_TFTESPI_TOUCH_DRIVER_H
#define HASP_TFTESPI_TOUCH_DRIVER_H
#ifdef ARDUINO&& defined(USER_SETUP_LOADED)
#ifdef ARDUINO && defined(USER_SETUP_LOADED)
#include <Arduino.h>
#include "touch_driver.h" // base class

View File

@ -1,4 +1,4 @@
/* MIT License - Copyright (c) 2019-2022 Francis Van Roie
/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
@ -364,6 +364,13 @@ static void debugPrintLvglMemory(int level, Print* _logOutput)
#endif // LV_MEM_CUSTOM
}
#if defined(ESP32) && defined(HASP_LOG_TASKS)
static void debugPrintTaskName(int level, Print* _logOutput)
{
debug_print(_logOutput, "[%s%6u]", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL));
}
#endif
static void debugPrintPriority(int level, Print* _logOutput)
{
switch(level) {
@ -408,6 +415,9 @@ void debugPrintPrefix(uint8_t tag, int level, Print* _logOutput)
debugPrintTimestamp(level, _logOutput);
debugPrintHaspMemory(level, _logOutput);
debugPrintLvglMemory(level, _logOutput);
#if defined(ESP32) && defined(HASP_LOG_TASKS)
debugPrintTaskName(level, _logOutput);
#endif
if(tag == TAG_MQTT_PUB && level == LOG_LEVEL_NOTICE) {
debugSendAnsiCode(F(TERM_COLOR_GREEN), _logOutput);

View File

@ -848,7 +848,6 @@ static void webHandleInfoJson()
{ // Send Content
String htmldata((char*)0);
htmldata.reserve(HTTP_PAGE_SIZE);
StaticJsonDocument<1024> doc;
htmldata += F("<h1>");
htmldata += haspDevice.get_hostname();