mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +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
12
js/msp.js
12
js/msp.js
|
@ -985,11 +985,11 @@ var MSP = {
|
|||
break;
|
||||
case MSP_codes.MSP_SPECIAL_PARAMETERS:
|
||||
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")) {
|
||||
SPECIAL_PARAMETERS.airModeActivateThreshold = data.getUint16(offset, 1);
|
||||
RX_CONFIG.airModeActivateThreshold = data.getUint16(offset, 1);
|
||||
offset += 2;
|
||||
SPECIAL_PARAMETERS.rcSmoothInterval = data.getUint8(offset++, 1)
|
||||
RX_CONFIG.rcSmoothInterval = data.getUint8(offset++, 1)
|
||||
SPECIAL_PARAMETERS.escDesyncProtection = data.getUint16(offset, 1);
|
||||
}
|
||||
break;
|
||||
|
@ -1667,10 +1667,10 @@ MSP.crunch = function (code) {
|
|||
}
|
||||
break;
|
||||
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")) {
|
||||
buffer.push16(SPECIAL_PARAMETERS.airModeActivateThreshold);
|
||||
buffer.push(SPECIAL_PARAMETERS.rcSmoothInterval);
|
||||
buffer.push16(RX_CONFIG.airModeActivateThreshold);
|
||||
buffer.push(RX_CONFIG.rcSmoothInterval);
|
||||
buffer.push16(SPECIAL_PARAMETERS.escDesyncProtection);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue