mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-09-29 08:37:33 +00:00
Priority fix and isotp testing
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user