Rover: integrate AP_Torqeedo

This commit is contained in:
Randy Mackay 2021-07-01 15:15:10 +09:00
parent 50ce79bcf6
commit e3b366419b
5 changed files with 19 additions and 0 deletions

View File

@ -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
};

View File

@ -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[];

View File

@ -69,6 +69,7 @@
#include <AP_OSD/AP_OSD.h>
#include <AP_WindVane/AP_WindVane.h>
#include <AP_Motors/AP_MotorsUGV.h>
#include <AP_Torqeedo/AP_Torqeedo.h>
#ifdef ENABLE_SCRIPTING
#include <AP_Scripting/AP_Scripting.h>

View File

@ -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

View File

@ -26,6 +26,7 @@ def build(bld):
'AP_OSD',
'AP_WindVane',
'AP_Motors',
'AP_Torqeedo',
],
)