vehicle_status: move vtol_vehicle_status enum

It makes more sense to have the VTOL status in its own message.
This commit is contained in:
Julian Oes
2016-02-24 10:27:00 +00:00
parent 74072dbe74
commit 8e9e9f8a8b
5 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -523,7 +523,7 @@ MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_locatio
if(_navigator->get_vstatus()->is_vtol && !_navigator->get_vstatus()->is_rotary_wing){
struct vehicle_command_s cmd = {};
cmd.command = NAV_CMD_DO_VTOL_TRANSITION;
cmd.param1 = vehicle_status_s::VEHICLE_VTOL_STATE_MC;
cmd.param1 = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC;
if (_cmd_pub != nullptr) {
orb_publish(ORB_ID(vehicle_command), _cmd_pub, &cmd);
} else {
+1
View File
@@ -48,6 +48,7 @@
#include <uORB/topics/mission.h>
#include <uORB/topics/vehicle_global_position.h>
#include <uORB/topics/position_setpoint_triplet.h>
#include <uORB/topics/vtol_vehicle_status.h>
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/follow_target.h>
@@ -467,7 +467,7 @@ VtolAttitudeControl::is_fixed_wing_requested()
// listen to transition commands if not in manual
if (!_v_control_mode.flag_control_manual_enabled) {
to_fw = _transition_command == vehicle_status_s::VEHICLE_VTOL_STATE_FW;
to_fw = _transition_command == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_FW;
}
// handle abort request
@@ -699,10 +699,10 @@ void VtolAttitudeControl::task_main()
// reset transition command if not auto control
if (_v_control_mode.flag_control_manual_enabled) {
if (_vtol_type->get_mode() == ROTARY_WING) {
_transition_command = vehicle_status_s::VEHICLE_VTOL_STATE_MC;
_transition_command = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC;
} else if (_vtol_type->get_mode() == FIXED_WING) {
_transition_command = vehicle_status_s::VEHICLE_VTOL_STATE_FW;
_transition_command = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_FW;
}
}