Added timeout so ISOTP processTX gets run time

This commit is contained in:
@CarlWachter 2024-02-28 12:07:30 +01:00
parent 3d586b3e0b
commit b403559933

View File

@ -26,9 +26,8 @@ namespace sta
void CanBus::func()
{
messageEvent.clear(STA_RTOS_CAN_ANY);
uint32_t flags = messageEvent.wait(STA_RTOS_CAN_ANY, osWaitForever);
uint32_t flags = messageEvent.wait(STA_RTOS_CAN_ANY, 800);
STA_DEBUG_PRINTLN("CanBus received Flag");
if (flags != static_cast<uint32_t>(osErrorTimeout))
{
STA_ASSERT_MSG((flags & osStatusReserved) == flags, "Unexpected error occurred in wait");
@ -53,7 +52,7 @@ namespace sta
canBus_.send(msg);
}
canBus_.tx_.processFrame();
//canBus_.tx_.processFrame();
}
if (flags & STA_RTOS_CAN_FLAG_MSG_AVAIL)
@ -100,7 +99,7 @@ namespace sta
if (canBusSysQueue_.put(msg, timeout))
{
// Signal tasek
// Signal task
messageEvent.set(STA_RTOS_CAN_FLAG_SYS_QUEUED);
messageEvent.clear(STA_RTOS_CAN_ANY);
return true;