important bugfix for host osal
This commit is contained in:
parent
73d3defe9f
commit
8ad30d489a
@ -89,6 +89,10 @@ ReturnValue_t PeriodicTask::sleepFor(uint32_t ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PeriodicTask::taskFunctionality() {
|
void PeriodicTask::taskFunctionality() {
|
||||||
|
for (const auto& object: objectList) {
|
||||||
|
object->initializeAfterTaskCreation();
|
||||||
|
}
|
||||||
|
|
||||||
std::chrono::milliseconds periodChrono(static_cast<uint32_t>(period*1000));
|
std::chrono::milliseconds periodChrono(static_cast<uint32_t>(period*1000));
|
||||||
auto currentStartTime {
|
auto currentStartTime {
|
||||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
@ -101,9 +105,8 @@ void PeriodicTask::taskFunctionality() {
|
|||||||
if(terminateThread.load()) {
|
if(terminateThread.load()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (ObjectList::iterator it = objectList.begin();
|
for (const auto& object: objectList) {
|
||||||
it != objectList.end(); ++it) {
|
object->performOperation();
|
||||||
(*it)->performOperation();
|
|
||||||
}
|
}
|
||||||
if(not delayForInterval(¤tStartTime, periodChrono)) {
|
if(not delayForInterval(¤tStartTime, periodChrono)) {
|
||||||
sif::warning << "PeriodicTask: " << taskName <<
|
sif::warning << "PeriodicTask: " << taskName <<
|
||||||
|
Loading…
Reference in New Issue
Block a user