Fixed compiler errors

This commit is contained in:
CarlWachter
2023-09-22 19:56:19 +02:00
committed by dario
parent 10bcad8203
commit 1e27384313
12 changed files with 55 additions and 32 deletions

View File

@@ -48,27 +48,13 @@ namespace sta
void func() override;
private:
class CGuard
{
public:
~CGuard()
{
if( NULL != Manager::_instance )
{
delete Manager::_instance;
Manager::_instance = NULL;
}
}
};
static Manager* _instance;
private:
Manager();
Manager(const Manager&);
~Manager() {}
//~Manager();
void updateThreads();
@@ -77,6 +63,19 @@ namespace sta
void stopThreads(uint16_t state);
std::set<TacosThread> threads_[STA_TACOS_NUM_STATES];
class CGuard
{
public:
~CGuard()
{
if( NULL != Manager::_instance )
{
delete Manager::_instance;
Manager::_instance = NULL;
}
}
};
};
} // namespace tacos
} // namespace sta

View File

@@ -25,6 +25,8 @@ namespace sta
*/
TacosThread(const char* name, osPriority_t prio);
TacosThread();
virtual ~TacosThread();
/**
@@ -62,7 +64,9 @@ namespace sta
* @brief The body of the thread's loop. Has to be implemented by the user.
*/
virtual void func();
private:
/**
* @brief Static function to pass to RTOS to run as a thread. Calls the loop function implemented here.
*/