mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Add loiter option to COM_OBL_RC_ACT (#7170)
This commit is contained in:
@@ -345,7 +345,7 @@ PARAM_DEFINE_INT32(COM_OBL_ACT, 0);
|
|||||||
* @value 2 Manual
|
* @value 2 Manual
|
||||||
* @value 3 Return to Land
|
* @value 3 Return to Land
|
||||||
* @value 4 Land at current position
|
* @value 4 Land at current position
|
||||||
*
|
* @value 5 Loiter
|
||||||
* @group Mission
|
* @group Mission
|
||||||
*/
|
*/
|
||||||
PARAM_DEFINE_INT32(COM_OBL_RC_ACT, 0);
|
PARAM_DEFINE_INT32(COM_OBL_RC_ACT, 0);
|
||||||
|
|||||||
@@ -830,6 +830,9 @@ bool set_nav_state(struct vehicle_status_s *status,
|
|||||||
} else if (offb_loss_rc_act == 4 && status_flags->condition_global_position_valid) {
|
} else if (offb_loss_rc_act == 4 && status_flags->condition_global_position_valid) {
|
||||||
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LAND;
|
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LAND;
|
||||||
|
|
||||||
|
} else if (offb_loss_rc_act == 5 && status_flags->condition_global_position_valid) {
|
||||||
|
status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER;
|
||||||
|
|
||||||
} else if (status_flags->condition_local_altitude_valid) {
|
} else if (status_flags->condition_local_altitude_valid) {
|
||||||
status->nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
|
status->nav_state = vehicle_status_s::NAVIGATION_STATE_DESCEND;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user