forked from Archive/PX4-Autopilot
commander: use new manual control setpoint variable names
This commit is contained in:
parent
d9333a1993
commit
cde4c9addb
|
@ -1164,7 +1164,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||||
if (status.is_rotary_wing &&
|
if (status.is_rotary_wing &&
|
||||||
(status.arming_state == ARMING_STATE_ARMED || status.arming_state == ARMING_STATE_ARMED_ERROR) &&
|
(status.arming_state == ARMING_STATE_ARMED || status.arming_state == ARMING_STATE_ARMED_ERROR) &&
|
||||||
(status.main_state == MAIN_STATE_MANUAL || status.condition_landed) &&
|
(status.main_state == MAIN_STATE_MANUAL || status.condition_landed) &&
|
||||||
sp_man.yaw < -STICK_ON_OFF_LIMIT && sp_man.throttle < 0.1f) {
|
sp_man.r < -STICK_ON_OFF_LIMIT && sp_man.z < 0.1f) {
|
||||||
|
|
||||||
if (stick_off_counter > STICK_ON_OFF_COUNTER_LIMIT) {
|
if (stick_off_counter > STICK_ON_OFF_COUNTER_LIMIT) {
|
||||||
/* disarm to STANDBY if ARMED or to STANDBY_ERROR if ARMED_ERROR */
|
/* disarm to STANDBY if ARMED or to STANDBY_ERROR if ARMED_ERROR */
|
||||||
|
@ -1182,7 +1182,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||||
|
|
||||||
/* check if left stick is in lower right position and we're in MANUAL mode -> arm */
|
/* check if left stick is in lower right position and we're in MANUAL mode -> arm */
|
||||||
if (status.arming_state == ARMING_STATE_STANDBY &&
|
if (status.arming_state == ARMING_STATE_STANDBY &&
|
||||||
sp_man.yaw > STICK_ON_OFF_LIMIT && sp_man.throttle < 0.1f) {
|
sp_man.r > STICK_ON_OFF_LIMIT && sp_man.z < 0.1f) {
|
||||||
if (stick_on_counter > STICK_ON_OFF_COUNTER_LIMIT) {
|
if (stick_on_counter > STICK_ON_OFF_COUNTER_LIMIT) {
|
||||||
if (safety.safety_switch_available && !safety.safety_off && status.hil_state == HIL_STATE_OFF) {
|
if (safety.safety_switch_available && !safety.safety_off && status.hil_state == HIL_STATE_OFF) {
|
||||||
print_reject_arm("NOT ARMING: Press safety switch first.");
|
print_reject_arm("NOT ARMING: Press safety switch first.");
|
||||||
|
|
|
@ -69,11 +69,11 @@ int do_trim_calibration(int mavlink_fd)
|
||||||
orb_copy(ORB_ID(manual_control_setpoint), sub_man, &sp);
|
orb_copy(ORB_ID(manual_control_setpoint), sub_man, &sp);
|
||||||
|
|
||||||
/* set parameters */
|
/* set parameters */
|
||||||
float p = sp.roll;
|
float p = sp.y;
|
||||||
param_set(param_find("TRIM_ROLL"), &p);
|
param_set(param_find("TRIM_ROLL"), &p);
|
||||||
p = sp.pitch;
|
p = sp.x;
|
||||||
param_set(param_find("TRIM_PITCH"), &p);
|
param_set(param_find("TRIM_PITCH"), &p);
|
||||||
p = sp.yaw;
|
p = sp.r;
|
||||||
param_set(param_find("TRIM_YAW"), &p);
|
param_set(param_find("TRIM_YAW"), &p);
|
||||||
|
|
||||||
/* store to permanent storage */
|
/* store to permanent storage */
|
||||||
|
|
Loading…
Reference in New Issue