mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 01:33:56 -04:00
rollover is not a bug
subtracting unsigned numbers does the right thing
This commit is contained in:
parent
97f8d21c1b
commit
bc9e943969
@ -180,7 +180,6 @@ float AP_InertialSensor_MPU6000::temperature() { return _temp; }
|
||||
uint32_t AP_InertialSensor_MPU6000::sample_time()
|
||||
{
|
||||
uint32_t us = micros();
|
||||
/* XXX rollover creates a major bug */
|
||||
uint32_t delta = us - _last_sample_micros;
|
||||
reset_sample_time();
|
||||
return delta;
|
||||
|
Loading…
Reference in New Issue
Block a user