mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 01:05:15 +03:00
RFC Dynamic Idle
This commit is contained in:
parent
dd183f0412
commit
319bd852bf
5 changed files with 27 additions and 4 deletions
|
@ -61,6 +61,7 @@ TABS.motors.initialize = function (callback) {
|
|||
}
|
||||
|
||||
MSP.promise(MSPCodes.MSP_STATUS)
|
||||
.then(() => MSP.promise(MSPCodes.MSP_PID_ADVANCED))
|
||||
.then(() => MSP.promise(MSPCodes.MSP_FEATURE_CONFIG))
|
||||
.then(() => MSP.promise(MSPCodes.MSP_MIXER_CONFIG))
|
||||
.then(() => FC.MOTOR_CONFIG.use_dshot_telemetry || FC.MOTOR_CONFIG.use_esc_sensor ? MSP.promise(MSPCodes.MSP_MOTOR_TELEMETRY) : true)
|
||||
|
@ -735,6 +736,16 @@ TABS.motors.initialize = function (callback) {
|
|||
divUnsyncedPWMFreq.toggle(protocolConfigured && !digitalProtocol);
|
||||
|
||||
$('div.digitalIdlePercent').toggle(protocolConfigured && digitalProtocol);
|
||||
|
||||
$('input[name="digitalIdlePercent"]').prop('disabled', protocolConfigured && digitalProtocol && FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry);
|
||||
|
||||
if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) {
|
||||
const dynamicIdle = FC.ADVANCED_TUNING.idleMinRpm * 100;
|
||||
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled', { dynamicIdle }));
|
||||
} else {
|
||||
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercent'));
|
||||
}
|
||||
|
||||
$('.escSensor').toggle(protocolConfigured && digitalProtocol);
|
||||
|
||||
$('div.checkboxDshotBidir').toggle(protocolConfigured && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42) && digitalProtocol);
|
||||
|
|
|
@ -456,7 +456,13 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
||||
$('.pid_tuning input[name="motorLimit"]').val(FC.ADVANCED_TUNING.motorOutputLimit);
|
||||
$('.pid_tuning input[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount);
|
||||
$('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm);
|
||||
$('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm).prop('disabled', !FC.MOTOR_CONFIG.use_dshot_telemetry);
|
||||
|
||||
if (FC.MOTOR_CONFIG.use_dshot_telemetry) {
|
||||
$('span.pidTuningIdleMinRpmDisabled').text(i18n.getMessage('pidTuningIdleMinRpm'));
|
||||
} else {
|
||||
$('span.pidTuningIdleMinRpmDisabled').text(i18n.getMessage('pidTuningIdleMinRpmDisabled'));
|
||||
}
|
||||
} else {
|
||||
$('.motorOutputLimit').hide();
|
||||
$('.idleMinRpm').hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue