mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
Fixed configurator for versions < 2.9.0.
This commit is contained in:
parent
60d80a5e96
commit
1147eef7a6
1 changed files with 6 additions and 2 deletions
|
@ -408,7 +408,11 @@ var MSP = {
|
|||
RC_tuning.RC_YAW_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
|
||||
RC_tuning.rcYawRate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
} else if (semver.lt(CONFIG.apiVersion, "1.16.0")) {
|
||||
RC_tuning.rcYawRate = 0;
|
||||
}
|
||||
} else {
|
||||
RC_tuning.RC_YAW_EXPO = 0;
|
||||
}
|
||||
break;
|
||||
case MSP_codes.MSP_PID:
|
||||
|
@ -998,7 +1002,7 @@ var MSP = {
|
|||
case MSP_codes.MSP_SPECIAL_PARAMETERS:
|
||||
var offset = 0;
|
||||
RC_tuning.rcYawRate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
|
||||
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
RX_CONFIG.airModeActivateThreshold = data.getUint16(offset, 1);
|
||||
offset += 2;
|
||||
RX_CONFIG.rcSmoothInterval = data.getUint8(offset++, 1)
|
||||
|
@ -1688,7 +1692,7 @@ MSP.crunch = function (code) {
|
|||
break;
|
||||
case MSP_codes.MSP_SET_SPECIAL_PARAMETERS:
|
||||
buffer.push(Math.round(RC_tuning.rcYawRate * 100));
|
||||
if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
buffer.push16(RX_CONFIG.airModeActivateThreshold);
|
||||
buffer.push(RX_CONFIG.rcSmoothInterval);
|
||||
buffer.push16(SPECIAL_PARAMETERS.escDesyncProtection);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue