bool AP_InertialSensor_Oilpan::update()
{
    float adc_values[6];

    _sample_time = _adc->Ch6(_sensors, adc_values);
    _temp = _adc->Ch(_gyro_temp_ch);

    _gyro.x = _gyro_gain_x * _sensor_signs[0] * _gyro_apply_std_offset( adc_values[0] );
    _gyro.y = _gyro_gain_y * _sensor_signs[1] * _gyro_apply_std_offset( adc_values[1] );
    _gyro.z = _gyro_gain_z * _sensor_signs[2] * _gyro_apply_std_offset( adc_values[2] );

    // _accel.x = _accel_x_scale * _sensor_signs[3] * _accel_apply_std_offset( adc_values[3] );
    // _accel.y = _accel_y_scale * _sensor_signs[4] * _accel_apply_std_offset( adc_values[4] );
    // _accel.z = _accel_z_scale * _sensor_signs[5] * _accel_apply_std_offset( adc_values[5] );

    _accel.x = _accel_scale.x * _sensor_signs[3] * (adc_values[3] - _accel_mid.x);
    _accel.y = _accel_scale.y * _sensor_signs[4] * (adc_values[4] - _accel_mid.y);
    _accel.z = _accel_scale.z * _sensor_signs[5] * (adc_values[5] - _accel_mid.z);


/*
 *  X  = 1619.30 to 2445.69
 *  Y =  1609.45 to 2435.42
 *  Z =  1627.44  to 2434.82
 */

    return true;
}
bool AP_InertialSensor_Oilpan::update()
{
  uint16_t adc_values[6];

  _sample_time = _adc->Ch6(_sensors, adc_values);
  _temp = _adc->Ch(_gyro_temp_ch);

  _gyro.x = _gyro_gain_x * _sensor_signs[0] * _gyro_apply_std_offset( adc_values[0] );
  _gyro.y = _gyro_gain_y * _sensor_signs[1] * _gyro_apply_std_offset( adc_values[1] );
  _gyro.z = _gyro_gain_z * _sensor_signs[2] * _gyro_apply_std_offset( adc_values[2] );

  _accel.x = _accel_scale * _sensor_signs[3] * _accel_apply_std_offset( adc_values[3] );
  _accel.y = _accel_scale * _sensor_signs[4] * _accel_apply_std_offset( adc_values[4] );
  _accel.z = _accel_scale * _sensor_signs[5] * _accel_apply_std_offset( adc_values[5] );

  return true;
}