Add DTerm LPF2 to the CMS menu
This commit is contained in:
parent
cacfebe869
commit
9d77c05d1f
|
@ -370,6 +370,7 @@ static CMS_Menu cmsx_menuFilterGlobal = {
|
|||
};
|
||||
|
||||
static uint16_t cmsx_dterm_lowpass_hz;
|
||||
static uint16_t cmsx_dterm_lowpass2_hz;
|
||||
static uint16_t cmsx_dterm_notch_hz;
|
||||
static uint16_t cmsx_dterm_notch_cutoff;
|
||||
static uint16_t cmsx_yaw_lowpass_hz;
|
||||
|
@ -377,10 +378,12 @@ static uint16_t cmsx_yaw_lowpass_hz;
|
|||
static long cmsx_FilterPerProfileRead(void)
|
||||
{
|
||||
const pidProfile_t *pidProfile = pidProfiles(pidProfileIndex);
|
||||
cmsx_dterm_lowpass_hz = pidProfile->dterm_lowpass_hz;
|
||||
cmsx_dterm_notch_hz = pidProfile->dterm_notch_hz;
|
||||
|
||||
cmsx_dterm_lowpass_hz = pidProfile->dterm_lowpass_hz;
|
||||
cmsx_dterm_lowpass2_hz = pidProfile->dterm_lowpass2_hz;
|
||||
cmsx_dterm_notch_hz = pidProfile->dterm_notch_hz;
|
||||
cmsx_dterm_notch_cutoff = pidProfile->dterm_notch_cutoff;
|
||||
cmsx_yaw_lowpass_hz = pidProfile->yaw_lowpass_hz;
|
||||
cmsx_yaw_lowpass_hz = pidProfile->yaw_lowpass_hz;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -390,10 +393,12 @@ static long cmsx_FilterPerProfileWriteback(const OSD_Entry *self)
|
|||
UNUSED(self);
|
||||
|
||||
pidProfile_t *pidProfile = currentPidProfile;
|
||||
pidProfile->dterm_lowpass_hz = cmsx_dterm_lowpass_hz;
|
||||
pidProfile->dterm_notch_hz = cmsx_dterm_notch_hz;
|
||||
|
||||
pidProfile->dterm_lowpass_hz = cmsx_dterm_lowpass_hz;
|
||||
pidProfile->dterm_lowpass2_hz = cmsx_dterm_lowpass2_hz;
|
||||
pidProfile->dterm_notch_hz = cmsx_dterm_notch_hz;
|
||||
pidProfile->dterm_notch_cutoff = cmsx_dterm_notch_cutoff;
|
||||
pidProfile->yaw_lowpass_hz = cmsx_yaw_lowpass_hz;
|
||||
pidProfile->yaw_lowpass_hz = cmsx_yaw_lowpass_hz;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -403,6 +408,7 @@ static OSD_Entry cmsx_menuFilterPerProfileEntries[] =
|
|||
{ "-- FILTER PP --", OME_Label, NULL, NULL, 0 },
|
||||
|
||||
{ "DTERM LPF", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_dterm_lowpass_hz, 0, 500, 1 }, 0 },
|
||||
{ "DTERM LPF2", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_dterm_lowpass2_hz, 0, 500, 1 }, 0 },
|
||||
{ "DTERM NF", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_dterm_notch_hz, 0, 500, 1 }, 0 },
|
||||
{ "DTERM NFCO", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_dterm_notch_cutoff, 0, 500, 1 }, 0 },
|
||||
{ "YAW LPF", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_yaw_lowpass_hz, 0, 500, 1 }, 0 },
|
||||
|
|
Loading…
Reference in New Issue