Subversion Repositories FlightCtrl

Rev

Rev 2132 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2132 Rev 2140
Line 294... Line 294...
294
                tempGyro = (tempGyro - SENSOR_MAX) * EXTRAPOLATION_SLOPE + SENSOR_MAX;
294
                tempGyro = (tempGyro - SENSOR_MAX) * EXTRAPOLATION_SLOPE + SENSOR_MAX;
295
      }
295
      }
296
    }
296
    }
Line 297... Line 297...
297
 
297
 
298
    // 2) Apply sign and offset, scale before filtering.
298
    // 2) Apply sign and offset, scale before filtering.
299
    tempOffsetGyro[axis] = (tempGyro - gyroOffset.offsets[axis] + IMUConfig.gyroCalibrationTweak[axis]);
299
    tempOffsetGyro[axis] = (tempGyro - gyroOffset.offsets[axis]);
Line 300... Line 300...
300
  }
300
  }
301
 
301
 
Line 318... Line 318...
318
 
318
 
319
    // 6) Done.
319
    // 6) Done.
Line 320... Line 320...
320
    gyro_PID[axis] = tempOffsetGyro[axis];
320
    gyro_PID[axis] = tempOffsetGyro[axis];
321
 
321
 
322
    // Prepare tempOffsetGyro for next calculation below...
322
    // Prepare tempOffsetGyro for next calculation below...
Line 323... Line 323...
323
    tempOffsetGyro[axis] = (rawGyroValue(axis) - gyroOffset.offsets[axis] + IMUConfig.gyroCalibrationTweak[axis]);
323
    tempOffsetGyro[axis] = (rawGyroValue(axis) - gyroOffset.offsets[axis]);
324
  }
324
  }
325
 
325