Skip to content

Commit

Permalink
Rover: Add rate controller params
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKear committed Jul 22, 2024
1 parent 60bfd32 commit 5ca9acf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Rover/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,18 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
// @Path: mode_circle.cpp
AP_SUBGROUPINFO(mode_circle, "CIRC", 57, ParametersG2, ModeCircle),

// @Group: RLL
// @Path: ../libraries/APM_Control/AP_RollController.cpp
AP_SUBGROUPINFO(rollController, "RLL", 58, ParametersG2, AP_RollController),

// @Group: PTCH
// @Path: ../libraries/APM_Control/AP_PitchController.cpp
AP_SUBGROUPINFO(pitchController, "PTCH", 59, ParametersG2, AP_PitchController),

// @Group: YAW
// @Path: ../libraries/APM_Control/AP_YawController.cpp
AP_SUBGROUPINFO(yawController, "YAW", 60, ParametersG2, AP_YawController),

AP_GROUPEND
};

Expand Down
12 changes: 12 additions & 0 deletions Rover/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include "AP_Torqeedo/AP_Torqeedo.h"
#include <AP_WindVane/AP_WindVane.h>

#include <APM_Control/AP_RollController.h>
#include <APM_Control/AP_PitchController.h>
#include <APM_Control/AP_YawController.h>

#define AP_PARAM_VEHICLE_NAME rover

// Global parameter class.
Expand Down Expand Up @@ -434,6 +438,14 @@ class ParametersG2 {
AP_Float fs_gcs_timeout;

class ModeCircle mode_circle;

// key aircraft parameters passed to multiple libraries
AP_FixedWing aparm;

// Attitude to servo controllers
AP_RollController rollController{aparm};
AP_PitchController pitchController{aparm};
AP_YawController yawController{aparm};
};

extern const AP_Param::Info var_info[];
8 changes: 8 additions & 0 deletions Rover/Rover.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ class Rover : public AP_Vehicle {
// variables
AP_Param param_loader;

// key aircraft parameters passed to multiple libraries
AP_FixedWing aparm;

// Attitude to servo controllers
AP_RollController rollController{aparm};
AP_PitchController pitchController{aparm};
AP_YawController yawController{aparm};

// all settable parameters
Parameters g;
ParametersG2 g2;
Expand Down

0 comments on commit 5ca9acf

Please sign in to comment.