moved timeslot files to task folder
implmented setting task IF for regular periodic tasks
This commit is contained in:
@ -62,11 +62,6 @@ ReturnValue_t FixedTimeslotTask::startTask() {
|
||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||
uint32_t slotTimeMs, int8_t executionStep) {
|
||||
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
|
||||
if(slotTimeMs == 0) {
|
||||
// FreeRTOS throws a sanity error for zero values, so we set
|
||||
// the time to one millisecond.
|
||||
slotTimeMs = 1;
|
||||
}
|
||||
pst.addSlot(componentId, slotTimeMs, executionStep, this);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
@ -101,7 +96,9 @@ void FixedTimeslotTask::taskFunctionality() {
|
||||
xLastWakeTime = xTaskGetTickCount();
|
||||
|
||||
// wait for first entry's start time
|
||||
vTaskDelayUntil(&xLastWakeTime, interval);
|
||||
if(interval > 0) {
|
||||
vTaskDelayUntil(&xLastWakeTime, interval);
|
||||
}
|
||||
|
||||
/* Enter the loop that defines the task behavior. */
|
||||
for (;;) {
|
||||
@ -137,3 +134,4 @@ ReturnValue_t FixedTimeslotTask::sleepFor(uint32_t ms) {
|
||||
vTaskDelay(pdMS_TO_TICKS(ms));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user