[openrtm-commit:00279] r426 - branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2011年 7月 29日 (金) 17:44:34 JST


Author: kurihara
Date: 2011-07-29 17:44:34 +0900 (Fri, 29 Jul 2011)
New Revision: 426

Modified:
   branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
Log:
The problem of the initialization handling of rate of the EC was fixed.

Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py	2011-07-29 08:43:24 UTC (rev 425)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py	2011-07-29 08:44:34 UTC (rev 426)
@@ -363,13 +363,13 @@
 
     if rate is None:
       self._rate = 1000.0
-      rate_ = 0.0
-      self._usec = long(0)
+      rate_ = 1000.0
+      self._usec = long(1000)
     else:
       self._rate = rate
       rate_ = rate
       if rate == 0:
-        rate_ = 0.0000001
+        rate_ = 10000000
       self._usec = long(1000000/rate_)
       if self._usec == 0:
         self._nowait = True
@@ -749,7 +749,7 @@
         sleeptime_ = 10.0 * usec_per_sec_ / float(self.get_rate())
         self._rtcout.RTC_PARANOID("Sleep time is %f [us]", sleeptime_)
         while compIn._sm._sm.isIn(RTC.ACTIVE_STATE):
-          self._rtcout.RTC_TRACE("Waiting to be the INACTIVE state %d %f", count_, float(time.time()))
+          self._rtcout.RTC_TRACE("Waiting to be the INACTIVE state %d %f", (count_, float(time.time())))
           time.sleep(sleeptime_/usec_per_sec_)
           if count_ > 1000:
             self._rtcout.RTC_ERROR("The component is not responding.")



openrtm-commit メーリングリストの案内