From 413d65938194e945dc7e45038a0c37ef564c5f00 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 15 Feb 2020 15:27:06 +0100 Subject: [PATCH] slight change --- osal/FreeRTOS/FixedTimeslotTask.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osal/FreeRTOS/FixedTimeslotTask.cpp b/osal/FreeRTOS/FixedTimeslotTask.cpp index 4a30774a..413d7596 100644 --- a/osal/FreeRTOS/FixedTimeslotTask.cpp +++ b/osal/FreeRTOS/FixedTimeslotTask.cpp @@ -57,13 +57,13 @@ ReturnValue_t FixedTimeslotTask::startTask() { ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId, uint32_t slotTimeMs, int8_t executionStep) { - if (!objectManager->get(componentId)) { - error << "Component " << std::hex << componentId << " not found, not adding it to pst" << std::endl; - return HasReturnvaluesIF::RETURN_FAILED; + if (objectManager->get(componentId) != NULL) { + pst.addSlot(componentId, slotTimeMs, executionStep, this); + return HasReturnvaluesIF::RETURN_OK; } - pst.addSlot(componentId, slotTimeMs, executionStep, this); - return HasReturnvaluesIF::RETURN_OK; + error << "Component " << std::hex << componentId << " not found, not adding it to pst" << std::endl; + return HasReturnvaluesIF::RETURN_FAILED; } uint32_t FixedTimeslotTask::getPeriodMs() const {