1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Merge commit '34e8c55a00' into development

Conflicts:
	js/msp.js
This commit is contained in:
Dominic Clifton 2015-05-25 23:40:28 +01:00
commit 774fcf5f68
6 changed files with 37 additions and 3 deletions

View file

@ -311,10 +311,16 @@ var MSP = {
RC_tuning.throttle_MID = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
RC_tuning.throttle_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
if (semver.gte(CONFIG.apiVersion, "1.7.0")) {
RC_tuning.dynamic_THR_breakpoint = data.getUint16(offset++, 1);
RC_tuning.dynamic_THR_breakpoint = data.getUint16(offset, 1);
offset += 2;
} else {
RC_tuning.dynamic_THR_breakpoint = 0;
}
if (semver.gte(CONFIG.apiVersion, "1.10.0")) {
RC_tuning.RC_YAW_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
} else {
RC_tuning.RC_YAW_EXPO = 0;
}
break;
case MSP_codes.MSP_PID:
// PID data arrived, we need to scale it and save to appropriate bank / array
@ -970,6 +976,9 @@ MSP.crunch = function (code) {
if (semver.gte(CONFIG.apiVersion, "1.7.0")) {
buffer.push(lowByte(RC_tuning.dynamic_THR_breakpoint));
buffer.push(highByte(RC_tuning.dynamic_THR_breakpoint));
}
if (semver.gte(CONFIG.apiVersion, "1.10.0")) {
buffer.push(parseInt(RC_tuning.RC_YAW_EXPO * 100));
}
break;
// Disabled, cleanflight does not use MSP_SET_BOX.