Moved to Pid Tuning tab

10.7.0-preview
Asizon 2020-03-05 17:33:38 +01:00
parent 6aaababb1d
commit b7f9f2d8c0
5 changed files with 23 additions and 44 deletions

View File

@ -1227,12 +1227,6 @@
"configurationDigitalIdlePercentHelp": {
"message": "This is the 'idle' value in percent of maximum throttle that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Increase the percent value to gain more idle speed."
},
"configurationIdleMinRpm": {
"message": "Dynamic Idle Value [rpm]"
},
"configurationIdleMinRpmHelp": {
"message": "PIDPROFILE Value, visit this <a href=\"https://github.com/betaflight/betaflight/wiki/Tuning-Dynamic-Idle\"target=\"_blank\">page</a> "
},
"configurationMotorPoles": {
"message": "Motor poles",
"description": "One of the fields of the ESC/Motor configuration"
@ -3617,6 +3611,12 @@
"pidTuningThrottleBoostHelp": {
"message": "This feature allows throttle to be temporarily boosted on quick stick movements, which increases acceleration torque to the motors, providing a much faster throttle response."
},
"pidTuningIdleMinRpm": {
"message": "Dynamic Idle Value [rpm]"
},
"pidTuningIdleMinRpmHelp": {
"message": "Set this parameter to provide an rpm based floor-value as a safety net against motor desync.<br>A racer might prefer very good response and low rates - therefore a low idle_min_rpm and a high dshot_idle_value may be useful. Freestylers and LOS pilots will appreciate very low thrust at idle and might want to use less dshot_idle_value while using a bit more idle_min_rpm to avoid desyncs at high rates.<br><br>Visit this <a href=\"https://github.com/betaflight/betaflight/wiki/Tuning-Dynamic-Idle\"target=\"_blank\">wiki</a> entrie for more info."
},
"pidTuningAcroTrainerAngleLimit": {
"message": "Acro Trainer Angle Limit"
},

View File

@ -181,22 +181,13 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
function load_rx_config() {
var next_callback = load_profile_features;
var next_callback = load_html;
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
MSP.send_message(MSPCodes.MSP_RX_CONFIG, false, false, next_callback);
} else {
next_callback();
}
}
function load_profile_features() {
var next_callback = load_html;
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
MSP.send_message(MSPCodes.MSP_PID_ADVANCED, false, false, next_callback);
} else {
next_callback();
}
}
function load_html() {
$('#content').load("./tabs/configuration.html", process_html);
@ -525,14 +516,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('input[name="motorPoles"]').val(MOTOR_CONFIG.motor_poles);
}
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
$('input[name="idleMinRpm"]').val(ADVANCED_TUNING.idleMinRpm);
}
function hideRpmFeatures() {
let rpmFeaturesVisible = $("input[id='dshotBidir']").is(':checked') || $("input[name='ESC_SENSOR']").is(':checked');
$('div.motorPoles').toggle(rpmFeaturesVisible);
$('div.idleMinRpm').toggle(rpmFeaturesVisible);
}
$('#escProtocolTooltip').toggle(semver.lt(CONFIG.apiVersion, "1.42.0"));
@ -562,7 +548,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('div.checkboxDshotBidir').toggle(semver.gte(CONFIG.apiVersion, "1.42.0") && digitalProtocol);
$('div.motorPoles').toggle(semver.gte(CONFIG.apiVersion, "1.42.0"));
$('div.idleMinRpm').toggle(semver.gte(CONFIG.apiVersion, "1.43.0"));
//trigger change dshotBidir and ESC_SENSOR to show/hide Motor Poles tab
$("input[id='dshotBidir']").change(hideRpmFeatures).change();
$("input[name='ESC_SENSOR']").change(hideRpmFeatures);
@ -1182,9 +1167,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
if(semver.gte(CONFIG.apiVersion, "1.42.0")) {
MOTOR_CONFIG.motor_poles = parseInt($('input[name="motorPoles"]').val());
}
if(semver.gte(CONFIG.apiVersion, "1.43.0")) {
ADVANCED_TUNING.idleMinRpm = parseInt($('input[name="idleMinRpm"]').val());
}
if(self.SHOW_OLD_BATTERY_CONFIG) {
MISC.vbatmincellvoltage = parseFloat($('input[name="mincellvoltage"]').val());
@ -1361,22 +1343,13 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
function save_rx_config() {
var next_callback = save_profile_features;
var next_callback = save_to_eeprom;
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
MSP.send_message(MSPCodes.MSP_SET_RX_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_RX_CONFIG), false, next_callback);
} else {
next_callback();
}
}
function save_profile_features() {
var next_callback = save_to_eeprom;
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
MSP.send_message(MSPCodes.MSP_SET_PID_ADVANCED, mspHelper.crunch(MSPCodes.MSP_SET_PID_ADVANCED), false, next_callback);
} else {
next_callback();
}
}
function save_to_eeprom() {
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, reboot);

View File

@ -393,8 +393,10 @@ TABS.pid_tuning.initialize = function (callback) {
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);
$('input[name="idleMinRpm-number"]').val(ADVANCED_TUNING.idleMinRpm);
} else {
$('.motorOutputLimit').hide();
$('.idleMinRpm').hide();
}
$('input[id="useIntegratedYaw"]').change(function() {
@ -776,6 +778,7 @@ TABS.pid_tuning.initialize = function (callback) {
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());
ADVANCED_TUNING.idleMinRpm = parseInt($('input[name="idleMinRpm-number"]').val());
}
}

View File

@ -209,15 +209,6 @@
</label>
<div class="helpicon cf_tip" i18n_title="configurationDigitalIdlePercentHelp"></div>
</div>
<div class="number idleMinRpm">
<label>
<div class="numberspacer">
<input type="number" name="idleMinRpm" min="0" max="100" step="1"/>
</div>
<span i18n="configurationIdleMinRpm"></span>
</label>
<div class="helpicon cf_tip" i18n_title="configurationIdleMinRpmHelp"></div>
</div>
<div class="number minthrottle">
<label>
<div class="numberspacer">

View File

@ -499,6 +499,18 @@
</td>
</tr>
<tr class="idleMinRpm">
<td><input type="number" name="idleMinRpm-number" step="1" min="0" max="100"/></td>
<td colspan="1">
<div>
<label>
<span i18n="pidTuningIdleMinRpm"></span>
</label>
<div class="helpicon cf_tip" i18n_title="pidTuningIdleMinRpmHelp"></div>
</div>
</td>
</tr>
<tr class="absoluteControlGain">
<td><input type="number" name="absoluteControlGain-number" step="1" min="0" max="20"/></td>
<td colspan="1">