diff --git a/_locales/en/messages.json b/_locales/en/messages.json index eb37aeaa..5133288c 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1143,6 +1143,9 @@ "portsFunction_DJI_FPV": { "message": "DJI FPV VTX" }, + "portsFunction_HDZERO_VTX": { + "message": "HDZero VTX" + }, "portsFunction_IMU2": { "message": "Secondary IMU" }, @@ -3604,9 +3607,6 @@ "platformConfiguration": { "message": "Platform configuration" }, - "platformHasFlaps": { - "message": "Has flaps" - }, "mixerPreset": { "message": "Mixer preset" }, diff --git a/js/data_storage.js b/js/data_storage.js index 5834e52e..3de1a4f2 100755 --- a/js/data_storage.js +++ b/js/data_storage.js @@ -2,7 +2,7 @@ var CONFIGURATOR = { // all versions are specified and compared using semantic versioning http://semver.org/ - 'minfirmwareVersionAccepted': '3.0.0', + 'minfirmwareVersionAccepted': '4.1.0', 'maxFirmwareVersionAccepted': '6.0.0', // Condition is < (lt) so we accept all in 4.x branch 'connectionValid': false, 'connectionValidCliOnly': false, diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 14288aed..b3a978c9 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -13,6 +13,7 @@ helper.defaultsDialog = (function () { let data = [{ "title": 'Mini Quad with 3"-7" propellers', + "id": 2, "notRecommended": false, "reboot": true, "settings": [ @@ -89,6 +90,10 @@ helper.defaultsDialog = (function () { key: "airmode_type", value: "THROTTLE_THRESHOLD" }, + { + key: "airmode_throttle_threshold", + value: 1150 + }, { key: "mc_iterm_relax", value: "RP" @@ -578,6 +583,7 @@ helper.defaultsDialog = (function () { }, { "title": 'Rovers & Boats', + "id": 1, "notRecommended": false, "reboot": true, "settings": [ @@ -641,6 +647,7 @@ helper.defaultsDialog = (function () { }, { "title": 'Keep current settings (Not recommended)', + "id": 0, "notRecommended": true, "reboot": false, "settings": [ @@ -721,6 +728,11 @@ helper.defaultsDialog = (function () { let selectedDefaultPreset = data[$(event.currentTarget).data("index")]; if (selectedDefaultPreset && selectedDefaultPreset.settings) { + if (selectedDefaultPreset.id == 0) { + // Close applying preset dialog if keeping current settings. + savingDefaultsModal.close(); + } + mspHelper.loadBfConfig(function () { privateScope.setFeaturesBits(selectedDefaultPreset) }); diff --git a/js/fc.js b/js/fc.js index 7c95327e..26a638d2 100644 --- a/js/fc.js +++ b/js/fc.js @@ -30,7 +30,7 @@ var CONFIG, MOTOR_DATA, SERVO_DATA, GPS_DATA, - MISSION_PLANER, + MISSION_PLANNER, ANALOG, ARMING_CONFIG, FC_CONFIG, @@ -246,7 +246,7 @@ var FC = { packetCount: 0 }; - /* MISSION_PLANER = { + /* MISSION_PLANNER = { maxWaypoints: 0, isValidMission: 0, countBusyPoints: 0, @@ -262,8 +262,8 @@ var FC = { p3: 0 } }; */ - - MISSION_PLANER = new WaypointCollection(); + + MISSION_PLANNER = new WaypointCollection(); ANALOG = { voltage: 0, @@ -558,7 +558,7 @@ var FC = { OUTPUT_MAPPING = new OutputMappingCollection(); SETTINGS = {}; - + SAFEHOMES = new SafehomeCollection(); }, getOutputUsages: function() { @@ -819,7 +819,7 @@ var FC = { } } }; - } + } }, getServoRates: function () { return { @@ -999,7 +999,7 @@ var FC = { 'RC Channel 8', // 11 'Gimbal Pitch', // 12 'Gimbal Roll', // 13 - 'Flaps', // 14 + 'Flaperon Mode', // 14 'RC Channel 9', // 15 'RC Channel 10', // 16 'RC Channel 11', // 17 @@ -1045,215 +1045,269 @@ var FC = { return { 0: { name: "True", + operandType: "Active", hasOperand: [false, false], output: "boolean" }, 1: { name: "Equal", + operandType: "Comparison", hasOperand: [true, true], output: "boolean" }, 2: { name: "Greater Than", + operandType: "Comparison", hasOperand: [true, true], output: "boolean" }, 3: { name: "Lower Than", + operandType: "Comparison", hasOperand: [true, true], output: "boolean" }, 4: { name: "Low", + operandType: "RC Switch Check", hasOperand: [true, false], output: "boolean" }, 5: { name: "Mid", + operandType: "RC Switch Check", hasOperand: [true, false], output: "boolean" }, 6: { name: "High", + operandType: "RC Switch Check", hasOperand: [true, false], output: "boolean" }, 7: { name: "AND", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 8: { name: "OR", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 9: { name: "XOR", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 10: { name: "NAND", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 11: { name: "NOR", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 12: { name: "NOT", + operandType: "Logic Switches", hasOperand: [true, false], output: "boolean" }, 13: { - name: "STICKY", + name: "Sticky", + operandType: "Logic Switches", hasOperand: [true, true], output: "boolean" }, 14: { - name: "ADD", + name: "Basic: Add", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 15: { - name: "SUB", + name: "Basic: Subtract", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 16: { - name: "MUL", + name: "Basic: Multiply", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 17: { - name: "DIV", + name: "Basic: Divide", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 40: { - name: "MOD", + name: "Modulo", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 18: { - name: "GVAR SET", + name: "Set GVAR", + operandType: "Variables", hasOperand: [true, true], output: "none" }, 19: { - name: "GVAR INC", + name: "Increase GVAR", + operandType: "Variables", hasOperand: [true, true], output: "none" }, 20: { - name: "GVAR DEC", + name: "Decrease GVAR", + operandType: "Variables", hasOperand: [true, true], output: "none" }, 21: { - name: "IO PORT SET", + name: "Set IO Port", + operandType: "Set Flight Parameter", hasOperand: [true, true], output: "none" }, 22: { - name: "OVERRIDE ARMING SAFETY", + name: "Override Arming Safety", + operandType: "Set Flight Parameter", hasOperand: [false, false], output: "boolean" }, 23: { - name: "OVERRIDE THROTTLE SCALE", + name: "Override Throttle Scale", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 29: { - name: "OVERRIDE THROTTLE", + name: "Override Throttle", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 24: { - name: "SWAP ROLL & YAW", + name: "Swap Roll & Yaw", + operandType: "Set Flight Parameter", hasOperand: [false, false], output: "boolean" }, 25: { - name: "SET VTX POWER LEVEL", + name: "Set VTx Power Level", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 30: { - name: "SET VTX BAND", + name: "Set VTx Band", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 31: { - name: "SET VTX CHANNEL", + name: "Set VTx Channel", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 26: { - name: "INVERT ROLL", + name: "Invert Roll", + operandType: "Set Flight Parameter", hasOperand: [false, false], output: "boolean" }, 27: { - name: "INVERT PITCH", + name: "Invert Pitch", + operandType: "Set Flight Parameter", hasOperand: [false, false], output: "boolean" }, 28: { - name: "INVERT YAW", + name: "Invert Yaw", + operandType: "Set Flight Parameter", hasOperand: [false, false], output: "boolean" }, 32: { - name: "SET OSD LAYOUT", + name: "Set OSD Layout", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 33: { - name: "SIN", + name: "Trigonometry: Sine", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 34: { - name: "COS", + name: "Trigonometry: Cosine", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 35: { - name: "TAN", + name: "Trigonometry: Tangent", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 36: { - name: "MAP INPUT", + name: "Map Input", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 37: { - name: "MAP OUTPUT", + name: "Map Output", + operandType: "Maths", hasOperand: [true, true], output: "raw" }, 38: { - name: "RC CHANNEL OVERRIDE", + name: "Override RC Channel", + operandType: "Set Flight Parameter", hasOperand: [true, true], output: "boolean" }, 41: { - name: "LOITER RADIUS OVERRIDE", + name: "Override Loiter Radius", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, 42: { - name: "SET PROFILE", + name: "Set Profile", + operandType: "Set Flight Parameter", hasOperand: [true, false], output: "boolean" }, + 43: { + name: "Use Lowest Value", + operandType: "Comparison", + hasOperand: [true, true], + output: "raw" + }, + 44: { + name: "Use Highest Value", + operandType: "Comparison", + hasOperand: [true, true], + output: "raw" + }, } }, getOperandTypes: function () { @@ -1314,6 +1368,7 @@ var FC = { 34: "GPS Valid Fix", 35: "Loiter Radius [cm]", 36: "Active Profile", + 37: "Battery cells", } }, 3: { diff --git a/js/logicCondition.js b/js/logicCondition.js index 1db77def..e5a5de3e 100644 --- a/js/logicCondition.js +++ b/js/logicCondition.js @@ -256,16 +256,55 @@ let LogicCondition = function (enabled, activatorId, operation, operandAType, op $row.find('.logic_cell__operation').html(""); let $t = $row.find('.logic_element__operation'); - for (let k in FC.getLogicOperators()) { - if (FC.getLogicOperators().hasOwnProperty(k)) { - let o = FC.getLogicOperators()[k]; - if (self.getOperation() == parseInt(k, 10)) { - $t.append(''); - } else { - $t.append(''); - } + let lcOperators = []; + + for (let lcID in FC.getLogicOperators()) { + if (FC.getLogicOperators().hasOwnProperty(lcID)) { + let op = FC.getLogicOperators()[lcID]; + lcOperators[parseInt(lcID, 10)] = { + id: parseInt(lcID, 10), + name: op.name, + operandType: op.operandType, + hasOperand: op.hasOperand, + output: op.output + }; } } + + lcOperators.sort((a, b) => { + let lcAT = a.operandType.toLowerCase(), + lcBT = b.operandType.toLowerCase(), + lcAN = a.name.toLowerCase(), + lcBN = b.name.toLowerCase(); + + if (lcAT == lcBT) { + return (lcAN < lcBN) ? -1 : (lcAN > lcBN) ? 1 : 0; + } else { + return (lcAT < lcBT) ? -1 : 1; + } + }); + + let section = ""; + + lcOperators.forEach( val => { + if (section != val.operandType) { + if (section != "") { + $t.append(''); + } + + section = val.operandType; + $t.append(''); + } + + if (self.getOperation() == val.id) { + $t.append(''); + } else { + $t.append(''); + } + }); + + $t.append(''); + $t.change(self.onOperatorChange); self.renderOperand(0); diff --git a/js/model.js b/js/model.js index 330bd8fd..273de731 100644 --- a/js/model.js +++ b/js/model.js @@ -2,10 +2,12 @@ const SERVO_GIMBAL_PITCH = 0, SERVO_GIMBAL_ROLL = 1, - SERVO_ELEVATOR = 2, - SERVO_FLAPPERON_1 = 3, - SERVO_FLAPPERON_2 = 4, - SERVO_RUDDER = 5, + SERVO_ELEVATOR = 1, + SERVO_ELEVON_1 = 1, + SERVO_ELEVON_2 = 2, + SERVO_FLAPPERON_1 = 2, + SERVO_FLAPPERON_2 = 3, + SERVO_RUDDER = 4, SERVO_BICOPTER_LEFT = 4, SERVO_BICOPTER_RIGHT = 5, SERVO_DUALCOPTER_LEFT = 4, @@ -162,10 +164,10 @@ const mixerList = [ new MotorMixRule(1.0, 0.0, 0.0, 0.0), ], servoMixer: [ - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_ROLL, 50, 0), - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_PITCH, 50, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_ROLL, -50, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(SERVO_ELEVON_1, INPUT_STABILIZED_ROLL, 50, 0), + new ServoMixRule(SERVO_ELEVON_1, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(SERVO_ELEVON_2, INPUT_STABILIZED_ROLL, -50, 0), + new ServoMixRule(SERVO_ELEVON_2, INPUT_STABILIZED_PITCH, 50, 0), ] }, // 8 { @@ -181,10 +183,10 @@ const mixerList = [ new MotorMixRule(1.0, 0.0, 0.0, -0.1) ], servoMixer: [ - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_ROLL, 50, 0), - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_PITCH, 50, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_ROLL, -50, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(SERVO_ELEVON_1, INPUT_STABILIZED_ROLL, 50, 0), + new ServoMixRule(SERVO_ELEVON_1, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(SERVO_ELEVON_2, INPUT_STABILIZED_ROLL, -50, 0), + new ServoMixRule(SERVO_ELEVON_2, INPUT_STABILIZED_PITCH, 50, 0), ] }, // 27 { @@ -289,6 +291,7 @@ const mixerList = [ enabled: true, legacy: true, platform: PLATFORM_AIRPLANE, + hasFlaps: true, motorMixer: [ new MotorMixRule(1.0, 0.0, 0.0, 0.0), new MotorMixRule(1.0, 0.0, 0.0, 0.0), @@ -296,9 +299,9 @@ const mixerList = [ servoMixer: [ new ServoMixRule(SERVO_ELEVATOR, INPUT_STABILIZED_PITCH, 100, 0), new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_FEATURE_FLAPS, 100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_1, INPUT_FEATURE_FLAPS, 100, 0),*/ new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_FEATURE_FLAPS, -100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_2, INPUT_FEATURE_FLAPS, -100, 0),*/ new ServoMixRule(SERVO_RUDDER, INPUT_STABILIZED_YAW, 100, 0), ] }, // 14 @@ -448,6 +451,7 @@ const mixerList = [ enabled: true, legacy: false, platform: PLATFORM_AIRPLANE, + hasFlaps: true, motorMixer: [ new MotorMixRule(1.0, 0.0, 0.0, 0.3), new MotorMixRule(1.0, 0.0, 0.0, -0.3) @@ -455,9 +459,9 @@ const mixerList = [ servoMixer: [ new ServoMixRule(SERVO_ELEVATOR, INPUT_STABILIZED_PITCH, 100, 0), new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(SERVO_FLAPPERON_1, INPUT_FEATURE_FLAPS, 100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_1, INPUT_FEATURE_FLAPS, 100, 0),*/ new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(SERVO_FLAPPERON_2, INPUT_FEATURE_FLAPS, -100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_2, INPUT_FEATURE_FLAPS, -100, 0),*/ new ServoMixRule(SERVO_RUDDER, INPUT_STABILIZED_YAW, 100, 0), ] }, @@ -469,16 +473,19 @@ const mixerList = [ enabled: true, legacy: false, platform: PLATFORM_AIRPLANE, + hasFlaps: true, motorMixer: [ new MotorMixRule(1.0, 0.0, 0.0, 0.0), ], servoMixer: [ + new ServoMixRule(1, INPUT_STABILIZED_ROLL, 100, 0), + /*new ServoMixRule(1, INPUT_FEATURE_FLAPS, 100, 0),*/ new ServoMixRule(2, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(3, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(4, INPUT_STABILIZED_PITCH, 50, 0), - new ServoMixRule(4, INPUT_STABILIZED_YAW, -50, 0), - new ServoMixRule(5, INPUT_STABILIZED_PITCH, -50, 0), - new ServoMixRule(5, INPUT_STABILIZED_YAW, -50, 0) + /*new ServoMixRule(2, INPUT_FEATURE_FLAPS, 100, 0),*/ + new ServoMixRule(3, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(3, INPUT_STABILIZED_YAW, -50, 0), + new ServoMixRule(4, INPUT_STABILIZED_PITCH, -50, 0), + new ServoMixRule(4, INPUT_STABILIZED_YAW, -50, 0) ] }, { @@ -493,11 +500,11 @@ const mixerList = [ new MotorMixRule(1.0, 0.0, 0.0, 0.0), ], servoMixer: [ - new ServoMixRule(2, INPUT_STABILIZED_ROLL, 100, 0), - new ServoMixRule(3, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(1, INPUT_STABILIZED_ROLL, 100, 0), + new ServoMixRule(2, INPUT_STABILIZED_PITCH, 50, 0), + new ServoMixRule(2, INPUT_STABILIZED_YAW, -50, 0), + new ServoMixRule(3, INPUT_STABILIZED_PITCH, -50, 0), new ServoMixRule(3, INPUT_STABILIZED_YAW, -50, 0), - new ServoMixRule(4, INPUT_STABILIZED_PITCH, -50, 0), - new ServoMixRule(4, INPUT_STABILIZED_YAW, -50, 0), ] }, { @@ -508,13 +515,16 @@ const mixerList = [ enabled: true, legacy: false, platform: PLATFORM_AIRPLANE, + hasFlaps: true, motorMixer: [ new MotorMixRule(1.0, 0.0, 0.0, 0.0), ], servoMixer: [ new ServoMixRule(SERVO_ELEVATOR, INPUT_STABILIZED_PITCH, 100, 0), new ServoMixRule(SERVO_FLAPPERON_1, INPUT_STABILIZED_ROLL, 100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_1, INPUT_FEATURE_FLAPS, 100, 0),*/ new ServoMixRule(SERVO_FLAPPERON_2, INPUT_STABILIZED_ROLL, 100, 0), + /*new ServoMixRule(SERVO_FLAPPERON_2, INPUT_FEATURE_FLAPS, 100, 0),*/ ] }, { diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 00e4000e..c1a11975 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -44,6 +44,7 @@ var mspHelper = (function (gui) { 'DJI_FPV': 21, 'SMARTPORT_MASTER': 23, 'IMU2': 24, + 'HDZERO_VTX': 25, }; // Required for MSP_DEBUGMSG because console.log() doesn't allow omitting @@ -447,7 +448,7 @@ var mspHelper = (function (gui) { } break; case MSPCodes.MSP_WP: - MISSION_PLANER.put(new Waypoint( + MISSION_PLANNER.put(new Waypoint( data.getUint8(0), data.getUint8(1), data.getInt32(2, true), @@ -1422,9 +1423,9 @@ var mspHelper = (function (gui) { break; case MSPCodes.MSP_WP_GETINFO: // Reserved for waypoint capabilities data.getUint8(0); - MISSION_PLANER.setMaxWaypoints(data.getUint8(1)); - MISSION_PLANER.setValidMission(data.getUint8(2)); - MISSION_PLANER.setCountBusyPoints(data.getUint8(3)); + MISSION_PLANNER.setMaxWaypoints(data.getUint8(1)); + MISSION_PLANNER.setValidMission(data.getUint8(2)); + MISSION_PLANNER.setCountBusyPoints(data.getUint8(3)); break; case MSPCodes.MSP_SET_WP: console.log('Point saved'); @@ -2988,14 +2989,14 @@ var mspHelper = (function (gui) { }; self.loadWaypoints = function (callback) { - MISSION_PLANER.reinit(); + MISSION_PLANNER.reinit(); let waypointId = 0; let startTime = new Date().getTime(); MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, loadWaypoint); function loadWaypoint() { waypointId++; - if (waypointId < MISSION_PLANER.getCountBusyPoints()) { + if (waypointId < MISSION_PLANNER.getCountBusyPoints()) { MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, loadWaypoint); } else { GUI.log('Receive time: ' + (new Date().getTime() - startTime) + 'ms'); @@ -3011,11 +3012,11 @@ var mspHelper = (function (gui) { function sendWaypoint() { waypointId++; - if (waypointId < MISSION_PLANER.get().length) { - MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, sendWaypoint); + if (waypointId < MISSION_PLANNER.get().length) { + MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANNER.extractBuffer(waypointId), false, sendWaypoint); } else { - MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, endMission); + MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANNER.extractBuffer(waypointId), false, endMission); } }; diff --git a/js/settings.js b/js/settings.js index 41250caf..76049865 100644 --- a/js/settings.js +++ b/js/settings.js @@ -72,6 +72,14 @@ var Settings = (function () { var multiplier = parseFloat(input.data('setting-multiplier') || 1); input.attr('type', 'number'); input.val((s.value / multiplier).toFixed(Math.log10(multiplier))); + + if (typeof s.setting.min !== 'undefined' && s.setting.min !== null) { + input.attr('min', (s.setting.min / multiplier).toFixed(Math.log10(multiplier))); + } + + if (typeof s.setting.max !== 'undefined' && s.setting.max !== null) { + input.attr('max', (s.setting.max / multiplier).toFixed(Math.log10(multiplier))); + } } // If data is defined, We want to convert this value into diff --git a/src/css/tabs/mission_planer.css b/src/css/tabs/mission_planer.css index 344dcf84..563b0d89 100644 --- a/src/css/tabs/mission_planer.css +++ b/src/css/tabs/mission_planer.css @@ -203,7 +203,7 @@ height: 100%; } -/* #missionPlanerElevation { +/* #missionPlannerElevation { height: 40%; } */ diff --git a/src/css/tabs/mixer.css b/src/css/tabs/mixer.css index 3d99dba0..08e01e7b 100644 --- a/src/css/tabs/mixer.css +++ b/src/css/tabs/mixer.css @@ -84,6 +84,12 @@ } .mixer_btn_add { + float: right; + margin: 15px 0 10px; +} + +.mixer_btn_logic { + float: left; margin: 15px 0 10px; } diff --git a/src/css/tabs/osd.css b/src/css/tabs/osd.css index 18d98c82..225b4fb2 100644 --- a/src/css/tabs/osd.css +++ b/src/css/tabs/osd.css @@ -415,8 +415,42 @@ button { border-bottom: 0; } +.tab-osd .third_left { + float: left; + width: calc(50% - 197px); +} + +.tab-osd .third_right { + float: right; + width: calc(50% - 197px); +} + .tab-osd .preview { width: 360px; + left: calc(50% - 197px); +} + +.tab-osd .preview_hd { + width: 600px !important; + left: calc(50% - 317px) !important; +} + +.tab-osd .hd_43_left { + border-left: 1px solid red; + position: absolute; + left: 60px; + height: calc(100% - 27px); +} + +.tab-osd .hd_43_right { + border-right: 1px solid red; + position: absolute; + right: 60px; + height: calc(100% - 27px); +} + +.tab-osd .preview_hd_side { + width: calc(50% - 317px) !important; } .tab-osd .preview { diff --git a/tabs/auxiliary.js b/tabs/auxiliary.js index 6ccc45cf..593912f2 100644 --- a/tabs/auxiliary.js +++ b/tabs/auxiliary.js @@ -36,32 +36,19 @@ TABS.auxiliary.initialize = function (callback) { MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false, get_mode_ranges); + // This object separates out the dividers. This is also used to order the modes const modeSections = {}; - modeSections["ARM"] = "Arming"; - modeSections["ANGLE"] = "Flight Modes"; - modeSections["NAV RTH"] = "Navigation Modes"; - modeSections["NAV ALTHOLD"] = "Flight Mode Modifiers"; - modeSections["AUTO TUNE"] = "Fixed Wing"; - modeSections["FPV ANGLE MIX"] = "Multi-rotor"; - modeSections["OSD OFF"] = "OSD Modes"; - modeSections["CAMSTAB"] = "FPV Camera Modes"; - modeSections["BEEPER"] = "Misc Modes"; + modeSections["Arming"] = ["ARM", "PREARM"]; + modeSections["Flight Modes"] = ["ANGLE", "HORIZON", "MANUAL"]; + 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["Fixed Wing"] = ["AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", "TURN ASSIST"]; + 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["FPV Camera Modes"] = ["CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3"]; + modeSections["Misc Modes"] = ["BEEPER", "LEDS OFF", "LIGHTS", "HOME RESET", "WP PLANNER", "BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2"]; function sort_modes_for_display() { - // This array defines the order that the modes are displayed in the configurator modes page - const configuratorBoxOrder = [ - "ARM", "PREARM", // Arming - "ANGLE", "HORIZON", "MANUAL", // Flight modes - "NAV RTH", "NAV COURSE HOLD", "NAV CRUISE", "NAV POSHOLD", "NAV WP", "GCS NAV", // Navigation modes - "NAV ALTHOLD", "HEADING HOLD", "AIR MODE", "SOARING", "SURFACE", // Flight mode modifiers - "AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", "TURN ASSIST", // Fixed wing specific - "FPV ANGLE MIX", "TURTLE", "MC BRAKING", "HEADFREE", "HEADADJ", // Multi-rotor specific - "OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3", // OSD - "CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3", // FPV Camera - "BEEPER", "LEDS OFF", "LIGHTS", "HOME RESET", "WP PLANNER", "BLACKBOX", "FAILSAFE", "KILLSWITCH", // Misc - "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2" - ]; - // Sort the modes var tmpAUX_CONFIG = []; var tmpAUX_CONFIG_IDS =[]; @@ -76,19 +63,22 @@ TABS.auxiliary.initialize = function (callback) { AUX_CONFIG = []; AUX_CONFIG_IDS = []; - for (i=0; i AUX_CONFIG.length) { for (i=0; i
-
Mission planer
+
Mission planner
-
+
Action Menu
@@ -38,7 +38,7 @@
-
+
Total information
@@ -65,7 +65,7 @@
-