Fix auto_profile_cell_count range

10.9-maintenance
Mark Haslinghuis 2022-08-14 17:50:34 +02:00
parent 7bc1db46b6
commit bea9d16486
3 changed files with 50 additions and 5 deletions

View File

@ -3710,7 +3710,39 @@
"message": "Cell Count - for auto Profile switching"
},
"pidTuningCellCountHelp": {
"message": "Automatically activates the first profile that has a cell count equal to that of the connected battery."
"message": "Automatically activates the first profile that has a cell count equal to that of the connected battery.<br><br><ul><li><b>Switch</b>: Always switch to a profile with matching cell count if there is one.</li><li><b>Disable</b>: Disable auto profile switching</li><b>1S-8S</b>: Select the profile cell count to be used for this profile</li></ul>"
},
"pidTuningCellCountChange": {
"message": "Switch",
"description": "Switch profile if there are no profiles matching cell count"
},
"pidTuningCellCountStay": {
"message": "Disable",
"description": "Disable cell count for this profile"
},
"pidTuningCellCount1S": {
"message": "1S"
},
"pidTuningCellCount2S": {
"message": "2S"
},
"pidTuningCellCount3S": {
"message": "3S"
},
"pidTuningCellCount4S": {
"message": "4S"
},
"pidTuningCellCount5S": {
"message": "5S"
},
"pidTuningCellCount6S": {
"message": "6S"
},
"pidTuningCellCount7S": {
"message": "7S"
},
"pidTuningCellCount8S": {
"message": "8S"
},
"pidTuningNonProfileFilterSettings": {
"message": "Profile independent Filter Settings"
@ -3797,7 +3829,7 @@
},
"pidTuningSlidersExpertSettingsDetectedNote": {
"message": "<strong>Note:</strong> Slider(s) are disabled because current values are outside the Basic Mode adjustment range. Switch to Expert Mode to make changes",
"desciption": "Slider expert settings detected while in non-expert mode"
"description": "Slider expert settings detected while in non-expert mode"
},
"pidTuningSliderLow": {
"message": "Low",

View File

@ -516,7 +516,7 @@ pid_tuning.initialize = function (callback) {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
$('.tab-pid_tuning input[name="motorLimit"]').val(FC.ADVANCED_TUNING.motorOutputLimit);
$('.tab-pid_tuning input[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount);
$('.tab-pid_tuning select[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount);
$('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm).prop('disabled', !FC.MOTOR_CONFIG.use_dshot_telemetry);
if (FC.MOTOR_CONFIG.use_dshot_telemetry) {
@ -1308,7 +1308,7 @@ pid_tuning.initialize = function (callback) {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
FC.FILTER_CONFIG.dyn_notch_max_hz = parseInt($('.pid_filter input[name="dynamicNotchMaxHz"]').val());
FC.ADVANCED_TUNING.motorOutputLimit = parseInt($('.tab-pid_tuning input[name="motorLimit"]').val());
FC.ADVANCED_TUNING.autoProfileCellCount = parseInt($('.tab-pid_tuning input[name="cellCount"]').val());
FC.ADVANCED_TUNING.autoProfileCellCount = parseInt($('.tab-pid_tuning select[name="cellCount"]').val());
FC.ADVANCED_TUNING.idleMinRpm = parseInt($('input[name="idleMinRpm-number"]').val());
const selectedRatesType = $('select[id="ratesType"]').val(); // send analytics for rates type

View File

@ -822,7 +822,20 @@
<table class="compensation">
<tr class="cellCount">
<td><input type="number" name="cellCount" step="1" min="0" max="8"/></td>
<td>
<select name="cellCount">
<option value="-1" i18n="pidTuningCellCountChange"></option>
<option value="0" i18n="pidTuningCellCountStay"></option>
<option value="1" i18n="pidTuningCellCount1S"></option>
<option value="2" i18n="pidTuningCellCount2S"></option>
<option value="3" i18n="pidTuningCellCount3S"></option>
<option value="4" i18n="pidTuningCellCount4S"></option>
<option value="5" i18n="pidTuningCellCount5S"></option>
<option value="6" i18n="pidTuningCellCount6S"></option>
<option value="7" i18n="pidTuningCellCount7S"></option>
<option value="8" i18n="pidTuningCellCount8S"></option>
</select>
</td>
<td colspan="2">
<div>
<label>