Skip to content
Snippets Groups Projects
Commit 75391b21 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

wip

parent cc30a6bd
No related branches found
No related tags found
1 merge request!422Resolve "Bug in ProcessorMotion / TimeStamp"
Pipeline #6921 passed
...@@ -49,7 +49,7 @@ CaptureMotion::~CaptureMotion() ...@@ -49,7 +49,7 @@ CaptureMotion::~CaptureMotion()
bool CaptureMotion::containsTimeStamp (const TimeStamp& _ts, double _time_tolerance) bool CaptureMotion::containsTimeStamp (const TimeStamp& _ts, double _time_tolerance)
{ {
assert(_ts.ok()); assert(_ts.ok() and this->time_stamp_.ok());
// the same capture is within tolerance // the same capture is within tolerance
if (this->time_stamp_ - _time_tolerance <= _ts && _ts <= this->time_stamp_ + _time_tolerance) if (this->time_stamp_ - _time_tolerance <= _ts && _ts <= this->time_stamp_ + _time_tolerance)
......
...@@ -896,6 +896,7 @@ CaptureMotionPtr ProcessorMotion::findCaptureContainingTimeStamp(const TimeStamp ...@@ -896,6 +896,7 @@ CaptureMotionPtr ProcessorMotion::findCaptureContainingTimeStamp(const TimeStamp
capture = frame->getCaptureOf(sensor); capture = frame->getCaptureOf(sensor);
if (capture != nullptr) if (capture != nullptr)
{ {
assert(std::dynamic_pointer_cast<CaptureMotion>(capture) != nullptr);
// Rule 1 satisfied! We found a Capture belonging to this processor's Sensor ==> it is a CaptureMotion // Rule 1 satisfied! We found a Capture belonging to this processor's Sensor ==> it is a CaptureMotion
capture_motion = std::static_pointer_cast<CaptureMotion>(capture); capture_motion = std::static_pointer_cast<CaptureMotion>(capture);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment