mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:33:35 +08:00
mc_att_control set timestamp_sample from gyro
This commit is contained in:
committed by
Lorenz Meier
parent
f6b108c2b6
commit
f748b38b3a
@@ -1238,7 +1238,7 @@ MulticopterAttitudeControl::task_main()
|
||||
_actuators.control[3] = (PX4_ISFINITE(_thrust_sp)) ? _thrust_sp : 0.0f;
|
||||
_actuators.control[7] = _v_att_sp.landing_gear;
|
||||
_actuators.timestamp = hrt_absolute_time();
|
||||
_actuators.timestamp_sample = _v_att.timestamp;
|
||||
_actuators.timestamp_sample = _sensor_gyro.timestamp;
|
||||
|
||||
/* scale effort by battery status */
|
||||
if (_params.bat_scale_en && _battery_status.scale > 0.0f) {
|
||||
@@ -1287,7 +1287,7 @@ MulticopterAttitudeControl::task_main()
|
||||
_actuators.control[2] = 0.0f;
|
||||
_actuators.control[3] = 0.0f;
|
||||
_actuators.timestamp = hrt_absolute_time();
|
||||
_actuators.timestamp_sample = _v_att.timestamp;
|
||||
_actuators.timestamp_sample = _sensor_gyro.timestamp;
|
||||
|
||||
if (!_actuators_0_circuit_breaker_enabled) {
|
||||
if (_actuators_0_pub != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user