From bd468a1b7498d217ca681e25c1932a39639f155f Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 1 Apr 2020 17:19:03 +0200 Subject: [PATCH] timeslot time 0 definitely leads to error --- osal/FreeRTOS/FixedTimeslotTask.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osal/FreeRTOS/FixedTimeslotTask.cpp b/osal/FreeRTOS/FixedTimeslotTask.cpp index c33c4ef04..7bfee7e6d 100644 --- a/osal/FreeRTOS/FixedTimeslotTask.cpp +++ b/osal/FreeRTOS/FixedTimeslotTask.cpp @@ -58,6 +58,11 @@ ReturnValue_t FixedTimeslotTask::startTask() { ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId, uint32_t slotTimeMs, int8_t executionStep) { if (objectManager->get(componentId) != NULL) { + if(slotTimeMs == 0) { + // TODO: FreeRTOS throws errors for zero values. + // maybe there is a better solution than this. + slotTimeMs = 1; + } pst.addSlot(componentId, slotTimeMs, executionStep, this); return HasReturnvaluesIF::RETURN_OK; }