From 473016b41d8f86c76fdf9413613b43fee1a6781d Mon Sep 17 00:00:00 2001 From: David Ingraham Date: Sat, 20 Feb 2016 20:11:54 -0700 Subject: [PATCH] Sub: Add support for Vectored 6DOF ROV Sub: Various defines for vectored-6dof configuration Sub: fix compile errors for vector6dof rov More fixes --- ArduSub/APM_Config.h | 1 + ArduSub/GCS_Mavlink.cpp | 2 +- ArduSub/Parameters.cpp | 2 +- ArduSub/Sub.h | 3 +++ ArduSub/config.h | 4 +++- ArduSub/defines.h | 1 + 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ArduSub/APM_Config.h b/ArduSub/APM_Config.h index e70a4c600d..d86688e2b1 100644 --- a/ArduSub/APM_Config.h +++ b/ArduSub/APM_Config.h @@ -9,6 +9,7 @@ /* options: * BLUEROV_FRAME * VECTORED_FRAME + * VECTORED6DOF_FRAME */ // uncomment the lines below to disable features (flash sizes listed are for APM2 boards and will underestimate savings on Pixhawk and other boards) diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index 32da20cc0b..6dd6d7efcd 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -92,7 +92,7 @@ NOINLINE void Sub::send_heartbeat(mavlink_channel_t chan) MAV_TYPE_ROCKET, #elif (FRAME_CONFIG == COAX_FRAME) //because mavlink did not define a singlecopter, we use a rocket MAV_TYPE_ROCKET, -#elif (FRAME_CONFIG == BLUEROV_FRAME || FRAME_CONFIG == VECTORED_FRAME) +#elif (FRAME_CONFIG == BLUEROV_FRAME || FRAME_CONFIG == VECTORED_FRAME || FRAME_CONFIG == VECTORED6DOF_FRAME) MAV_TYPE_HEXAROTOR, #else #error Unrecognised frame type diff --git a/ArduSub/Parameters.cpp b/ArduSub/Parameters.cpp index 3901f4f60a..4717503a39 100644 --- a/ArduSub/Parameters.cpp +++ b/ArduSub/Parameters.cpp @@ -997,7 +997,7 @@ const AP_Param::Info Sub::var_info[] = { // @Path: ../libraries/AP_Motors/AP_MotorsTri.cpp GOBJECT(motors, "MOT_", AP_MotorsTri), -#elif (FRAME_CONFIG == VECTORED_FRAME || FRAME_CONFIG == BLUEROV_FRAME) +#elif (FRAME_CONFIG == VECTORED_FRAME || FRAME_CONFIG == BLUEROV_FRAME || FRAME_CONFIG == VECTORED6DOF_FRAME) // @Group: MOT_ // @Path: ../libraries/AP_Motors/AP_Motors6DOF.cpp GOBJECT(motors, "MOT_", AP_Motors6DOF), diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index 77bababb85..92b7af63ef 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -312,6 +312,9 @@ private: #define MOTOR_CLASS AP_MotorsBlueROV6DOF #elif FRAME_CONFIG == VECTORED_FRAME #define MOTOR_CLASS AP_MotorsVectoredROV +#elif FRAME_CONFIG == VECTORED6DOF_FRAME + #define MOTOR_CLASS AP_MotorsVectored6DOF + #else #error Unrecognised frame type #endif diff --git a/ArduSub/config.h b/ArduSub/config.h index 4618f36744..c47e994bf7 100644 --- a/ArduSub/config.h +++ b/ArduSub/config.h @@ -63,13 +63,15 @@ // FRAME_CONFIG // #ifndef FRAME_CONFIG - # define FRAME_CONFIG BLUEROV_FRAME + # define FRAME_CONFIG VECTORED6DOF_FRAME #endif #if FRAME_CONFIG == BLUEROV_FRAME # define FRAME_CONFIG_STRING "ROV_BLUEROV_FRAME" #elif FRAME_CONFIG == VECTORED_FRAME # define FRAME_CONFIG_STRING "ROV_VECTORED_FRAME" +#elif FRAME_CONFIG == VECTORED6DOF_FRAME + # define FRAME_CONFIG_STRING "ROV_VECTORED6DOF_FRAME" #else # define FRAME_CONFIG_STRING "UNKNOWN" #endif diff --git a/ArduSub/defines.h b/ArduSub/defines.h index c88ee3e5a1..4479699eab 100644 --- a/ArduSub/defines.h +++ b/ArduSub/defines.h @@ -81,6 +81,7 @@ enum aux_sw_func { #define COAX_FRAME 9 #define BLUEROV_FRAME 10 #define VECTORED_FRAME 11 +#define VECTORED6DOF_FRAME 12 // HIL enumerations #define HIL_MODE_DISABLED 0