mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 16:53:34 +08:00
send MAVLink GROUND_TRUTH at 25 Hz, only in SIH mode. And minor cleanup
This commit is contained in:
@@ -766,7 +766,12 @@ Mavlink::set_hil_enabled(bool hil_enabled)
|
||||
_hil_enabled = true;
|
||||
ret = configure_stream("HIL_ACTUATOR_CONTROLS", 200.0f);
|
||||
|
||||
configure_stream("GROUND_TRUTH", 200.0f); // HIL_STATE_QUATERNION to display the SIH
|
||||
if (_param_sys_hitl.get() == 2) { // Simulation in Hardware enabled ?
|
||||
configure_stream("GROUND_TRUTH", 25.0f); // HIL_STATE_QUATERNION to display the SIH
|
||||
|
||||
} else {
|
||||
configure_stream("GROUND_TRUTH", 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
/* disable HIL */
|
||||
|
||||
@@ -656,7 +656,8 @@ private:
|
||||
(ParamInt<px4::params::MAV_BROADCAST>) _param_mav_broadcast,
|
||||
(ParamBool<px4::params::MAV_HASH_CHK_EN>) _param_mav_hash_chk_en,
|
||||
(ParamBool<px4::params::MAV_HB_FORW_EN>) _param_mav_hb_forw_en,
|
||||
(ParamBool<px4::params::MAV_ODOM_LP>) _param_mav_odom_lp
|
||||
(ParamBool<px4::params::MAV_ODOM_LP>) _param_mav_odom_lp,
|
||||
(ParamInt<px4::params::SYS_HITL>) _param_sys_hitl
|
||||
)
|
||||
|
||||
perf_counter_t _loop_perf; /**< loop performance counter */
|
||||
|
||||
Reference in New Issue
Block a user