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

PM::getCurrentTimeStamp considering not initialized case

parent a98c3407
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,7 @@ class ProcessorMotion : public ProcessorBase, public IsMotion ...@@ -170,7 +170,7 @@ class ProcessorMotion : public ProcessorBase, public IsMotion
* \param _x the returned state vector * \param _x the returned state vector
*/ */
virtual void getCurrentState(Eigen::VectorXd& _x) const override; virtual void getCurrentState(Eigen::VectorXd& _x) const override;
virtual void getCurrentTimeStamp(TimeStamp& _ts) const override { _ts = getBuffer().back().ts_; } virtual void getCurrentTimeStamp(TimeStamp& _ts) const override { _ts = (last_ptr_ == nullptr or getBuffer().empty() ? TimeStamp(0) : getBuffer().back().ts_); }
using IsMotion::getCurrentState; using IsMotion::getCurrentState;
using IsMotion::getCurrentTimeStamp; using IsMotion::getCurrentTimeStamp;
......
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