fix(*): ubuntu 18.04 complie.
This commit is contained in:
parent
4b6e7d941e
commit
c045198991
|
@ -533,7 +533,13 @@ void Channels::CheckTimeStampLimmit(mynteye::ImuPacket2 &packet) {
|
||||||
}
|
}
|
||||||
if (is_nearly_before_timestamp_limmit_ > 0) {
|
if (is_nearly_before_timestamp_limmit_ > 0) {
|
||||||
is_nearly_before_timestamp_limmit_--;
|
is_nearly_before_timestamp_limmit_--;
|
||||||
if (std::abs(current_datum_ - segment2.timestamp) > (uint64_t)(42949672960/2)) { // NOLINT
|
uint64_t abs_tmp = 0;
|
||||||
|
if (current_datum_ > segment2.timestamp) {
|
||||||
|
abs_tmp = current_datum_ - segment2.timestamp;
|
||||||
|
} else {
|
||||||
|
abs_tmp = segment2.timestamp - current_datum_;
|
||||||
|
}
|
||||||
|
if (abs_tmp > (uint64_t)(42949672960/2)) { // NOLINT
|
||||||
segment2.timestamp -= 42949672960;
|
segment2.timestamp -= 42949672960;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,13 @@ void Streams::CheckTimeStampLimmit(std::shared_ptr<ImgData> img) {
|
||||||
}
|
}
|
||||||
if (is_nearly_before_timestamp_limmit_ > 0) {
|
if (is_nearly_before_timestamp_limmit_ > 0) {
|
||||||
is_nearly_before_timestamp_limmit_--;
|
is_nearly_before_timestamp_limmit_--;
|
||||||
if (std::abs(current_datum_ - img->timestamp) > (uint64_t)(42949672960/2)) { // NOLINT
|
uint64_t abs_tmp = 0;
|
||||||
|
if (current_datum_ > img->timestamp) {
|
||||||
|
abs_tmp = current_datum_ - img->timestamp;
|
||||||
|
} else {
|
||||||
|
abs_tmp = img->timestamp - current_datum_;
|
||||||
|
}
|
||||||
|
if (abs_tmp > (uint64_t)(42949672960/2)) { // NOLINT
|
||||||
img->timestamp -= 42949672960;
|
img->timestamp -= 42949672960;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user