mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:13:34 +08:00
Enable UART6 and enable S.BUS. Tested to work.
This commit is contained in:
@@ -206,6 +206,8 @@ private:
|
||||
|
||||
|
||||
AttitudeEstimatorQ::AttitudeEstimatorQ() :
|
||||
_vel_prev(0, 0, 0),
|
||||
_pos_acc(0, 0, 0),
|
||||
_voter_gyro(3),
|
||||
_voter_accel(3),
|
||||
_voter_mag(3),
|
||||
@@ -725,6 +727,8 @@ bool AttitudeEstimatorQ::update(float dt)
|
||||
corr += _q.conjugate_inversed(Vector<3>(0.0f, 0.0f, -mag_err)) * _w_mag;
|
||||
}
|
||||
|
||||
_q.normalize();
|
||||
|
||||
// Accelerometer correction
|
||||
// Project 'k' unit vector of earth frame to body frame
|
||||
// Vector<3> k = _q.conjugate_inversed(Vector<3>(0.0f, 0.0f, 1.0f));
|
||||
|
||||
@@ -846,7 +846,7 @@ Sensors::parameters_update()
|
||||
} else if (_parameters.battery_voltage_scaling < 0.0f) {
|
||||
/* apply scaling according to defaults if set to default */
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
|
||||
#if defined (CONFIG_ARCH_BOARD_PX4FMU_V2) || defined (CONFIG_ARCH_BOARD_PX4FMU_V4)
|
||||
_parameters.battery_voltage_scaling = 0.0082f;
|
||||
#elif CONFIG_ARCH_BOARD_AEROCORE
|
||||
_parameters.battery_voltage_scaling = 0.0063f;
|
||||
|
||||
Reference in New Issue
Block a user