Skip to content

Commit a9f1dbb

Browse files
committed
AP_Tuning_Plane: Added PIDFF tuning sets
1 parent 74b6354 commit a9f1dbb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

ArduPlane/tuning.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const uint8_t AP_Tuning_Plane::tuning_set_az[] = { TUNING_AZ_P, TU
3737
const uint8_t AP_Tuning_Plane::tuning_set_rate_pitchDP[]= { TUNING_RATE_PITCH_D, TUNING_RATE_PITCH_P };
3838
const uint8_t AP_Tuning_Plane::tuning_set_rate_rollDP[]= { TUNING_RATE_ROLL_D, TUNING_RATE_ROLL_P };
3939
const uint8_t AP_Tuning_Plane::tuning_set_rate_yawDP[]= { TUNING_RATE_YAW_D, TUNING_RATE_YAW_P };
40+
const uint8_t AP_Tuning_Plane::tuning_set_dp_roll_pitch[] = { TUNING_RLL_D, TUNING_RLL_P, TUNING_PIT_D, TUNING_PIT_P };
41+
const uint8_t AP_Tuning_Plane::tuning_set_pidff_roll[] = { TUNING_RLL_P, TUNING_RLL_I, TUNING_RLL_D, TUNING_RLL_FF };
42+
const uint8_t AP_Tuning_Plane::tuning_set_pidff_pitch[] = { TUNING_PIT_P, TUNING_PIT_I, TUNING_PIT_D, TUNING_PIT_FF };
4043

4144
// macro to prevent getting the array length wrong
4245
#define TUNING_ARRAY(v) ARRAY_SIZE(v), v
@@ -53,6 +56,9 @@ const AP_Tuning_Plane::tuning_set AP_Tuning_Plane::tuning_sets[] = {
5356
{ TUNING_SET_RATE_PITCHDP, TUNING_ARRAY(tuning_set_rate_pitchDP) },
5457
{ TUNING_SET_RATE_ROLLDP, TUNING_ARRAY(tuning_set_rate_rollDP) },
5558
{ TUNING_SET_RATE_YAWDP, TUNING_ARRAY(tuning_set_rate_yawDP) },
59+
{ TUNING_SET_DP_ROLL_PITCH, TUNING_ARRAY(tuning_set_dp_roll_pitch) },
60+
{ TUNING_SET_PIDFF_ROLL, TUNING_ARRAY(tuning_set_pidff_roll) },
61+
{ TUNING_SET_PIDFF_PITCH, TUNING_ARRAY(tuning_set_pidff_pitch) },
5662
{ 0, 0, nullptr }
5763
};
5864

ArduPlane/tuning.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class AP_Tuning_Plane : public AP_Tuning
9494
TUNING_SET_RATE_PITCHDP = 8,
9595
TUNING_SET_RATE_ROLLDP = 9,
9696
TUNING_SET_RATE_YAWDP = 10,
97+
TUNING_SET_DP_ROLL_PITCH = 11,
98+
TUNING_SET_PIDFF_ROLL = 12,
99+
TUNING_SET_PIDFF_PITCH = 13,
97100
};
98101

99102
AP_Float *get_param_pointer(uint8_t parm) override;
@@ -112,6 +115,9 @@ class AP_Tuning_Plane : public AP_Tuning
112115
static const uint8_t tuning_set_rate_pitchDP[];
113116
static const uint8_t tuning_set_rate_rollDP[];
114117
static const uint8_t tuning_set_rate_yawDP[];
118+
static const uint8_t tuning_set_dp_roll_pitch[];
119+
static const uint8_t tuning_set_pidff_roll[];
120+
static const uint8_t tuning_set_pidff_pitch[];
115121

116122
// mask of what params have been set
117123
uint64_t have_set;

0 commit comments

Comments
 (0)