[openrtm-commit:00402] r559 - trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 9月 12日 (月) 11:04:41 JST
Author: fsi-katami
Date: 2011-09-12 11:04:41 +0900 (Mon, 12 Sep 2011)
New Revision: 559
Modified:
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
Log:
Fixed the bug of the skip transmission processing. refs #2232
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2011-09-09 08:23:58 UTC (rev 558)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2011-09-12 02:04:41 UTC (rev 559)
@@ -140,7 +140,8 @@
}
ReturnCode ret = ReturnCode.PORT_OK;
- int preskip = m_buffer.readable() + m_leftskip;
+ int readable = m_buffer.readable();
+ int preskip = readable + m_leftskip;
int loopcnt = preskip/(m_skipn +1);
int postskip = m_skipn - m_leftskip;
for (int i = 0; i < loopcnt; ++i) {
@@ -159,7 +160,7 @@
postskip = m_skipn +1;
}
- m_buffer.advanceRptr(m_buffer.readable());
+ m_buffer.advanceRptr(readable);
m_leftskip = preskip % (m_skipn +1);
return ret;
}
openrtm-commit メーリングリストの案内