Merge pull request #1050 from iNavFlight/dzikuvx-motor-idle-0

Motor IDLE and reversible motors improvements
pull/1051/head
Paweł Spychalski 4 years ago committed by GitHub
commit efb0e7590c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3313,6 +3313,9 @@
"motorStopWarning": {
"message": "Should be enabled on Airplanes, Rovers and Boats. Should not be enabled on Multirotors! On Multirotors, when Airmode is active, motors will not stop."
},
"reversibleEscWarning": {
"message": "When Reversible Motors are used, set Motors IDLE power ot 0%"
},
"dynamic_gyro_notch_enabled_help": {
"message": "Matrix Gyro Filter is the new generation of dynamic gyro notches available in INAV. It is recommended to enable it on all Multirotor builds on F4 and F7 flight controllers."
},

@ -67,6 +67,13 @@
<span data-i18n="motor_poles"></span>
</label>
</div>
<div id="reversible-esc-info" data-i18n="reversibleEscWarning" class="info-box"></div>
<div class="checkbox">
<input type="checkbox" data-bit="12" class="feature toggle" name="REVERSIBLE_MOTORS" title="REVERSIBLE_MOTORS" id="feature-12">
<label for="feature-12">
<span data-i18n="featureREVERSIBLE_MOTORS"></span>
</label>
</div>
</div>
</div>
<div class="gui_box grey">

@ -96,8 +96,9 @@ TABS.outputs.initialize = function (callback) {
let escProtocols = FC.getEscProtocols(),
servoRates = FC.getServoRates(),
$idlePercent = $('#throttle_idle'),
$idleInfoBox = $("#throttle_idle-info");
$motorStopWarningBox = $("#motor-stop-warning");
$idleInfoBox = $("#throttle_idle-info"),
$motorStopWarningBox = $("#motor-stop-warning"),
$reversibleMotorBox = $("#reversible-esc-info")
function buildMotorRates() {
var protocolData = escProtocols[ADVANCED_CONFIG.motorPwmProtocol];
@ -195,6 +196,21 @@ TABS.outputs.initialize = function (callback) {
helper.features.updateUI($('.tab-motors'), BF_CONFIG.features);
GUI.simpleBind();
let $reversibleMotorCheckbox = $('#feature-12');
function showHideReversibleMotorInfo() {
const reversibleMotorEnabled = $reversibleMotorCheckbox.is(':checked');
console.log(reversibleMotorEnabled);
if (reversibleMotorEnabled) {
$reversibleMotorBox.show();
} else {
$reversibleMotorBox.hide();
}
}
$reversibleMotorCheckbox.change(showHideReversibleMotorInfo);
showHideReversibleMotorInfo();
let $motorStopCheckbox = $('#feature-4');
function showHideMotorStopWarning() {
const platformNeedsMotorStop = [PLATFORM_AIRPLANE, PLATFORM_ROVER, PLATFORM_BOAT].includes(MIXER_CONFIG.platformType);

Loading…
Cancel
Save