diff --git a/Rover/Parameters.cpp b/Rover/Parameters.cpp index 2795a3f19e..8386785b89 100644 --- a/Rover/Parameters.cpp +++ b/Rover/Parameters.cpp @@ -650,6 +650,12 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @User: Advanced AP_GROUPINFO("FS_OPTIONS", 48, ParametersG2, fs_options, 0), +#if HAL_TORQEEDO_ENABLED + // @Group: TRQD_ + // @Path: ../libraries/AP_Torqeedo/AP_Torqeedo.cpp + AP_SUBGROUPINFO(torqeedo, "TRQD_", 49, ParametersG2, AP_Torqeedo), +#endif + AP_GROUPEND }; diff --git a/Rover/Parameters.h b/Rover/Parameters.h index 05384dbefd..71202cbecb 100644 --- a/Rover/Parameters.h +++ b/Rover/Parameters.h @@ -6,6 +6,7 @@ #include "AC_Sprayer/AC_Sprayer.h" #include "AP_Gripper/AP_Gripper.h" #include "AP_Rally.h" +#include "AP_Torqeedo/AP_Torqeedo.h" // Global parameter class. // @@ -403,6 +404,11 @@ public: // FS options AP_Int32 fs_options; + +#if HAL_TORQEEDO_ENABLED + // torqeedo motor driver + AP_Torqeedo torqeedo; +#endif }; extern const AP_Param::Info var_info[]; diff --git a/Rover/Rover.h b/Rover/Rover.h index 4a2d8da0b8..deb7ac485e 100644 --- a/Rover/Rover.h +++ b/Rover/Rover.h @@ -69,6 +69,7 @@ #include #include #include +#include #ifdef ENABLE_SCRIPTING #include diff --git a/Rover/system.cpp b/Rover/system.cpp index 4c77f6f3bb..a6e9cf74b5 100644 --- a/Rover/system.cpp +++ b/Rover/system.cpp @@ -93,6 +93,11 @@ void Rover::init_ardupilot() // init wheel encoders g2.wheel_encoder.init(); +#if HAL_TORQEEDO_ENABLED + // init torqeedo motor driver + g2.torqeedo.init(); +#endif + relay.init(); #if HAL_MOUNT_ENABLED diff --git a/Rover/wscript b/Rover/wscript index 6f934ce711..3af5c60a09 100644 --- a/Rover/wscript +++ b/Rover/wscript @@ -26,6 +26,7 @@ def build(bld): 'AP_OSD', 'AP_WindVane', 'AP_Motors', + 'AP_Torqeedo', ], )