mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 06:14:08 +08:00
Onboard controller loss parameter cleanup.
Since Timeout from onboard controller is something that does not require a lot of modifications there is no sense to having it parametrized. Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
parent
cd47cefb03
commit
908cdaa574
@ -3942,7 +3942,7 @@ void Commander::data_link_check(bool &status_changed)
|
||||
|
||||
// ONBOARD CONTROLLER data link loss failsafe (hard coded 5 seconds)
|
||||
if ((_datalink_last_heartbeat_onboard_controller > 0)
|
||||
&& (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > _onboard_loss_timeout.get() * 1_s)
|
||||
&& (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > 5_s)
|
||||
&& !_onboard_controller_lost) {
|
||||
|
||||
mavlink_log_critical(&mavlink_log_pub, "Onboard controller lost");
|
||||
|
||||
@ -117,9 +117,7 @@ private:
|
||||
(ParamInt<px4::params::COM_LOW_BAT_ACT>) _low_bat_action,
|
||||
(ParamFloat<px4::params::COM_DISARM_LAND>) _disarm_when_landed_timeout,
|
||||
|
||||
(ParamInt<px4::params::COM_OBS_AVOID>) _obs_avoid,
|
||||
|
||||
(ParamInt<px4::params::COM_ONB_LOSS_T>) _onboard_loss_timeout
|
||||
(ParamInt<px4::params::COM_OBS_AVOID>) _obs_avoid
|
||||
)
|
||||
|
||||
const int64_t POSVEL_PROBATION_MIN = 1_s; /**< minimum probation duration (usec) */
|
||||
@ -178,7 +176,7 @@ private:
|
||||
hrt_abstime _datalink_last_heartbeat_gcs{0};
|
||||
|
||||
hrt_abstime _datalink_last_heartbeat_onboard_controller{0};
|
||||
bool _onboard_controller_lost{0};
|
||||
bool _onboard_controller_lost{false};
|
||||
|
||||
hrt_abstime _datalink_last_heartbeat_avoidance_system{0};
|
||||
bool _avoidance_system_lost{0};
|
||||
|
||||
@ -804,16 +804,4 @@ PARAM_DEFINE_INT32(NAV_RCL_ACT, 2);
|
||||
* @boolean
|
||||
* @group Mission
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_OBS_AVOID, 0);
|
||||
|
||||
/**
|
||||
* Time-out to wait when onboard connection is lost before triggering onboard lost action.
|
||||
* TODO: Define parameters to specify proper action to trigger.
|
||||
*
|
||||
* @group Commander
|
||||
* @unit s
|
||||
* @min 0
|
||||
* @max 60
|
||||
* @increment 1
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_ONB_LOSS_T, 5);
|
||||
PARAM_DEFINE_INT32(COM_OBS_AVOID, 0);
|
||||
Loading…
x
Reference in New Issue
Block a user