diff --git a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp index b0ad0e37fe12f626c82e0c7d1c6ec0cf320bcead..f5e65cd47f11601d37c0b6a15ec1e7fb5a931222 100644 --- a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp +++ b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp @@ -109,11 +109,6 @@ namespace armarx::plugins void HeartbeatComponentPlugin::preOnInitComponent() { - // set default args - auto warn = armarx::core::time::Duration::MilliSeconds(p.maximumCycleTimeWarningMS); - auto err = armarx::core::time::Duration::MilliSeconds(p.maximumCycleTimeErrorMS); - armarx::core::time::toIce(defaultHeartbeatArgs.maximumCycleTimeWarning, warn); - armarx::core::time::toIce(defaultHeartbeatArgs.maximumCycleTimeError, err); // defaultHeartbeatArgs.requiredByDefault = true; // if (topicName.empty()) @@ -126,6 +121,11 @@ namespace armarx::plugins void HeartbeatComponentPlugin::postOnInitComponent() { + // set default args + auto warn = armarx::core::time::Duration::MilliSeconds(p.maximumCycleTimeWarningMS); + auto err = armarx::core::time::Duration::MilliSeconds(p.maximumCycleTimeErrorMS); + armarx::core::time::toIce(defaultHeartbeatArgs.maximumCycleTimeWarning, warn); + armarx::core::time::toIce(defaultHeartbeatArgs.maximumCycleTimeError, err); } void