mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
simulator mavlink: support for quad tiltrotor mav type
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
@@ -94,6 +94,7 @@ void Simulator::pack_actuator_message(mavlink_hil_actuator_controls_t &msg, unsi
|
|||||||
_system_type == MAV_TYPE_OCTOROTOR ||
|
_system_type == MAV_TYPE_OCTOROTOR ||
|
||||||
_system_type == MAV_TYPE_VTOL_DUOROTOR ||
|
_system_type == MAV_TYPE_VTOL_DUOROTOR ||
|
||||||
_system_type == MAV_TYPE_VTOL_QUADROTOR ||
|
_system_type == MAV_TYPE_VTOL_QUADROTOR ||
|
||||||
|
_system_type == MAV_TYPE_VTOL_TILTROTOR ||
|
||||||
_system_type == MAV_TYPE_VTOL_RESERVED2) {
|
_system_type == MAV_TYPE_VTOL_RESERVED2) {
|
||||||
|
|
||||||
/* multirotors: set number of rotor outputs depending on type */
|
/* multirotors: set number of rotor outputs depending on type */
|
||||||
@@ -101,19 +102,13 @@ void Simulator::pack_actuator_message(mavlink_hil_actuator_controls_t &msg, unsi
|
|||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
||||||
switch (_system_type) {
|
switch (_system_type) {
|
||||||
case MAV_TYPE_QUADROTOR:
|
case MAV_TYPE_VTOL_DUOROTOR:
|
||||||
n = 4;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAV_TYPE_HEXAROTOR:
|
|
||||||
n = 6;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAV_TYPE_VTOL_DUOROTOR:
|
|
||||||
n = 2;
|
n = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MAV_TYPE_QUADROTOR:
|
||||||
case MAV_TYPE_VTOL_QUADROTOR:
|
case MAV_TYPE_VTOL_QUADROTOR:
|
||||||
|
case MAV_TYPE_VTOL_TILTROTOR:
|
||||||
n = 4;
|
n = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -122,6 +117,10 @@ void Simulator::pack_actuator_message(mavlink_hil_actuator_controls_t &msg, unsi
|
|||||||
n = 5;
|
n = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MAV_TYPE_HEXAROTOR:
|
||||||
|
n = 6;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
n = 8;
|
n = 8;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user