Skip to content
Snippets Groups Projects
Commit ddb2dd89 authored by Roman's avatar Roman Committed by Daniel Agar
Browse files

simulator mavlink: support for quad tiltrotor mav type


Signed-off-by: default avatarRoman <bapstroman@gmail.com>
parent e9c715f8
No related branches found
No related tags found
No related merge requests found
......@@ -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_VTOL_DUOROTOR ||
_system_type == MAV_TYPE_VTOL_QUADROTOR ||
_system_type == MAV_TYPE_VTOL_TILTROTOR ||
_system_type == MAV_TYPE_VTOL_RESERVED2) {
/* 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;
switch (_system_type) {
case MAV_TYPE_QUADROTOR:
n = 4;
break;
case MAV_TYPE_HEXAROTOR:
n = 6;
break;
case MAV_TYPE_VTOL_DUOROTOR:
case MAV_TYPE_VTOL_DUOROTOR:
n = 2;
break;
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_VTOL_QUADROTOR:
case MAV_TYPE_VTOL_TILTROTOR:
n = 4;
break;
......@@ -122,6 +117,10 @@ void Simulator::pack_actuator_message(mavlink_hil_actuator_controls_t &msg, unsi
n = 5;
break;
case MAV_TYPE_HEXAROTOR:
n = 6;
break;
default:
n = 8;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment