mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-08-06 14:07:35 +00:00
Priority fix and isotp testing
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#define STA_RTOS_SYSTEM_EVENTS_ENABLE
|
||||
// #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||
// #define STA_RTOS_WATCHDOG_ENABLE
|
||||
//#define STA_CAN_BUS_ENABLE
|
||||
#define STA_CAN_BUS_ENABLE
|
||||
|
||||
// Uses the default configuration for TACOS.
|
||||
#include<sta/tacos/configs/default.hpp>
|
||||
|
@@ -35,17 +35,24 @@ namespace demo
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
payload[i] = i + 1;
|
||||
}
|
||||
|
||||
struct CanMsgHeader header ={
|
||||
txHeader.id.sid, txHeader.id.eid, (uint8_t)txHeader.id.format, txHeader.payloadLength
|
||||
};
|
||||
|
||||
CanDataMsg myCanDataMsg;
|
||||
myCanDataMsg.header = header;
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
myCanDataMsg.payload[i] = payload[i];
|
||||
}
|
||||
|
||||
sta::tacos::CanBus::instance()->queueCanBusMsg(myCanDataMsg, osWaitForever);
|
||||
}
|
||||
|
||||
void CanTask::func()
|
||||
{
|
||||
//struct CanDataMsg myCanDataMsg = {
|
||||
///*.header = */ txHeader.id.sid, txHeader.id.eid, (uint8_t)txHeader.id.format, txHeader.payloadLength ,
|
||||
///*.payload = */ *payload // Initialize payload to zero (or any other values as needed)
|
||||
//};
|
||||
canController.sendFrame(txHeader, payload);
|
||||
//STA_DEBUG_PRINTLN(sta::tacos::CanBus::instance()->queueCanBusMsg(myCanDataMsg, osWaitForever));
|
||||
STA_DEBUG_PRINTLN("SENT FRAME");
|
||||
|
||||
STA_DEBUG_PRINTLN("Wasting time in CAN task...");
|
||||
HAL_Delay(1000);
|
||||
}
|
||||
} // namespace demo
|
||||
|
Submodule Libs/TACOS updated: 16b2ed5a20...411d671ff5
Reference in New Issue
Block a user