[openrtm-commit:03139] r934 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 24日 (水) 16:53:12 JST
Author: miyamoto
Date: 2018-01-24 16:53:12 +0900 (Wed, 24 Jan 2018)
New Revision: 934
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
Log:
[compat, bugfix, ->RELENG_1_2] fixed bug
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2018-01-24 07:18:10 UTC (rev 933)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2018-01-24 07:53:12 UTC (rev 934)
@@ -104,6 +104,7 @@
#self._OnDisconnect = None
self._directNewData = False
self._valueMutex = threading.RLock()
+ self._directValue = value
@@ -156,7 +157,6 @@
# @endif
# bool operator<<(DataType& value)
def write(self, value=None):
- guard = OpenRTM_aist.ScopedLock(self._valueMutex)
if not value:
value=self._value
@@ -190,6 +190,8 @@
if ret == self.CONNECTION_LOST:
self.disconnect(con.id())
else:
+ guard = OpenRTM_aist.ScopedLock(self._valueMutex)
+ self._directValue = value
self._directNewData = True
del guard
@@ -315,7 +317,7 @@
def read(self, data):
guard = OpenRTM_aist.ScopedLock(self._valueMutex)
self._directNewData = False
- data[0] = self._value
+ data[0] = self._directValue
if self._OnWriteConvert:
data[0] = self._OnWriteConvert(data[0])
del guard
More information about the openrtm-commit
mailing list