mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Forgot to comment
This commit is contained in:
parent
5995240a07
commit
25ed791b70
@ -73,7 +73,7 @@
|
||||
#include "multirotor_attitude_control.h"
|
||||
#include "multirotor_rate_control.h"
|
||||
|
||||
PARAM_DEFINE_FLOAT(MC_RCLOSS_THROT, 0.0f);
|
||||
PARAM_DEFINE_FLOAT(MC_RCLOSS_THROT, 0.0f); // This defines the throttle when the RC signal is lost.
|
||||
|
||||
__EXPORT int multirotor_att_control_main(int argc, char *argv[]);
|
||||
|
||||
@ -145,6 +145,7 @@ mc_thread_main(int argc, char *argv[])
|
||||
bool flag_system_armed = false;
|
||||
bool man_yaw_zero_once = false;
|
||||
|
||||
/* prepare the handle for the failsafe throttle */
|
||||
param_t failsafe_throttle_handle = param_find("MC_RCLOSS_THROT");
|
||||
float failsafe_throttle = 0.0f;
|
||||
|
||||
@ -233,7 +234,9 @@ mc_thread_main(int argc, char *argv[])
|
||||
}
|
||||
att_sp.thrust = manual.throttle;
|
||||
|
||||
/* if the RC signal is lost, try to stay level and go slowly back down to ground */
|
||||
if(state.rc_signal_lost) {
|
||||
/* the failsafe throttle is stored as a parameter, as it depends on the copter and the payload */
|
||||
param_get(failsafe_throttle_handle, &failsafe_throttle);
|
||||
att_sp.roll_body = 0.0f;
|
||||
att_sp.pitch_body = 0.0f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user