mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-06-10 19:15:59 +00:00
Priority fix and isotp testing
This commit is contained in:
parent
af90c7f360
commit
6d4f8487a0
@ -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
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 16b2ed5a20df1c04b9bbcf5e12101d5e822e45d2
|
||||
Subproject commit 411d671ff5a6c495784492244a0e438232fa85d5
|
Loading…
x
Reference in New Issue
Block a user