mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-24 11:13:06 +01:00
Improve task start code for sensors and spiled
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ void sensorTask(void *param){
|
||||
void createSensorTask(SharedData *shared) {
|
||||
TaskHandle_t xHandle = NULL;
|
||||
GwLog *logger = shared->api->getLogger();
|
||||
esp_err_t err = xTaskCreate(sensorTask, "readSensors", configMINIMAL_STACK_SIZE + 2048, shared, 3, &xHandle);
|
||||
esp_err_t err = xTaskCreate(sensorTask, "readSensors", configMINIMAL_STACK_SIZE + 8192, shared, 3, &xHandle);
|
||||
if ( err != pdPASS) {
|
||||
logger->logDebug(GwLog::ERROR, "Failed to create sensor task! (err=%d)", err);
|
||||
};
|
||||
|
||||
@@ -56,9 +56,11 @@ public:
|
||||
}
|
||||
uint16_t add() {
|
||||
// returns new head value pointer
|
||||
return 0;
|
||||
}
|
||||
uint8_t* get() {
|
||||
// returns complete buffer in order new to old
|
||||
return 0;
|
||||
}
|
||||
uint8_t getvalue(uint16_t dt) {
|
||||
// Return a single value delta seconds ago
|
||||
@@ -66,6 +68,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
uint8_t getvalue3() {
|
||||
return 0;
|
||||
}
|
||||
bool clear() {
|
||||
// clears buffer and permanent storage
|
||||
|
||||
Reference in New Issue
Block a user