Skip to content
Snippets Groups Projects

Draft: Resolve "Implementation of new nodes creation"

Open Joan Vallvé Navarro requested to merge 454-implementation-of-new-nodes-creation into devel
3 files
+ 28
18
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -64,15 +64,16 @@ CaptureMotion::~CaptureMotion()
bool CaptureMotion::containsTimeStamp(const TimeStamp& _ts, double _time_tolerance) const
{
assert(_ts.ok() and this->time_stamp_.ok());
assert(this->time_stamp_ == this->getBuffer().back().ts_ and
"CaptureMotion::containsTimeStamp: The time stamp of the capture is not equal to the last motion in the "
"buffer");
// the same capture is within tolerance
if (this->time_stamp_ - _time_tolerance <= _ts && _ts <= this->time_stamp_ + _time_tolerance) return true;
// buffer is empty (and the capture is not within tolerance)
if (this->getBuffer().empty()) return false;
// if buffer is empty, check if the capture is within tolerance
if (this->getBuffer().empty())
{
if (this->time_stamp_ - _time_tolerance <= _ts and _ts <= this->time_stamp_ + _time_tolerance)
return true;
else
// buffer is empty (and the capture is not within tolerance)
return false;
}
// buffer encloses timestamp, if ts is:
// from : buffer.first.ts - tt
Loading