diff --git a/src/mynteye/device/channel/channels.cc b/src/mynteye/device/channel/channels.cc index 5ae2790..783e78e 100644 --- a/src/mynteye/device/channel/channels.cc +++ b/src/mynteye/device/channel/channels.cc @@ -533,7 +533,7 @@ void Channels::CheckTimeStampLimmit(mynteye::ImuPacket2 &packet) { } if (is_nearly_before_timestamp_limmit_ > 0) { is_nearly_before_timestamp_limmit_--; - if ((uint64_t)(fabs(current_datum_ - segment2.timestamp)) > (uint64_t)(42949672960/2)) { // NOLINT + if (std::abs(current_datum_ - segment2.timestamp) > (uint64_t)(42949672960/2)) { // NOLINT segment2.timestamp -= 42949672960; } } diff --git a/src/mynteye/device/streams.cc b/src/mynteye/device/streams.cc index 677fdb7..99484e4 100644 --- a/src/mynteye/device/streams.cc +++ b/src/mynteye/device/streams.cc @@ -59,7 +59,7 @@ void Streams::CheckTimeStampLimmit(std::shared_ptr img) { } if (is_nearly_before_timestamp_limmit_ > 0) { is_nearly_before_timestamp_limmit_--; - if ((uint64_t)(fabs(current_datum_ - img->timestamp)) > (uint64_t)(42949672960/2)) { // NOLINT + if (std::abs(current_datum_ - img->timestamp) > (uint64_t)(42949672960/2)) { // NOLINT img->timestamp -= 42949672960; } }