mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
Merge pull request #9903 from iNavFlight/dzikuvx-drop-MSP_FILTER_CONFIG
Drop MSP_FILTER_CONFIG and MSP_SET_FILTER_CONFIG commands
This commit is contained in:
commit
0d21b3d71d
2 changed files with 0 additions and 62 deletions
|
@ -1200,24 +1200,6 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
||||||
sbufWriteU8(dst, 0);
|
sbufWriteU8(dst, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_FILTER_CONFIG :
|
|
||||||
sbufWriteU8(dst, gyroConfig()->gyro_main_lpf_hz);
|
|
||||||
sbufWriteU16(dst, pidProfile()->dterm_lpf_hz);
|
|
||||||
sbufWriteU16(dst, pidProfile()->yaw_lpf_hz);
|
|
||||||
sbufWriteU16(dst, 0); //Was gyroConfig()->gyro_notch_hz
|
|
||||||
sbufWriteU16(dst, 1); //Was gyroConfig()->gyro_notch_cutoff
|
|
||||||
sbufWriteU16(dst, 0); //BF: pidProfile()->dterm_notch_hz
|
|
||||||
sbufWriteU16(dst, 1); //pidProfile()->dterm_notch_cutoff
|
|
||||||
|
|
||||||
sbufWriteU16(dst, 0); //BF: masterConfig.gyro_soft_notch_hz_2
|
|
||||||
sbufWriteU16(dst, 1); //BF: masterConfig.gyro_soft_notch_cutoff_2
|
|
||||||
|
|
||||||
sbufWriteU16(dst, accelerometerConfig()->acc_notch_hz);
|
|
||||||
sbufWriteU16(dst, accelerometerConfig()->acc_notch_cutoff);
|
|
||||||
|
|
||||||
sbufWriteU16(dst, 0); //Was gyroConfig()->gyro_stage2_lowpass_hz
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MSP_PID_ADVANCED:
|
case MSP_PID_ADVANCED:
|
||||||
sbufWriteU16(dst, 0); // pidProfile()->rollPitchItermIgnoreRate
|
sbufWriteU16(dst, 0); // pidProfile()->rollPitchItermIgnoreRate
|
||||||
sbufWriteU16(dst, 0); // pidProfile()->yawItermIgnoreRate
|
sbufWriteU16(dst, 0); // pidProfile()->yawItermIgnoreRate
|
||||||
|
@ -2182,47 +2164,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
|
||||||
return MSP_RESULT_ERROR;
|
return MSP_RESULT_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_SET_FILTER_CONFIG :
|
|
||||||
if (dataSize >= 5) {
|
|
||||||
gyroConfigMutable()->gyro_main_lpf_hz = sbufReadU8(src);
|
|
||||||
pidProfileMutable()->dterm_lpf_hz = constrain(sbufReadU16(src), 0, 500);
|
|
||||||
pidProfileMutable()->yaw_lpf_hz = constrain(sbufReadU16(src), 0, 255);
|
|
||||||
if (dataSize >= 9) {
|
|
||||||
sbufReadU16(src); //Was gyroConfigMutable()->gyro_notch_hz
|
|
||||||
sbufReadU16(src); //Was gyroConfigMutable()->gyro_notch_cutoff
|
|
||||||
} else {
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
if (dataSize >= 13) {
|
|
||||||
sbufReadU16(src);
|
|
||||||
sbufReadU16(src);
|
|
||||||
pidInitFilters();
|
|
||||||
} else {
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
if (dataSize >= 17) {
|
|
||||||
sbufReadU16(src); // Was gyroConfigMutable()->gyro_soft_notch_hz_2
|
|
||||||
sbufReadU16(src); // Was gyroConfigMutable()->gyro_soft_notch_cutoff_2
|
|
||||||
} else {
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dataSize >= 21) {
|
|
||||||
accelerometerConfigMutable()->acc_notch_hz = constrain(sbufReadU16(src), 0, 255);
|
|
||||||
accelerometerConfigMutable()->acc_notch_cutoff = constrain(sbufReadU16(src), 1, 255);
|
|
||||||
} else {
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dataSize >= 22) {
|
|
||||||
sbufReadU16(src); //Was gyro_stage2_lowpass_hz
|
|
||||||
} else {
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
return MSP_RESULT_ERROR;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MSP_SET_PID_ADVANCED:
|
case MSP_SET_PID_ADVANCED:
|
||||||
if (dataSize == 17) {
|
if (dataSize == 17) {
|
||||||
sbufReadU16(src); // pidProfileMutable()->rollPitchItermIgnoreRate
|
sbufReadU16(src); // pidProfileMutable()->rollPitchItermIgnoreRate
|
||||||
|
|
|
@ -196,9 +196,6 @@
|
||||||
#define MSP_ADVANCED_CONFIG 90
|
#define MSP_ADVANCED_CONFIG 90
|
||||||
#define MSP_SET_ADVANCED_CONFIG 91
|
#define MSP_SET_ADVANCED_CONFIG 91
|
||||||
|
|
||||||
#define MSP_FILTER_CONFIG 92
|
|
||||||
#define MSP_SET_FILTER_CONFIG 93
|
|
||||||
|
|
||||||
#define MSP_PID_ADVANCED 94
|
#define MSP_PID_ADVANCED 94
|
||||||
#define MSP_SET_PID_ADVANCED 95
|
#define MSP_SET_PID_ADVANCED 95
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue