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

Add throttle limit to PID Tuning tab

This commit is contained in:
Bruce Luckcuck 2018-11-24 20:07:25 -05:00
parent 2f3a319f67
commit 892640e35f
5 changed files with 102 additions and 0 deletions

View file

@ -320,6 +320,10 @@ MspHelper.prototype.process_data = function(dataHandler) {
RC_tuning.rcPitchRate = 0;
RC_tuning.RC_PITCH_EXPO = 0;
}
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
RC_tuning.throttleLimitType = data.readU8();
RC_tuning.throttleLimitPercent = data.readU8();
}
break;
case MSPCodes.MSP_PID:
// PID data arrived, we need to scale it and save to appropriate bank / array
@ -1347,6 +1351,10 @@ MspHelper.prototype.crunch = function(code) {
buffer.push8(Math.round(RC_tuning.rcPitchRate * 100));
buffer.push8(Math.round(RC_tuning.RC_PITCH_EXPO * 100));
}
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
buffer.push8(RC_tuning.throttleLimitType);
buffer.push8(RC_tuning.throttleLimitPercent);
}
break;
case MSPCodes.MSP_SET_RX_MAP:
for (var i = 0; i < RC_MAP.length; i++) {