mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-06 09:37:34 +00:00
Fixed the addThread function
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <sta/tacos/statemachine.hpp>
|
||||
|
||||
#include <initializer_list>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
namespace sta
|
||||
@@ -52,8 +53,11 @@ namespace sta
|
||||
* @param states A list of states in which the thread should run.
|
||||
* @param args The constructor arguments for the provided class.
|
||||
*/
|
||||
template<typename T>
|
||||
void addThread(std::list<uint16_t> states, std::initializer_list<T> args);
|
||||
template<typename T, typename ... Args>
|
||||
void addThread(std::list<uint16_t> states, Args ... args)
|
||||
{
|
||||
Manager::instance()->registerThread(std::make_shared<T>(args...), states);
|
||||
}
|
||||
} // namespace tacos
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user