diff options
author | Paweł Spychalski <pspychalski@gmail.com> | 2022-08-15 11:45:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 11:45:14 +0300 |
commit | 8ee0836f2ba2c21c470e382d79df330a34f12650 (patch) | |
tree | 006faf021bca05b2e00886e3e1fc36387b56243c | |
parent | f76e5afd20239ffb8de75d3de022771a6d375138 (diff) | |
parent | e75204c96d941aaf07733477ab9c8152ba2cb0c9 (diff) |
Merge pull request #1601 from iNavFlight/MrD_Change-POSHOLD-text-to-LOITER-on-fixed-wing-platforms
Change NAV POSHOLD mode text to NAV LOITER on fixed wing platforms
-rw-r--r-- | js/peripherals.js | 13 | ||||
-rw-r--r-- | tabs/auxiliary.js | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/js/peripherals.js b/js/peripherals.js index 2c340fb5..75eb3038 100644 --- a/js/peripherals.js +++ b/js/peripherals.js @@ -23,10 +23,15 @@ function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) { case 41: // BOXCAMERA3 return "CAMERA CHANGE MODE"; default: - return defaultName; + break; } - } - - return defaultName; + } + if (modeId === 11) { + if (FC.isAirplane()) { + return "NAV LOITER"; + } + } + + return defaultName; }
\ No newline at end of file diff --git a/tabs/auxiliary.js b/tabs/auxiliary.js index 55dbe25f..f33f20d2 100644 --- a/tabs/auxiliary.js +++ b/tabs/auxiliary.js @@ -103,7 +103,9 @@ TABS.auxiliary.initialize = function (callback) { var modeTemplate = $('#tab-auxiliary-templates .mode'); var newMode = modeTemplate.clone(); var modeName = AUX_CONFIG[modeIndex]; - // if user choose the runcam split at peripheral column, then adjust the boxname(BOXCAMERA1, BOXCAMERA2, BOXCAMERA3) + + // If the runcam split peripheral is used, then adjust the boxname(BOXCAMERA1, BOXCAMERA2, BOXCAMERA3) + // If platform is fixed wing, rename POS HOLD to LOITER modeName = adjustBoxNameIfPeripheralWithModeID(modeId, modeName); $(newMode).attr('id', 'mode-' + modeIndex); |