mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:23:33 +08:00
Removed is_rotor_wing, replaced with vehicle_type
This commit is contained in:
committed by
Julian Oes
parent
2ca40bfc65
commit
a134da6e12
@@ -538,7 +538,7 @@ void MavlinkStreamHighLatency2::update_vehicle_status()
|
||||
if (status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
|
||||
struct actuator_controls_s actuator = {};
|
||||
|
||||
if (status.is_vtol && !status.is_rotary_wing) {
|
||||
if (status.is_vtol && status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) {
|
||||
if (_actuator_sub_1->update(&actuator)) {
|
||||
_throttle.add_value(actuator.control[actuator_controls_s::INDEX_THROTTLE], _update_rate_filtered);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ void get_mavlink_navigation_mode(const struct vehicle_status_s *const status, ui
|
||||
switch (status->nav_state) {
|
||||
case vehicle_status_s::NAVIGATION_STATE_MANUAL:
|
||||
*mavlink_base_mode |= MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
|
||||
| (status->is_rotary_wing ? MAV_MODE_FLAG_STABILIZE_ENABLED : 0);
|
||||
| (status->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING ? MAV_MODE_FLAG_STABILIZE_ENABLED : 0);
|
||||
custom_mode->main_mode = PX4_CUSTOM_MAIN_MODE_MANUAL;
|
||||
break;
|
||||
|
||||
@@ -4284,7 +4284,7 @@ protected:
|
||||
updated = true;
|
||||
|
||||
if (status.is_vtol) {
|
||||
if (!status.in_transition_mode && status.is_rotary_wing) {
|
||||
if (!status.in_transition_mode && status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
||||
_msg.vtol_state = MAV_VTOL_STATE_MC;
|
||||
|
||||
} else if (!status.in_transition_mode) {
|
||||
|
||||
Reference in New Issue
Block a user