mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 06:15:13 +03:00
Support for 16-bit DTerm Setpoint Weight
This commit is contained in:
parent
5f68d5982c
commit
6a4e605506
4 changed files with 13 additions and 3 deletions
|
@ -1256,7 +1256,7 @@
|
||||||
"message": "With this parameter, D Setpoint Weight can be reduced near the center of the sticks, which results in smoother end of flips and rolls.<br> The value represents a point of stick deflection: 0 - stick centered, 1 - full deflection. When the stick is above that point, Setpoint Weight is kept constant at its configured value. When the stick is positioned below that point, Setpoint Weight is reduced proportionally, reaching 0 at the stick center position.<br> Value of 1 gives maximum smoothing effect, while value of 0 keeps the Setpoint Weight fixed at its configured value over the whole stick range."
|
"message": "With this parameter, D Setpoint Weight can be reduced near the center of the sticks, which results in smoother end of flips and rolls.<br> The value represents a point of stick deflection: 0 - stick centered, 1 - full deflection. When the stick is above that point, Setpoint Weight is kept constant at its configured value. When the stick is positioned below that point, Setpoint Weight is reduced proportionally, reaching 0 at the stick center position.<br> Value of 1 gives maximum smoothing effect, while value of 0 keeps the Setpoint Weight fixed at its configured value over the whole stick range."
|
||||||
},
|
},
|
||||||
"pidTuningDtermSetpointHelp": {
|
"pidTuningDtermSetpointHelp": {
|
||||||
"message": "This parameter determines the stick accelerating effect within derivative component.<br> Value of 0 equals to old Measuemenent method where D only tracks gyro, while value of 1 equals to old Error method with equal gyro and stick tracking ratio.<br> Lower value equals to slower/smoother stick response, while higher value provides more stick acceleration response.<br> Note that RC interpolation is recommended to be enabled with higher values to prevent control kicks making noise."
|
"message": "This parameter determines the stick accelerating effect within derivative component.<br> Value of 0 equals to old Measuemenent method where D only tracks gyro, while value of 1.27 equals to old Error method with equal gyro and stick tracking ratio.<br> Lower value equals to slower/smoother stick response, while higher value provides more stick acceleration response.<br> Note that RC interpolation is recommended to be enabled with higher values to prevent control kicks making noise.<br> Since <b>BF3.4.0</b> you can set value up to 20 by entering it manually in the number box or through the CLI."
|
||||||
},
|
},
|
||||||
"pidTuningDtermSetpointTransitionWarning": {
|
"pidTuningDtermSetpointTransitionWarning": {
|
||||||
"message": "<span class=\"message-negative\"><strong>$t(warningTitle.message):<\/strong> The use of a D Setpoint transition greater than 0 and less than 0.1 is highly discouraged. Doing may lead instability and reduced stick responsiveness as the sticks cross the centre point.<\/span>"
|
"message": "<span class=\"message-negative\"><strong>$t(warningTitle.message):<\/strong> The use of a D Setpoint transition greater than 0 and less than 0.1 is highly discouraged. Doing may lead instability and reduced stick responsiveness as the sticks cross the centre point.<\/span>"
|
||||||
|
|
|
@ -864,6 +864,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
||||||
ADVANCED_TUNING.itermThrottleThreshold = data.readU16();
|
ADVANCED_TUNING.itermThrottleThreshold = data.readU16();
|
||||||
ADVANCED_TUNING.itermAcceleratorGain = data.readU16();
|
ADVANCED_TUNING.itermAcceleratorGain = data.readU16();
|
||||||
}
|
}
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||||
|
ADVANCED_TUNING.dtermSetpointWeight = data.readU16();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_SENSOR_CONFIG:
|
case MSPCodes.MSP_SENSOR_CONFIG:
|
||||||
|
@ -1479,7 +1482,7 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
.push8(ADVANCED_TUNING.deltaMethod)
|
.push8(ADVANCED_TUNING.deltaMethod)
|
||||||
.push8(ADVANCED_TUNING.vbatPidCompensation)
|
.push8(ADVANCED_TUNING.vbatPidCompensation)
|
||||||
.push8(ADVANCED_TUNING.dtermSetpointTransition)
|
.push8(ADVANCED_TUNING.dtermSetpointTransition)
|
||||||
.push8(ADVANCED_TUNING.dtermSetpointWeight)
|
.push8(Math.min(ADVANCED_TUNING.dtermSetpointWeight, 254))
|
||||||
.push8(ADVANCED_TUNING.toleranceBand)
|
.push8(ADVANCED_TUNING.toleranceBand)
|
||||||
.push8(ADVANCED_TUNING.toleranceBandReduction)
|
.push8(ADVANCED_TUNING.toleranceBandReduction)
|
||||||
.push8(ADVANCED_TUNING.itermThrottleGain)
|
.push8(ADVANCED_TUNING.itermThrottleGain)
|
||||||
|
@ -1493,6 +1496,9 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
buffer.push16(ADVANCED_TUNING.itermThrottleThreshold)
|
buffer.push16(ADVANCED_TUNING.itermThrottleThreshold)
|
||||||
.push16(ADVANCED_TUNING.itermAcceleratorGain);
|
.push16(ADVANCED_TUNING.itermAcceleratorGain);
|
||||||
}
|
}
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||||
|
buffer.push16(ADVANCED_TUNING.dtermSetpointWeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// only supports 1 version pre bf 3.0
|
// only supports 1 version pre bf 3.0
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -516,6 +516,10 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
$('.tab-pid_tuning .pidTuningFeatures').hide();
|
$('.tab-pid_tuning .pidTuningFeatures').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.lt(CONFIG.apiVersion, "1.39.0")) {
|
||||||
|
$('input[name="dtermSetpoint-number"]').attr('max', '2.54');
|
||||||
|
}
|
||||||
|
|
||||||
// translate to user-selected language
|
// translate to user-selected language
|
||||||
i18n.localizePage();
|
i18n.localizePage();
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="dtermSetpoint" style="height:30px;">
|
<tr class="dtermSetpoint" style="height:30px;">
|
||||||
<td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="2.54"/></td>
|
<td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="20"/></td>
|
||||||
<td class="slider"><input type="range" name="dtermSetpoint-range" step="0.01" min="0.00" max="2.54"/></td>
|
<td class="slider"><input type="range" name="dtermSetpoint-range" step="0.01" min="0.00" max="2.54"/></td>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue