1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Revise PID/Rate profile names to use get/set and eliminate extra PG's

Removes the custom CLI commands to update or display the PID and Rate profile names. Moves the storage into the pidProfile and controlRateProfile PG's.

Names can now be set with:
set profile_name = NAME
set rate_profile_name = NAME

Also added profile name display to the profile and rate CMS menus.
This commit is contained in:
Bruce Luckcuck 2019-05-07 15:33:57 -04:00
parent 67d1f720ff
commit f5bc673ada
11 changed files with 57 additions and 116 deletions

View file

@ -100,6 +100,8 @@ typedef enum {
ITERM_RELAX_SETPOINT
} itermRelaxType_e;
#define MAX_PROFILE_NAME_LENGTH 8u
typedef struct pidProfile_s {
uint16_t yaw_lowpass_hz; // Additional yaw filter when yaw axis too noisy
uint16_t dterm_lowpass_hz; // Delta Filter in hz
@ -168,6 +170,7 @@ typedef struct pidProfile_s {
uint8_t motor_output_limit; // Upper limit of the motor output (percent)
int8_t auto_profile_cell_count; // Cell count for this profile to be used with if auto PID profile switching is used
uint8_t transient_throttle_limit; // Maximum DC component of throttle change to mix into throttle to prevent airmode mirroring noise
char profileName[MAX_PROFILE_NAME_LENGTH + 1]; // Descriptive name for profile
} pidProfile_t;
PG_DECLARE_ARRAY(pidProfile_t, PID_PROFILE_COUNT, pidProfiles);