mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 10:03:34 +08:00
refactor(commander): remove unused parameter COM_TAKEOFF_ACT
This commit is contained in:
@@ -327,7 +327,6 @@
|
||||
1 1 COM_RC_OVERRIDE 1 6
|
||||
1 1 COM_RC_STICK_OV 30.000000000000000000 9
|
||||
1 1 COM_SPOOLUP_TIME 1.000000000000000000 9
|
||||
1 1 COM_TAKEOFF_ACT 0 6
|
||||
1 1 COM_THROW_EN 0 6
|
||||
1 1 COM_THROW_SPEED 5.000000000000000000 9
|
||||
1 1 COM_VEL_FS_EVH 1.000000000000000000 9
|
||||
|
||||
@@ -2084,15 +2084,8 @@ void Commander::checkForMissionUpdate()
|
||||
|
||||
if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_TAKEOFF
|
||||
|| _vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_VTOL_TAKEOFF) {
|
||||
// Transition mode to loiter or auto-mission after takeoff is completed.
|
||||
if ((_param_com_takeoff_act.get() == 1) && auto_mission_available) {
|
||||
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION);
|
||||
|
||||
} else {
|
||||
// Transition to loiter when the takeoff is completed (force into the Loiter, if mode is not executable then failsafe).
|
||||
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER, ModeChangeSource::ModeExecutor, false,
|
||||
true);
|
||||
}
|
||||
// Transition to loiter when the takeoff is completed (force into the Loiter, if mode is not executable then failsafe).
|
||||
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER, ModeChangeSource::ModeExecutor, false, true);
|
||||
|
||||
} else if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) {
|
||||
// Transition to loiter when the mission is cleared and/or finished, and we are still in mission mode.
|
||||
|
||||
@@ -348,7 +348,6 @@ private:
|
||||
(ParamInt<px4::params::COM_RC_OVERRIDE>) _param_com_rc_override,
|
||||
(ParamFloat<px4::params::COM_SPOOLUP_TIME>) _param_com_spoolup_time,
|
||||
(ParamInt<px4::params::COM_FLIGHT_UUID>) _param_com_flight_uuid,
|
||||
(ParamInt<px4::params::COM_TAKEOFF_ACT>) _param_com_takeoff_act,
|
||||
(ParamFloat<px4::params::COM_CPU_MAX>) _param_com_cpu_max
|
||||
)
|
||||
};
|
||||
|
||||
@@ -555,17 +555,6 @@ PARAM_DEFINE_FLOAT(COM_VEL_FS_EVH, 1.f);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLIGHT_UUID, 0);
|
||||
|
||||
/**
|
||||
* Action after TAKEOFF has been accepted.
|
||||
*
|
||||
* The mode transition after TAKEOFF has completed successfully.
|
||||
*
|
||||
* @value 0 Hold
|
||||
* @value 1 Mission (if valid)
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_TAKEOFF_ACT, 0);
|
||||
|
||||
/**
|
||||
* Set GCS connection loss failsafe mode
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user