AP_InertialSensor: fixed loop limits

stops pointless operations