1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 22:35:15 +03:00

Fixes to the modes page

- Moved to turn assist in to **flight mode modifiers** section. As it applies to fixed wing and multirotors.
- Re-established name changes for `CAMERA CONTROL` 1 to 3 when a RunCam Device is used.
This commit is contained in:
Darren Lines 2022-07-03 13:53:48 +01:00
parent c5d0da5134
commit d81a992dc2
3 changed files with 14 additions and 8 deletions

View file

@ -25,8 +25,7 @@ function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) {
default: default:
return defaultName; return defaultName;
} }
} }
return defaultName;
return defaultName;
} }

View file

@ -81,18 +81,22 @@
background-color: #e4e4e4; background-color: #e4e4e4;
border-bottom: 5px solid white; border-bottom: 5px solid white;
color: grey; color: grey;
min-width: 100px; height: 85px;
width: 130px;
padding: 0px 5px;
} }
.tab-auxiliary .mode .info .name { .tab-auxiliary .mode .info .name {
font-weight: bold; font-weight: bold;
font-size: 1.0em; font-size: 1.0em;
padding-bottom: 5px;
} }
.tab-auxiliary .mode .info .buttons { .tab-auxiliary .mode .info .buttons {
position: absolute; position: absolute;
bottom: 14px; bottom: 14px;
width: 100%; width: 100%;
margin-left:-5px;
} }
.tab-auxiliary .mode .info .buttons a { .tab-auxiliary .mode .info .buttons a {

View file

@ -18,7 +18,11 @@ TABS.auxiliary.initialize = function (callback) {
} }
function get_rc_data() { function get_rc_data() {
MSP.send_message(MSPCodes.MSP_RC, false, false, load_html); MSP.send_message(MSPCodes.MSP_RC, false, false, get_ports_data);
}
function get_ports_data() {
MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, load_html);
} }
function load_html() { function load_html() {
@ -33,8 +37,8 @@ TABS.auxiliary.initialize = function (callback) {
modeSections["Arming"] = ["ARM", "PREARM"]; modeSections["Arming"] = ["ARM", "PREARM"];
modeSections["Flight Modes"] = ["ANGLE", "HORIZON", "MANUAL"]; modeSections["Flight Modes"] = ["ANGLE", "HORIZON", "MANUAL"];
modeSections["Navigation Modes"] = ["NAV COURSE HOLD", "NAV CRUISE", "NAV POSHOLD", "NAV RTH", "NAV WP", "GCS NAV"]; modeSections["Navigation Modes"] = ["NAV COURSE HOLD", "NAV CRUISE", "NAV POSHOLD", "NAV RTH", "NAV WP", "GCS NAV"];
modeSections["Flight Mode Modifiers"] = ["NAV ALTHOLD", "HEADING HOLD", "AIR MODE", "SOARING", "SURFACE"]; modeSections["Flight Mode Modifiers"] = ["NAV ALTHOLD", "HEADING HOLD", "AIR MODE", "SOARING", "SURFACE", "TURN ASSIST"];
modeSections["Fixed Wing"] = ["AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", "TURN ASSIST"]; modeSections["Fixed Wing"] = ["AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON"];
modeSections["Multi-rotor"] = ["FPV ANGLE MIX", "TURTLE", "MC BRAKING", "HEADFREE", "HEADADJ"]; modeSections["Multi-rotor"] = ["FPV ANGLE MIX", "TURTLE", "MC BRAKING", "HEADFREE", "HEADADJ"];
modeSections["OSD Modes"] = ["OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3"]; modeSections["OSD Modes"] = ["OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3"];
modeSections["FPV Camera Modes"] = ["CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3"]; modeSections["FPV Camera Modes"] = ["CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3"];
@ -201,7 +205,6 @@ TABS.auxiliary.initialize = function (callback) {
let modeSelectionRange = ""; let modeSelectionRange = "";
for (var modeIndex = 0; modeIndex < AUX_CONFIG.length; modeIndex++) { for (var modeIndex = 0; modeIndex < AUX_CONFIG.length; modeIndex++) {
// Get current mode category // Get current mode category
for (modeSelectionRange in modeSections) { for (modeSelectionRange in modeSections) {
if (modeSections[modeSelectionRange].indexOf(AUX_CONFIG[modeIndex]) != -1) { if (modeSections[modeSelectionRange].indexOf(AUX_CONFIG[modeIndex]) != -1) {