1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 01:05:12 +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:
Alberto García Hierro 2018-06-22 10:29:12 +01:00
parent 68f545a5bd
commit f110ea299d
2 changed files with 11 additions and 2 deletions

View file

@ -396,7 +396,16 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
// fill throttle
$('#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);
$('#mincommand').val(MISC.mincommand);