periodic task if adapted

This commit is contained in:
2020-08-04 15:23:37 +02:00
parent 2177877625
commit 4d3f0875c1
5 changed files with 8 additions and 19 deletions

View File

@ -90,12 +90,9 @@ ReturnValue_t PeriodicTask::addComponent(object_id_t object, bool setTaskIF) {
return HasReturnvaluesIF::RETURN_FAILED;
}
objectList.push_back(newObject);
newObject->setTaskIF(this);
if(setTaskIF) {
newObject->setTaskIF(this);
}
ReturnValue_t result = newObject->initializeAfterTaskCreation();
return result;
return newObject->initializeAfterTaskCreation();
}
uint32_t PeriodicTask::getPeriodMs() const {

View File

@ -65,8 +65,7 @@ public:
* -@c RETURN_OK on success
* -@c RETURN_FAILED if the object could not be added.
*/
ReturnValue_t addComponent(object_id_t object,
bool setTaskIF = true) override;
ReturnValue_t addComponent(object_id_t object) override;
uint32_t getPeriodMs() const override;