mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
MIssing filter configs in FILTER_CONFIG
This commit is contained in:
parent
e8f37da7c7
commit
f104610f1d
2 changed files with 22 additions and 1 deletions
5
js/fc.js
5
js/fc.js
|
@ -315,7 +315,10 @@ var FC = {
|
||||||
dtermNotchHz: null,
|
dtermNotchHz: null,
|
||||||
dtermNotchCutoff: null,
|
dtermNotchCutoff: null,
|
||||||
gyroNotchHz2: null,
|
gyroNotchHz2: null,
|
||||||
gyroNotchCutoff2: null
|
gyroNotchCutoff2: null,
|
||||||
|
accNotchHz: null,
|
||||||
|
accNotchCutoff: null,
|
||||||
|
gyroStage2LowpassHz: null
|
||||||
};
|
};
|
||||||
|
|
||||||
PID_ADVANCED = {
|
PID_ADVANCED = {
|
||||||
|
|
|
@ -1092,6 +1092,12 @@ var mspHelper = (function (gui) {
|
||||||
FILTER_CONFIG.gyroNotchHz2 = data.getUint16(13, true);
|
FILTER_CONFIG.gyroNotchHz2 = data.getUint16(13, true);
|
||||||
FILTER_CONFIG.gyroNotchCutoff2 = data.getUint16(15, true);
|
FILTER_CONFIG.gyroNotchCutoff2 = data.getUint16(15, true);
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
|
||||||
|
FILTER_CONFIG.accNotchHz = data.getUint16(17, true);
|
||||||
|
FILTER_CONFIG.accNotchCutoff = data.getUint16(19, true);
|
||||||
|
FILTER_CONFIG.gyroStage2LowpassHz = data.getUint16(21, true);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSPCodes.MSP_SET_FILTER_CONFIG:
|
case MSPCodes.MSP_SET_FILTER_CONFIG:
|
||||||
|
@ -1853,6 +1859,18 @@ var mspHelper = (function (gui) {
|
||||||
|
|
||||||
buffer.push(lowByte(FILTER_CONFIG.gyroNotchCutoff2));
|
buffer.push(lowByte(FILTER_CONFIG.gyroNotchCutoff2));
|
||||||
buffer.push(highByte(FILTER_CONFIG.gyroNotchCutoff2));
|
buffer.push(highByte(FILTER_CONFIG.gyroNotchCutoff2));
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
|
||||||
|
buffer.push(lowByte(FILTER_CONFIG.accNotchHz));
|
||||||
|
buffer.push(highByte(FILTER_CONFIG.accNotchHz));
|
||||||
|
|
||||||
|
buffer.push(lowByte(FILTER_CONFIG.accNotchCutoff));
|
||||||
|
buffer.push(highByte(FILTER_CONFIG.accNotchCutoff));
|
||||||
|
|
||||||
|
buffer.push(lowByte(FILTER_CONFIG.gyroStage2LowpassHz));
|
||||||
|
buffer.push(highByte(FILTER_CONFIG.gyroStage2LowpassHz));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue