[openrtm-commit:02047] r2777 - trunk/OpenRTM-aist/src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 10月 12日 (水) 23:54:12 JST
Author: n-ando
Date: 2016-10-12 23:54:12 +0900 (Wed, 12 Oct 2016)
New Revision: 2777
Modified:
trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextProfile.cpp
Log:
[compat,->RELENG_1_2] Execution rate and period check has been modified. refs #3650
Modified: trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextProfile.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextProfile.cpp 2016-10-12 14:50:23 UTC (rev 2776)
+++ trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextProfile.cpp 2016-10-12 14:54:12 UTC (rev 2777)
@@ -109,7 +109,7 @@
RTC::ReturnCode_t ExecutionContextProfile::setRate(double rate)
{
RTC_TRACE(("setRate(%f)", rate));
- if (rate < 0.0) { return RTC::BAD_PARAMETER; }
+ if (rate <= 0.0) { return RTC::BAD_PARAMETER; }
Guard guard(m_profileMutex);
m_profile.rate = rate;
@@ -120,7 +120,7 @@
RTC::ReturnCode_t ExecutionContextProfile::setPeriod(double period)
{
RTC_TRACE(("setPeriod(%f [sec])", period));
- if (period < 0.0) { return RTC::BAD_PARAMETER; }
+ if (period <= 0.0) { return RTC::BAD_PARAMETER; }
Guard guard(m_profileMutex);
m_profile.rate = 1.0 / period;
@@ -131,7 +131,7 @@
RTC::ReturnCode_t ExecutionContextProfile::setPeriod(coil::TimeValue period)
{
RTC_TRACE(("setPeriod(%f [sec])", (double)period));
- if ((double)period < 0.0) { return RTC::BAD_PARAMETER; }
+ if ((double)period <= 0.0) { return RTC::BAD_PARAMETER; }
Guard guard(m_profileMutex);
m_profile.rate = 1.0 / (double)period;
More information about the openrtm-commit
mailing list