mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-06 09:37:34 +00:00
Can bus start without handle
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <sta/tacos/thread.hpp>
|
||||
#include <sta/tacos/manager.hpp>
|
||||
#include <sta/tacos/statemachine.hpp>
|
||||
#include <sta/tacos/can_bus.hpp>
|
||||
|
||||
#include <initializer_list>
|
||||
#include <type_traits>
|
||||
@@ -76,6 +77,8 @@ namespace sta
|
||||
|
||||
return thread_ptr;
|
||||
}
|
||||
|
||||
//bool queueCanBusMsg(const CanDataMsg & msg, uint32_t timeout);
|
||||
} // namespace tacos
|
||||
}
|
||||
|
||||
|
@@ -32,19 +32,19 @@ namespace sta
|
||||
{
|
||||
public:
|
||||
|
||||
CanBus(CAN_HandleTypeDef * controller);
|
||||
CanBus();
|
||||
|
||||
/**
|
||||
* @brief Getter function for the singleton instance.
|
||||
*/
|
||||
static CanBus* instance(CAN_HandleTypeDef * handle)
|
||||
static CanBus* instance()
|
||||
{
|
||||
static CGuard g;
|
||||
|
||||
if (!_instance)
|
||||
{
|
||||
// Create the can bus singleton instance.
|
||||
CanBus::_instance = new CanBus(handle);
|
||||
CanBus::_instance = new CanBus();
|
||||
}
|
||||
|
||||
return _instance;
|
||||
@@ -115,7 +115,7 @@ namespace sta
|
||||
|
||||
AlpakaCanBus canBus_;
|
||||
|
||||
|
||||
static RtosEvent messageEvent;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user