Skip to content

Commit

Permalink
use time conversion functions
Browse files Browse the repository at this point in the history
  • Loading branch information
togaen committed Jun 4, 2020
1 parent 4702ee3 commit da8f1b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/a2d2_to_ros/checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <cmath>

static constexpr auto ONE_MILLION = static_cast<uint64_t>(1000000);
#include "a2d2_to_ros/conversions.hpp"

namespace a2d2_to_ros {

Expand Down Expand Up @@ -54,7 +54,7 @@ bool axes_are_valid(const Eigen::Vector3d& axis1, const Eigen::Vector3d& axis2,
//------------------------------------------------------------------------------

bool valid_ros_timestamp(uint64_t time) {
const auto secs = (time / ONE_MILLION);
const auto secs = microseconds_to_seconds(time);
const auto boundary =
static_cast<uint64_t>(std::numeric_limits<uint32_t>::max());
return (secs <= boundary);
Expand Down

0 comments on commit da8f1b5

Please sign in to comment.