From eac625ba8f8eb2224929ed5d745e2b9590dd42b6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 Dec 2011 15:31:11 +1100 Subject: [PATCH] rollover is not a bug subtracting unsigned numbers does the right thing --- libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp index dc2935b037..6242c7ccdd 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp @@ -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;