mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-09-29 00:37:33 +00:00
Fixes and tested
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <tasks/can_task.hpp>
|
||||
#include <sta/debug/debug.hpp>
|
||||
#include <sta/rtos/debug/heap_stats.hpp>
|
||||
|
||||
#include <cmsis_os2.h>
|
||||
|
||||
@@ -24,7 +25,7 @@ namespace demo
|
||||
canController.start();
|
||||
|
||||
txHeader.id.format = sta::CanIdFormat::STD; // Set to EXT for extended ID
|
||||
txHeader.id.sid = 0x30; // Set the standard ID or extended ID
|
||||
txHeader.id.sid = 0x040; // Set the standard ID or extended ID
|
||||
txHeader.payloadLength = 8; // Set the payload length (max 8 bytes)
|
||||
|
||||
// Create your message payload
|
||||
@@ -35,7 +36,10 @@ namespace demo
|
||||
|
||||
void CanTask::func()
|
||||
{
|
||||
//STA_DEBUG_HEAP_STATS();
|
||||
canController.sendFrame(txHeader, payload);
|
||||
//STA_DEBUG_HEAP_STATS();
|
||||
STA_DEBUG_PRINTLN("SENT FRAME");
|
||||
HAL_Delay(1000);
|
||||
}
|
||||
} // namespace demo
|
||||
|
@@ -20,7 +20,7 @@
|
||||
// Create a CanTxHeader for your message
|
||||
sta::CanTxHeader txHeader;
|
||||
txHeader.id.format = sta::CanIdFormat::STD; // Set to EXT for extended ID
|
||||
txHeader.id.sid = 0x030; // Set the standard ID or extended ID
|
||||
txHeader.id.sid = 0x010; // Set the standard ID or extended ID
|
||||
txHeader.payloadLength = 8; // Set the payload length (max 8 bytes)
|
||||
|
||||
// Create your message payload
|
||||
|
Reference in New Issue
Block a user