1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

intermediate: running sensor tasks inits after all user init tasks

This commit is contained in:
andreas
2024-11-16 20:36:28 +01:00
parent f75f8033d1
commit 1ab70aca8b
5 changed files with 20 additions and 8 deletions

View File

@@ -15,22 +15,25 @@ class GwApiInternal : public GwApi{
};
class GwUserTask{
public:
static const int DEFAULT_STACKSIZE=2000;
String name;
TaskFunction_t task=NULL;
GwUserTaskFunction usertask=NULL;
bool isUserTask=false;
GwApiInternal *api=NULL;
int stackSize=2000;
GwUserTask(String name,TaskFunction_t task,int stackSize=2000){
int order=0;
GwUserTask(String name,TaskFunction_t task,int stackSize=DEFAULT_STACKSIZE){
this->name=name;
this->task=task;
this->stackSize=stackSize;
}
GwUserTask(String name, GwUserTaskFunction task,int stackSize=2000){
GwUserTask(String name, GwUserTaskFunction task,int stackSize=DEFAULT_STACKSIZE, int order=0){
this->name=name;
this->usertask=task;
this->isUserTask=true;
this->stackSize=stackSize;
this->order=order;
}
};