mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 01:35:23 +03:00
Hide midrc input box in INAV 2.0
midrc was removed in 2.0, although the MSP message format was kept for backwards compatibility. Hence, we just hide the field on INAV >= 2.0.
This commit is contained in:
parent
68f545a5bd
commit
f110ea299d
2 changed files with 11 additions and 2 deletions
|
@ -329,7 +329,7 @@
|
||||||
<span data-i18n="configurationThrottleMinimum"></span>
|
<span data-i18n="configurationThrottleMinimum"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number midthrottle_wrapper">
|
||||||
<input type="number" id="midthrottle" name="midthrottle" min="1200" max="1700" />
|
<input type="number" id="midthrottle" name="midthrottle" min="1200" max="1700" />
|
||||||
<label for="midthrottle">
|
<label for="midthrottle">
|
||||||
<span data-i18n="configurationThrottleMid"></span>
|
<span data-i18n="configurationThrottleMid"></span>
|
||||||
|
|
|
@ -396,7 +396,16 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
// fill throttle
|
// fill throttle
|
||||||
$('#minthrottle').val(MISC.minthrottle);
|
$('#minthrottle').val(MISC.minthrottle);
|
||||||
$('#midthrottle').val(MISC.midrc);
|
// midrc was removed in 2.0, but the firmware still excepts
|
||||||
|
// the MSP frame with it for backwards compatibility, so we
|
||||||
|
// just hide it from the UI.
|
||||||
|
var midThrottleWrapper = $('.midthrottle_wrapper');
|
||||||
|
if (semver.lt(CONFIG.flightControllerVersion, '2.0.0')) {
|
||||||
|
$('#midthrottle').val(MISC.midrc);
|
||||||
|
midThrottleWrapper.show();
|
||||||
|
} else {
|
||||||
|
midThrottleWrapper.hide();
|
||||||
|
}
|
||||||
$('#maxthrottle').val(MISC.maxthrottle);
|
$('#maxthrottle').val(MISC.maxthrottle);
|
||||||
$('#mincommand').val(MISC.mincommand);
|
$('#mincommand').val(MISC.mincommand);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue