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

Improve task start code for sensors and spiled

This commit is contained in:
2025-08-26 12:23:39 +02:00
parent 494acbf0d0
commit 8e72537286
6 changed files with 19 additions and 1064 deletions

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <FreeRTOS.h>
#include "LedSpiTask.h"
#include "GwHardware.h"
@@ -251,6 +252,11 @@ void handleSpiLeds(void *param){
vTaskDelete(NULL);
}
void createSpiLedTask(LedTaskData *param){
xTaskCreate(handleSpiLeds,"handleLeds",4000,param,3,NULL);
void createSpiLedTask(LedTaskData *param) {
TaskHandle_t xHandle = NULL;
GwLog *logger = shared->api->getLogger();
esp_err_t err = xTaskCreate(handleSpiLeds, "handleLeds", configMINIMAL_STACK_SIZE + 2048, param, 3, &xHandle);
if (err != pdPASS) {
logger->logDebug(GwLog::ERROR, "Failed to create spiled task! (err=%d)", err);
};
}