diff --git a/include/core/processor/processor_base.h b/include/core/processor/processor_base.h index 3537f96032ba64bbbb901f722bd64bdf10bbe0ab..b81467ced6ef004b1ee4fc7628289c3b35cbca88 100644 --- a/include/core/processor/processor_base.h +++ b/include/core/processor/processor_base.h @@ -292,7 +292,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce void setSensor(SensorBasePtr _sen_ptr){sensor_ptr_ = _sen_ptr;} public: - virtual bool isMotion(); + virtual bool isMotion() const; void setTimeTolerance(Scalar _time_tolerance); @@ -343,7 +343,7 @@ std::shared_ptr<classType> ProcessorBase::emplace(SensorBasePtr _sen_ptr, T&&... return prc; } -inline bool ProcessorBase::isMotion() +inline bool ProcessorBase::isMotion() const { return false; } diff --git a/include/core/processor/processor_motion.h b/include/core/processor/processor_motion.h index 6a96be5ef0c13a299e687bafb77bf38fbd48ede1..0dfd2467d1731010bb91fe1a929c0eb5a065fe55 100644 --- a/include/core/processor/processor_motion.h +++ b/include/core/processor/processor_motion.h @@ -159,7 +159,7 @@ class ProcessorMotion : public ProcessorBase virtual void resetDerived(); // Queries to the processor: - virtual bool isMotion() override; + virtual bool isMotion() const override; /** \brief Fill a reference to the state integrated so far * \param _x the returned state vector @@ -571,7 +571,7 @@ inline Motion ProcessorMotion::getMotion(const TimeStamp& _ts) const return capture_ptr->getBuffer().getMotion(_ts); } -inline bool ProcessorMotion::isMotion() +inline bool ProcessorMotion::isMotion() const { return true; } diff --git a/include/core/processor/processor_tracker.h b/include/core/processor/processor_tracker.h index 1c9277989d11fee7e0ea568e8cbccdb1bec58b0e..0a5d46a6be09c2b918d89886048bb16ca09f7e04 100644 --- a/include/core/processor/processor_tracker.h +++ b/include/core/processor/processor_tracker.h @@ -108,6 +108,8 @@ class ProcessorTracker : public ProcessorBase ProcessorParamsTrackerPtr _params_tracker); virtual ~ProcessorTracker(); + virtual bool isMotion() const final override {return false; } + bool checkTimeTolerance(const TimeStamp& _ts1, const TimeStamp& _ts2); bool checkTimeTolerance(const CaptureBasePtr _cap, const TimeStamp& _ts);