forked from Archive/PX4-Autopilot
Avoid subtraction of two uint
This commit is contained in:
parent
70d65ea55f
commit
8b6d665a13
|
@ -127,7 +127,7 @@ public:
|
|||
int index = (_head - i);
|
||||
index = index < 0 ? _size + index : index;
|
||||
|
||||
if (timestamp >= _buffer[index].time_us && timestamp - _buffer[index].time_us < (uint64_t)1e5) {
|
||||
if (timestamp >= _buffer[index].time_us && timestamp < _buffer[index].time_us + (uint64_t)1e5) {
|
||||
*sample = _buffer[index];
|
||||
|
||||
// Now we can set the tail to the item which
|
||||
|
|
Loading…
Reference in New Issue