goofed up, delay function back in task factory

This commit is contained in:
Robin Müller 2020-05-03 00:48:18 +02:00
parent 281da25bf9
commit 35594d4b71
4 changed files with 10 additions and 12 deletions

View File

@ -44,6 +44,10 @@ ReturnValue_t TaskFactory::deleteTask(PeriodicTaskIF* task) {
} }
} }
ReturnValue_t TaskManagement::delayTask(uint32_t delayMs) {
vTaskDelay(pdMS_TO_TICKS(delayMs));
return HasReturnvaluesIF::RETURN_OK;
}
TaskFactory::TaskFactory() { TaskFactory::TaskFactory() {
} }

View File

@ -21,8 +21,4 @@ configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark() {
return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle()); return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle());
} }
ReturnValue_t TaskManagement::delayTask(uint32_t delayMs) {
vTaskDelay(pdMS_TO_TICKS(delayMs));
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -58,13 +58,6 @@ public:
* words. * words.
*/ */
static configSTACK_DEPTH_TYPE getTaskStackHighWatermark(); static configSTACK_DEPTH_TYPE getTaskStackHighWatermark();
/**
* Function to be called to delay current task
* @param delay The delay in milliseconds
* @return Success of deletion
*/
static ReturnValue_t delayTask(uint32_t delayMs);
}; };
#endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */ #endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */

View File

@ -60,13 +60,18 @@ public:
*/ */
static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL); static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL);
/**
* Function to be called to delay current task
* @param delay The delay in milliseconds
* @return Success of deletion
*/
static ReturnValue_t delayTask(uint32_t delayMs);
private: private:
/** /**
* External instantiation is not allowed. * External instantiation is not allowed.
*/ */
TaskFactory(); TaskFactory();
static TaskFactory* factoryInstance; static TaskFactory* factoryInstance;
}; };
#endif /* FRAMEWORK_TASKS_TASKFACTORY_H_ */ #endif /* FRAMEWORK_TASKS_TASKFACTORY_H_ */