Merge pull request #6409 from mikeller/remove_unused_pid_settings
Removed unused PID settings.
This commit is contained in:
commit
de7a18f1c2
|
@ -1263,25 +1263,10 @@ static bool blackboxWriteSysinfo(void)
|
||||||
BLACKBOX_PRINT_HEADER_LINE("yawPID", "%d,%d,%d", currentPidProfile->pid[PID_YAW].P,
|
BLACKBOX_PRINT_HEADER_LINE("yawPID", "%d,%d,%d", currentPidProfile->pid[PID_YAW].P,
|
||||||
currentPidProfile->pid[PID_YAW].I,
|
currentPidProfile->pid[PID_YAW].I,
|
||||||
currentPidProfile->pid[PID_YAW].D);
|
currentPidProfile->pid[PID_YAW].D);
|
||||||
BLACKBOX_PRINT_HEADER_LINE("altPID", "%d,%d,%d", currentPidProfile->pid[PID_ALT].P,
|
|
||||||
currentPidProfile->pid[PID_ALT].I,
|
|
||||||
currentPidProfile->pid[PID_ALT].D);
|
|
||||||
BLACKBOX_PRINT_HEADER_LINE("posPID", "%d,%d,%d", currentPidProfile->pid[PID_POS].P,
|
|
||||||
currentPidProfile->pid[PID_POS].I,
|
|
||||||
currentPidProfile->pid[PID_POS].D);
|
|
||||||
BLACKBOX_PRINT_HEADER_LINE("posrPID", "%d,%d,%d", currentPidProfile->pid[PID_POSR].P,
|
|
||||||
currentPidProfile->pid[PID_POSR].I,
|
|
||||||
currentPidProfile->pid[PID_POSR].D);
|
|
||||||
BLACKBOX_PRINT_HEADER_LINE("navrPID", "%d,%d,%d", currentPidProfile->pid[PID_NAVR].P,
|
|
||||||
currentPidProfile->pid[PID_NAVR].I,
|
|
||||||
currentPidProfile->pid[PID_NAVR].D);
|
|
||||||
BLACKBOX_PRINT_HEADER_LINE("levelPID", "%d,%d,%d", currentPidProfile->pid[PID_LEVEL].P,
|
BLACKBOX_PRINT_HEADER_LINE("levelPID", "%d,%d,%d", currentPidProfile->pid[PID_LEVEL].P,
|
||||||
currentPidProfile->pid[PID_LEVEL].I,
|
currentPidProfile->pid[PID_LEVEL].I,
|
||||||
currentPidProfile->pid[PID_LEVEL].D);
|
currentPidProfile->pid[PID_LEVEL].D);
|
||||||
BLACKBOX_PRINT_HEADER_LINE("magPID", "%d", currentPidProfile->pid[PID_MAG].P);
|
BLACKBOX_PRINT_HEADER_LINE("magPID", "%d", currentPidProfile->pid[PID_MAG].P);
|
||||||
BLACKBOX_PRINT_HEADER_LINE("velPID", "%d,%d,%d", currentPidProfile->pid[PID_VEL].P,
|
|
||||||
currentPidProfile->pid[PID_VEL].I,
|
|
||||||
currentPidProfile->pid[PID_VEL].D);
|
|
||||||
BLACKBOX_PRINT_HEADER_LINE("dterm_filter_type", "%d", currentPidProfile->dterm_filter_type);
|
BLACKBOX_PRINT_HEADER_LINE("dterm_filter_type", "%d", currentPidProfile->dterm_filter_type);
|
||||||
BLACKBOX_PRINT_HEADER_LINE("dterm_lowpass_hz", "%d", currentPidProfile->dterm_lowpass_hz);
|
BLACKBOX_PRINT_HEADER_LINE("dterm_lowpass_hz", "%d", currentPidProfile->dterm_lowpass_hz);
|
||||||
BLACKBOX_PRINT_HEADER_LINE("dterm_lowpass2_hz", "%d", currentPidProfile->dterm_lowpass2_hz);
|
BLACKBOX_PRINT_HEADER_LINE("dterm_lowpass2_hz", "%d", currentPidProfile->dterm_lowpass2_hz);
|
||||||
|
|
|
@ -58,6 +58,13 @@
|
||||||
|
|
||||||
#define ITERM_RELAX_SETPOINT_THRESHOLD 30.0f
|
#define ITERM_RELAX_SETPOINT_THRESHOLD 30.0f
|
||||||
|
|
||||||
|
const char pidNames[] =
|
||||||
|
"ROLL;"
|
||||||
|
"PITCH;"
|
||||||
|
"YAW;"
|
||||||
|
"LEVEL;"
|
||||||
|
"MAG;";
|
||||||
|
|
||||||
FAST_RAM_ZERO_INIT uint32_t targetPidLooptime;
|
FAST_RAM_ZERO_INIT uint32_t targetPidLooptime;
|
||||||
FAST_RAM_ZERO_INIT pidAxisData_t pidData[XYZ_AXIS_COUNT];
|
FAST_RAM_ZERO_INIT pidAxisData_t pidData[XYZ_AXIS_COUNT];
|
||||||
|
|
||||||
|
@ -113,13 +120,8 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
||||||
[PID_ROLL] = { 46, 45, 25, 60 },
|
[PID_ROLL] = { 46, 45, 25, 60 },
|
||||||
[PID_PITCH] = { 50, 50, 27, 60 },
|
[PID_PITCH] = { 50, 50, 27, 60 },
|
||||||
[PID_YAW] = { 65, 45, 0 , 60 },
|
[PID_YAW] = { 65, 45, 0 , 60 },
|
||||||
[PID_ALT] = { 50, 0, 0, 0 },
|
|
||||||
[PID_POS] = { 15, 0, 0, 0 }, // POSHOLD_P * 100, POSHOLD_I * 100,
|
|
||||||
[PID_POSR] = { 34, 14, 53, 0 }, // POSHOLD_RATE_P * 10, POSHOLD_RATE_I * 100, POSHOLD_RATE_D * 1000,
|
|
||||||
[PID_NAVR] = { 25, 33, 83, 0 }, // NAV_P * 10, NAV_I * 100, NAV_D * 1000
|
|
||||||
[PID_LEVEL] = { 50, 50, 75, 0 },
|
[PID_LEVEL] = { 50, 50, 75, 0 },
|
||||||
[PID_MAG] = { 40, 0, 0, 0 },
|
[PID_MAG] = { 40, 0, 0, 0 },
|
||||||
[PID_VEL] = { 55, 55, 75, 0 }
|
|
||||||
},
|
},
|
||||||
|
|
||||||
.pidSumLimit = PIDSUM_LIMIT,
|
.pidSumLimit = PIDSUM_LIMIT,
|
||||||
|
|
|
@ -47,13 +47,8 @@ typedef enum {
|
||||||
PID_ROLL,
|
PID_ROLL,
|
||||||
PID_PITCH,
|
PID_PITCH,
|
||||||
PID_YAW,
|
PID_YAW,
|
||||||
PID_ALT,
|
|
||||||
PID_POS,
|
|
||||||
PID_POSR,
|
|
||||||
PID_NAVR,
|
|
||||||
PID_LEVEL,
|
PID_LEVEL,
|
||||||
PID_MAG,
|
PID_MAG,
|
||||||
PID_VEL,
|
|
||||||
PID_ITEM_COUNT
|
PID_ITEM_COUNT
|
||||||
} pidIndex_e;
|
} pidIndex_e;
|
||||||
|
|
||||||
|
@ -177,6 +172,8 @@ typedef struct pidAxisData_s {
|
||||||
float Sum;
|
float Sum;
|
||||||
} pidAxisData_t;
|
} pidAxisData_t;
|
||||||
|
|
||||||
|
extern const char pidNames[];
|
||||||
|
|
||||||
extern pidAxisData_t pidData[3];
|
extern pidAxisData_t pidData[3];
|
||||||
|
|
||||||
extern uint32_t targetPidLooptime;
|
extern uint32_t targetPidLooptime;
|
||||||
|
|
|
@ -143,18 +143,6 @@ static uint8_t rebootMode;
|
||||||
|
|
||||||
#ifndef USE_OSD_SLAVE
|
#ifndef USE_OSD_SLAVE
|
||||||
|
|
||||||
static const char pidnames[] =
|
|
||||||
"ROLL;"
|
|
||||||
"PITCH;"
|
|
||||||
"YAW;"
|
|
||||||
"ALT;"
|
|
||||||
"Pos;"
|
|
||||||
"PosR;"
|
|
||||||
"NavR;"
|
|
||||||
"LEVEL;"
|
|
||||||
"MAG;"
|
|
||||||
"VEL;";
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MSP_SDCARD_STATE_NOT_PRESENT = 0,
|
MSP_SDCARD_STATE_NOT_PRESENT = 0,
|
||||||
MSP_SDCARD_STATE_FATAL = 1,
|
MSP_SDCARD_STATE_FATAL = 1,
|
||||||
|
@ -984,7 +972,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_PIDNAMES:
|
case MSP_PIDNAMES:
|
||||||
for (const char *c = pidnames; *c; c++) {
|
for (const char *c = pidNames; *c; c++) {
|
||||||
sbufWriteU8(dst, *c);
|
sbufWriteU8(dst, *c);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue