Skip to content
Snippets Groups Projects

Resolve "Add time_tolerance field in Frame and remove PackKeyFrame"

2 files
+ 15
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -602,8 +602,10 @@ inline void Buffer<T>::removeUpToLower(const TimeStamp& _time_stamp)
@@ -602,8 +602,10 @@ inline void Buffer<T>::removeUpToLower(const TimeStamp& _time_stamp)
}
}
template <typename T>
template <typename T>
inline bool Buffer<T>::doubleCheckTimeTolerance(const TimeStamp& _time_stamp1, const double& _time_tolerance1,
inline bool Buffer<T>::doubleCheckTimeTolerance(const TimeStamp& _time_stamp1,
const TimeStamp& _time_stamp2, const double& _time_tolerance2)
const double& _time_tolerance1,
 
const TimeStamp& _time_stamp2,
 
const double& _time_tolerance2)
{
{
double time_diff = std::fabs(_time_stamp1 - _time_stamp2);
double time_diff = std::fabs(_time_stamp1 - _time_stamp2);
double time_tol = std::min(_time_tolerance1, _time_tolerance2);
double time_tol = std::min(_time_tolerance1, _time_tolerance2);
@@ -612,8 +614,9 @@ inline bool Buffer<T>::doubleCheckTimeTolerance(const TimeStamp& _time_stamp1, c
@@ -612,8 +614,9 @@ inline bool Buffer<T>::doubleCheckTimeTolerance(const TimeStamp& _time_stamp1, c
}
}
template <typename T>
template <typename T>
inline bool Buffer<T>::simpleCheckTimeTolerance(const TimeStamp& _time_stamp1, const TimeStamp& _time_stamp2,
inline bool Buffer<T>::simpleCheckTimeTolerance(const TimeStamp& _time_stamp1,
const double& _time_tolerance)
const TimeStamp& _time_stamp2,
 
const double& _time_tolerance)
{
{
double time_diff = std::fabs(_time_stamp1 - _time_stamp2);
double time_diff = std::fabs(_time_stamp1 - _time_stamp2);
bool pass = time_diff <= _time_tolerance;
bool pass = time_diff <= _time_tolerance;
Loading