1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 14:25:13 +03:00

Change POSHOLD to LOITER on fixed wing

This commit is contained in:
Darren Lines 2022-08-13 05:43:09 +01:00
parent f76e5afd20
commit 57cff5ccfe
2 changed files with 8 additions and 1 deletions

View file

@ -16,6 +16,11 @@ function isPeripheralSelected(peripheralName) {
function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) {
if (isPeripheralSelected("RUNCAM_DEVICE_CONTROL")) {
switch (modeId) {
case 11: // NAV POSHOLD
if (FC.isAirplane()) {
return "LOITER";
}
break;
case 39: // BOXCAMERA1
return "CAMERA WI-FI";
case 40: // BOXCAMERA2

View file

@ -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);