mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-09-29 00:37:33 +00:00
can_task as distributor
This commit is contained in:
@@ -35,4 +35,11 @@
|
||||
#include<sta/tacos/configs/default.hpp>
|
||||
#define STA_TACOS_NUM_STATES 3
|
||||
|
||||
// Configure CAN IDs for tasks
|
||||
#define SYSTEM_CAN_MSG_HANDLER 0x123
|
||||
#define SYSTEM_CAN_THERMO 0x124
|
||||
#define SYSTEM_CAN_RELAY 0x125
|
||||
#define SYSTEM_CAN_V_IN 0x126
|
||||
|
||||
#define SYSTEM_CAN_ERROR 0x013
|
||||
#endif /* INC_STA_CONFIG_HPP_ */
|
||||
|
@@ -11,16 +11,18 @@
|
||||
#include <sta/tacos/thread.hpp>
|
||||
#include <sta/devices/stm32/can.hpp>
|
||||
|
||||
namespace demo
|
||||
namespace tasks
|
||||
{
|
||||
class CanTask : public sta::tacos::TacosThread {
|
||||
public:
|
||||
CanTask(const char* name, uint32_t canID);
|
||||
CanTask(uint32_t canID);
|
||||
|
||||
void init() override;
|
||||
|
||||
void func() override;
|
||||
|
||||
private:
|
||||
void unpackValues(uint8_t packedByte, uint8_t* type_id, uint8_t* sensor_ID, uint8_t* value, uint8_t* include);
|
||||
};
|
||||
} // namespace demo
|
||||
|
||||
|
Reference in New Issue
Block a user