mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Small fixes again
This commit is contained in:
@@ -1082,7 +1082,8 @@ void handle_command(int status_pub, struct vehicle_status_s *current_vehicle_sta
|
|||||||
/* supported command handling stop */
|
/* supported command handling stop */
|
||||||
if (result == VEHICLE_CMD_RESULT_FAILED ||
|
if (result == VEHICLE_CMD_RESULT_FAILED ||
|
||||||
result == VEHICLE_CMD_RESULT_DENIED ||
|
result == VEHICLE_CMD_RESULT_DENIED ||
|
||||||
result == VEHICLE_CMD_RESULT_UNSUPPORTED) {
|
result == VEHICLE_CMD_RESULT_UNSUPPORTED ||
|
||||||
|
result == VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED) {
|
||||||
|
|
||||||
tune_negative();
|
tune_negative();
|
||||||
|
|
||||||
@@ -1828,16 +1829,19 @@ int commander_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* bottom stick position, go to manual mode */
|
/* bottom stick position, go to manual mode */
|
||||||
current_status.mode_switch = MODE_SWITCH_MANUAL;
|
current_status.mode_switch = MODE_SWITCH_MANUAL;
|
||||||
|
printf("mode switch: manual\n");
|
||||||
|
|
||||||
} else if (sp_man.mode_switch > STICK_ON_OFF_LIMIT) {
|
} else if (sp_man.mode_switch > STICK_ON_OFF_LIMIT) {
|
||||||
|
|
||||||
/* top stick position, set auto/mission for all vehicle types */
|
/* top stick position, set auto/mission for all vehicle types */
|
||||||
current_status.mode_switch = MODE_SWITCH_AUTO;
|
current_status.mode_switch = MODE_SWITCH_AUTO;
|
||||||
|
printf("mode switch: auto\n");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* center stick position, set seatbelt/simple control */
|
/* center stick position, set seatbelt/simple control */
|
||||||
current_status.mode_switch = MODE_SWITCH_SEATBELT;
|
current_status.mode_switch = MODE_SWITCH_SEATBELT;
|
||||||
|
printf("mode switch: seatbelt\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// warnx("man ctrl mode: %d\n", (int)current_status.manual_control_mode);
|
// warnx("man ctrl mode: %d\n", (int)current_status.manual_control_mode);
|
||||||
|
|||||||
@@ -236,11 +236,6 @@ get_mavlink_mode_and_state(uint8_t *mavlink_state, uint8_t *mavlink_mode)
|
|||||||
|
|
||||||
*mavlink_mode |= MAV_MODE_FLAG_GUIDED_ENABLED;
|
*mavlink_mode |= MAV_MODE_FLAG_GUIDED_ENABLED;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// if (v_status.system_state == NAVIGATION_STATE_SEATBELT) {
|
|
||||||
//
|
|
||||||
// *mavlink_mode |= MAV_MODE_FLAG_DECODE_POSITION_GUIDED;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -577,6 +572,7 @@ int mavlink_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user