additional check for freeRTOS
This commit is contained in:
parent
af11c8fcf9
commit
5c85d03c39
@ -123,11 +123,20 @@ bool MessageQueue::isDefaultDestinationSet() const {
|
|||||||
ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
||||||
MessageQueueMessageIF* message, MessageQueueId_t sentFrom,
|
MessageQueueMessageIF* message, MessageQueueId_t sentFrom,
|
||||||
bool ignoreFault, CallContext callContext) {
|
bool ignoreFault, CallContext callContext) {
|
||||||
|
BaseType_t result = pdFALSE;
|
||||||
|
QueueHandle_t destination = nullptr;
|
||||||
|
|
||||||
|
if(sendTo == MessageQueueIF::NO_QUEUE) {
|
||||||
|
return MessageQueueIF::DESTINVATION_INVALID;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
destination = reinterpret_cast<QueueHandle_t>(sendTo);
|
||||||
|
}
|
||||||
message->setSender(sentFrom);
|
message->setSender(sentFrom);
|
||||||
BaseType_t result;
|
|
||||||
|
|
||||||
if(callContext == CallContext::TASK) {
|
if(callContext == CallContext::TASK) {
|
||||||
result = xQueueSendToBack(reinterpret_cast<QueueHandle_t>(sendTo),
|
result = xQueueSendToBack(destination,
|
||||||
static_cast<const void*>(message->getBuffer()), 0);
|
static_cast<const void*>(message->getBuffer()), 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user