mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 23:35:22 +03:00
map all the SPECIAL_PARAMETERS to their new homes, except escDesyncProtection (idk where that one goes... seems to not exist?)
This commit is contained in:
parent
0412c4b113
commit
efa10099d2
2 changed files with 6 additions and 9 deletions
3
js/fc.js
3
js/fc.js
|
@ -278,9 +278,6 @@ var FC = {
|
||||||
};
|
};
|
||||||
|
|
||||||
SPECIAL_PARAMETERS = {
|
SPECIAL_PARAMETERS = {
|
||||||
RC_RATE_YAW: 0,
|
|
||||||
airModeActivateThreshold: 0,
|
|
||||||
rcSmoothInterval: 0,
|
|
||||||
escDesyncProtection: 0
|
escDesyncProtection: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
12
js/msp.js
12
js/msp.js
|
@ -985,11 +985,11 @@ var MSP = {
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_SPECIAL_PARAMETERS:
|
case MSP_codes.MSP_SPECIAL_PARAMETERS:
|
||||||
var offset = 0;
|
var offset = 0;
|
||||||
SPECIAL_PARAMETERS.RC_RATE_YAW = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
RC_tuning.yaw_rate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||||
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||||
SPECIAL_PARAMETERS.airModeActivateThreshold = data.getUint16(offset, 1);
|
RX_CONFIG.airModeActivateThreshold = data.getUint16(offset, 1);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
SPECIAL_PARAMETERS.rcSmoothInterval = data.getUint8(offset++, 1)
|
RX_CONFIG.rcSmoothInterval = data.getUint8(offset++, 1)
|
||||||
SPECIAL_PARAMETERS.escDesyncProtection = data.getUint16(offset, 1);
|
SPECIAL_PARAMETERS.escDesyncProtection = data.getUint16(offset, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1667,10 +1667,10 @@ MSP.crunch = function (code) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_SET_SPECIAL_PARAMETERS:
|
case MSP_codes.MSP_SET_SPECIAL_PARAMETERS:
|
||||||
buffer.push(Math.round(SPECIAL_PARAMETERS.RC_RATE_YAW * 100));
|
buffer.push(Math.round(RC_tuning.yaw_rate * 100));
|
||||||
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||||
buffer.push16(SPECIAL_PARAMETERS.airModeActivateThreshold);
|
buffer.push16(RX_CONFIG.airModeActivateThreshold);
|
||||||
buffer.push(SPECIAL_PARAMETERS.rcSmoothInterval);
|
buffer.push(RX_CONFIG.rcSmoothInterval);
|
||||||
buffer.push16(SPECIAL_PARAMETERS.escDesyncProtection);
|
buffer.push16(SPECIAL_PARAMETERS.escDesyncProtection);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue