1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

Adding Motor Output Limit and cellcount

Fix cell count min

Move tootltip`icons

Cosmetic changes
This commit is contained in:
Asizon 2020-02-28 10:05:16 +01:00 committed by mikeller
parent 0a3a9625b1
commit 7e9cebfbf3
5 changed files with 71 additions and 0 deletions

View file

@ -3278,6 +3278,21 @@
"pidTuningLevelHelp": { "pidTuningLevelHelp": {
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation." "message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
}, },
"pidTuningMotorOutputLimit": {
"message": "Motor Output Limit"
},
"pidTuningMotorLimit": {
"message": "Attenuation %"
},
"pidTuningMotorLimitHelp": {
"message": "Attenuates motor commands by the set percentage. Reduces ESC current and motor heat when using higher cell count batteries, e.g. for similar performance from a 6S battery on a 4S build, try 66%; for a 4S battery on a 3S build, try 75%."
},
"pidTuningCellCount": {
"message": "Cell Count"
},
"pidTuningCellCountHelp": {
"message": "Automatically activates the first profile that has a cell count equal to the connected battery."
},
"pidTuningNonProfileFilterSettings": { "pidTuningNonProfileFilterSettings": {
"message": "Profile independent Filter Settings" "message": "Profile independent Filter Settings"
}, },

View file

@ -458,6 +458,8 @@ var FC = {
dMinAdvance: 0, dMinAdvance: 0,
useIntegratedYaw: 0, useIntegratedYaw: 0,
integratedYawRelax: 0, integratedYawRelax: 0,
motorOutputLimit: 0,
autoProfileCellCount: 0,
}; };
ADVANCED_TUNING_ACTIVE = { ...ADVANCED_TUNING }; ADVANCED_TUNING_ACTIVE = { ...ADVANCED_TUNING };

View file

@ -1142,6 +1142,11 @@ MspHelper.prototype.process_data = function(dataHandler) {
if(semver.gte(CONFIG.apiVersion, "1.42.0")) { if(semver.gte(CONFIG.apiVersion, "1.42.0")) {
ADVANCED_TUNING.itermRelaxCutoff = data.readU8(); ADVANCED_TUNING.itermRelaxCutoff = data.readU8();
if(semver.gte(CONFIG.apiVersion, "1.43.0")) {
ADVANCED_TUNING.motorOutputLimit = data.readU8();
ADVANCED_TUNING.autoProfileCellCount = data.readU8();
}
} }
} }
} }
@ -2071,6 +2076,11 @@ MspHelper.prototype.crunch = function(code) {
if(semver.gte(CONFIG.apiVersion, "1.42.0")) { if(semver.gte(CONFIG.apiVersion, "1.42.0")) {
buffer.push8(ADVANCED_TUNING.itermRelaxCutoff); buffer.push8(ADVANCED_TUNING.itermRelaxCutoff);
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
buffer.push8(ADVANCED_TUNING.motorOutputLimit)
.push8(ADVANCED_TUNING.autoProfileCellCount);
}
} }
} }
} }

View file

@ -390,6 +390,13 @@ TABS.pid_tuning.initialize = function (callback) {
$('.rpmFilter').hide(); $('.rpmFilter').hide();
} }
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
$('.pid_tuning input[name="motorLimit"]').val(ADVANCED_TUNING.motorOutputLimit);
$('.pid_tuning input[name="cellCount"]').val(ADVANCED_TUNING.autoProfileCellCount);
} else {
$('.motorOutputLimit').hide();
}
$('input[id="useIntegratedYaw"]').change(function() { $('input[id="useIntegratedYaw"]').change(function() {
var checked = $(this).is(':checked'); var checked = $(this).is(':checked');
$('#pidTuningIntegratedYawCaution').toggle(checked); $('#pidTuningIntegratedYawCaution').toggle(checked);
@ -767,6 +774,8 @@ TABS.pid_tuning.initialize = function (callback) {
if (semver.gte(CONFIG.apiVersion, "1.43.0")) { if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
FILTER_CONFIG.dyn_notch_max_hz = parseInt($('.pid_filter input[name="dynamicNotchMaxHz"]').val()); FILTER_CONFIG.dyn_notch_max_hz = parseInt($('.pid_filter input[name="dynamicNotchMaxHz"]').val());
ADVANCED_TUNING.motorOutputLimit = parseInt($('.pid_tuning input[name="motorLimit"]').val());
ADVANCED_TUNING.autoProfileCellCount = parseInt($('.pid_tuning input[name="cellCount"]').val());
} }
} }

View file

@ -361,6 +361,41 @@
</tr> </tr>
</table> </table>
</div> </div>
<div class="gui_box grey topspacer pid_tuning">
<table class="pid_tuning motorOutputLimit">
<tr>
<th colspan="3">
<div class="pid_mode">
<div i18n="pidTuningMotorOutputLimit" style="float:left;"></div>
</div>
</th>
</tr>
</table>
<table class="pid_titlebar motorOutputLimit">
<tr>
<th class="third"></th>
<th class="third" style="width: 33%;">
<div>
<div i18n="pidTuningMotorLimit" style="float:left;"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningMotorLimitHelp"></div>
</div>
</th>
<th class="third" style="width: 33%;">
<div>
<div i18n="pidTuningCellCount" style="float:left;"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningCellCountHelp"></div>
</div>
</th>
</tr>
</table>
<table class="motorOutputLimit">
<tr>
<td class="third"></td>
<td class="third"><input type="number" name="motorLimit" step="1" min="1" max="100" /></td>
<td class="third"><input type="number" name="cellCount" step="1" min="-1" max="8" /></td>
</tr>
</table>
</div>
</div> </div>
<div class="cf_column"> <div class="cf_column">