1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-03-28 18:06:37 +01:00

Work on system page

This commit is contained in:
2025-08-25 20:56:14 +02:00
parent d7251eeb8a
commit 494acbf0d0
5 changed files with 93 additions and 26 deletions

View File

@@ -20,6 +20,8 @@
#include "OBP60QRWiFi.h" // Functions lib for WiFi QR code
#include "OBPSensorTask.h" // Functions lib for sensor data
#include "freertos/task.h" // WIP possible unused
#ifdef BOARD_OBP40S3
#include "driver/rtc_io.h" // Needs for weakup from deep sleep
#include <SPI.h>
@@ -119,6 +121,27 @@ void OBP60Init(GwApi *api){
}
/* ux-functions not working WTF?
bool listTasks(GwLog *logger) {
UBaseType_t taskCount = uxTaskGetNumberOfTasks();
TaskStatus_t *taskStatusArray;
taskStatusArray = (TaskStatus_t *)pvPortMalloc(taskCount * sizeof(TaskStatus_t));
if (taskStatusArray != NULL) {
taskCount = uxTaskGetSystemState(taskStatusArray, taskCount, NULL);
for (UBaseType_t i = 0; i < taskCount; i++) {
logger->logDebug(GwLog::LOG, "Task Name: %s (Stack=%d)", taskStatusArray[i].pcTaskName,
taskStatusArray[i].usStackHighWaterMark);
// more fields in task status
// xHandle, uxCurrentPriority, uxBasePriority, usStackHighWaterMark
}
vPortFree(taskStatusArray);
return true;
}
logger->logDebug(GwLog::ERROR, "Failed to allocate memory for task list");
return false;
} */
class BoatValueList{
public:
static const int MAXVALUES=100;
@@ -756,6 +779,8 @@ void OBP60Task(GwApi *api){
pages[pageNumber].page->setupKeys(); // Initialize keys for first page
// listTasks(logger);
// Main loop runs with 100ms
//####################################################################################