diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2789c245..3bfd2856 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1166,8 +1166,8 @@ "portsFunction_DJI_FPV": { "message": "DJI FPV VTX" }, - "portsFunction_HDZERO_VTX": { - "message": "HDZero VTX" + "portsFunction_MSP_DISPLAYPORT": { + "message": "MSP Displayport" }, "portsFunction_IMU2": { "message": "Secondary IMU" @@ -1745,6 +1745,9 @@ "adjustmentsFunction58": { "message": "Fixed Wing Level Trim" }, + "adjustmentsFunction59": { + "message": "Multi Mission Index Adjustment" + }, "adjustmentsSave": { "message": "Save" }, @@ -2176,6 +2179,9 @@ "firmwareFlasherOptionLabelSelectFirmwareVersionFor": { "message": "Choose a Firmware version for" }, + "firmwareFlasherButtonAutoSelect": { + "message": "Auto-select Target" + }, "firmwareFlasherButtonLoadLocal": { "message": "Load Firmware [Local]" }, @@ -2210,7 +2216,7 @@ "message": "Warning" }, "firmwareFlasherWarningText": { - "message": "Please do not try to flash non-iNAV hardware with this firmware flasher.
Do not disconnect the board or turn off your computer while flashing.

Note: STM32 bootloader is stored in ROM, it cannot be bricked.
Note: Auto-Connect is always disabled while you are inside firmware flasher.
Note: Make sure you have a backup; some upgrades/downgrades will wipe your configuration.
Note: If you have problems flashing try disconnecting all cables from your FC first, try rebooting, upgrade chrome, upgrade drivers.
Note: When flashing boards that have directly connected USB sockets (SPRacingF3Mini, Sparky, ColibriRace, etc) ensure you have read the USB Flashing section of the INAV manual and have the correct software and drivers installed" + "message": "Please do not try to flash non-iNAV hardware with this firmware flasher.
Do not disconnect the board or turn off your computer while flashing.

Note: STM32 bootloader is stored in ROM, it cannot be bricked.
Note: Make sure you have a backup; some upgrades/downgrades will wipe your configuration.
Note: If you have problems flashing try disconnecting all cables from your FC first, try rebooting, upgrade chrome, upgrade drivers.
Note: When flashing boards that have directly connected USB sockets (Matek H743-SLIM, Holybro Kakute etc) ensure you have read the USB Flashing section of the INAV manual and have the correct software and drivers installed" }, "firmwareFlasherRecoveryHead": { "message": "Recovery / Lost communication" @@ -4328,5 +4334,11 @@ }, "rcSmoothing": { "message": "RC Smoothing" + }, + "throttle_scale": { + "message": "Throttle scale" + }, + "throttle_scale_help": { + "message": "Allow to limit effective power fed to the motors. Throttle Scale 1 mean there is no power limiting. Throttle Scale 0.5 means throttle position will be cut in half before passed to the motors." } } diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 19bca033..42b44324 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -287,19 +287,23 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_pos_z_p", - value: 15 + value: 25 }, { - key: "nav_fw_pos_z_d", + key: "nav_fw_pos_z_i", value: 5 }, + { + key: "nav_fw_pos_z_d", + value: 8 + }, { key: "nav_fw_pos_xy_p", - value: 60 + value: 55 }, { key: "fw_turn_assist_pitch_gain", - value: 0.5 + value: 0.4 }, { key: "max_angle_inclination_rll", @@ -359,11 +363,19 @@ helper.defaultsDialog = (function () { }, { key: "imu_acc_ignore_rate", - value: 9 + value: 7 }, { key: "imu_acc_ignore_slope", - value: 5 + value: 4 + }, + { + key: "imu_dcm_kp", + value: 1000 + }, + { + key: "imu_dcm_ki", + value: 0 }, { key: "airmode_type", @@ -393,6 +405,22 @@ helper.defaultsDialog = (function () { key: "nav_wp_radius", value: 5000 }, + { + key: "nav_fw_launch_max_angle", + value: 45 + }, + { + key: "nav_fw_launch_motor_delay", + value: 100 + }, + { + key: "nav_fw_launch_max_altitude", + value: 5000 + }, + { + key: "nav_fw_launch_climb_angle", + value: 25 + }, ], "features": [ { @@ -404,7 +432,7 @@ helper.defaultsDialog = (function () { { "title": 'Airplane without a Tail (Wing, Delta, etc)', "notRecommended": false, - "id": 3, + "id": 4, "reboot": true, "mixerToApply": 8, "settings": [ @@ -418,7 +446,7 @@ helper.defaultsDialog = (function () { }, { key: "applied_defaults", - value: 3 + value: 4 }, { key: "gyro_hardware_lpf", @@ -486,19 +514,23 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_pos_z_p", - value: 15 + value: 35 }, { - key: "nav_fw_pos_z_d", + key: "nav_fw_pos_z_i", value: 5 }, + { + key: "nav_fw_pos_z_d", + value: 10 + }, { key: "nav_fw_pos_xy_p", - value: 60 + value: 70 }, { key: "fw_turn_assist_pitch_gain", - value: 0.2 + value: 0.3 }, { key: "max_angle_inclination_rll", @@ -564,6 +596,14 @@ helper.defaultsDialog = (function () { key: "imu_acc_ignore_slope", value: 5 }, + { + key: "imu_dcm_kp", + value: 1000 + }, + { + key: "imu_dcm_ki", + value: 0 + }, { key: "airmode_type", value: "STICK_CENTER_ONCE" @@ -592,6 +632,22 @@ helper.defaultsDialog = (function () { key: "nav_wp_radius", value: 5000 }, + { + key: "nav_fw_launch_max_angle", + value: 75 + }, + { + key: "nav_fw_launch_motor_delay", + value: 100 + }, + { + key: "nav_fw_launch_max_altitude", + value: 5000 + }, + { + key: "nav_fw_launch_climb_angle", + value: 25 + }, ], "features": [ { @@ -718,7 +774,9 @@ helper.defaultsDialog = (function () { GUI.tab_switch_cleanup(function () { MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () { //noinspection JSUnresolvedVariable - savingDefaultsModal.close(); + if (typeof savingDefaultsModal !== 'undefined') { + savingDefaultsModal.close(); + } GUI.log(chrome.i18n.getMessage('deviceRebooting')); GUI.handleReconnect(); }); @@ -728,13 +786,21 @@ helper.defaultsDialog = (function () { }; privateScope.setSettings = function (selectedDefaultPreset) { + var currentControlProfile = parseInt($("#profilechange").val()); + var currentBatteryProfile = parseInt($("#batteryprofilechange").val()); //Save analytics googleAnalytics.sendEvent('Setting', 'Defaults', selectedDefaultPreset.title); Promise.mapSeries(selectedDefaultPreset.settings, function (input, ii) { return mspHelper.getSetting(input.key); }).then(function () { Promise.mapSeries(selectedDefaultPreset.settings, function (input, ii) { - return mspHelper.setSetting(input.key, input.value); + if (FC.isControlProfileParameter(input.key)) { + return privateScope.setSettingForAllControlProfiles(input.key, input.value); + } else if (FC.isBatteryProfileParameter(input.key)) { + return privateScope.setSettingForAllBatteryProfiles(input.key, input.value); + } else { + return mspHelper.setSetting(input.key, input.value); + } }).then(function () { // If default preset is associated to a mixer, apply the mixer as well @@ -751,19 +817,50 @@ helper.defaultsDialog = (function () { mspHelper.sendServoMixer(function () { mspHelper.sendMotorMixer(function () { - privateScope.finalize(selectedDefaultPreset); - }) + MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [currentControlProfile], false, function() { + MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, privateScope.finalize(selectedDefaultPreset)); + }); + }); }); } else { - privateScope.finalize(selectedDefaultPreset); + MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [currentControlProfile], false, function() { + MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, privateScope.finalize(selectedDefaultPreset)); + }); } - - - }) }); }; + privateScope.setSettingForAllControlProfiles = function (key, value) { + MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [0], false, function () { + mspHelper.setSetting(key, value, function() { + MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [1], false, function () { + mspHelper.setSetting(key, value, function() { + MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [2], false, function () { + mspHelper.setSetting(key, value); + }); + }); + }); + }); + }); + return; + }; + + privateScope.setSettingForAllBatteryProfiles = function (key, value) { + MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [0], false, function () { + mspHelper.setSetting(key, value, function() { + MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [1], false, function () { + mspHelper.setSetting(key, value, function() { + MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [2], false, function () { + mspHelper.setSetting(key, value); + }); + }); + }); + }); + }); + return; + }; + privateScope.onPresetClick = function (event) { savingDefaultsModal = new jBox('Modal', { width: 400, diff --git a/js/fc.js b/js/fc.js index 096ccc69..aad1e3ab 100644 --- a/js/fc.js +++ b/js/fc.js @@ -1249,7 +1249,7 @@ var FC = { 4: { name: "Logic Condition", type: "range", - range: [0, 31], + range: [0, (LOGIC_CONDITIONS.getMaxLogicConditionCount()-1)], default: 0 }, 5: { diff --git a/js/gui.js b/js/gui.js index 6849c972..94cbabe6 100644 --- a/js/gui.js +++ b/js/gui.js @@ -316,16 +316,27 @@ GUI_control.prototype.renderOperandValue = function ($container, operandMetadata * @param {function} onChange * @param {boolean} withAlways */ -GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways) { +GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways, onlyEnabled) { let $select = $container.append('
-
-
- - -
-
-
- - -
-
-
- - -
-
@@ -57,7 +40,7 @@
-
+
diff --git a/tabs/auxiliary.js b/tabs/auxiliary.js index 7e497d00..7d38f164 100644 --- a/tabs/auxiliary.js +++ b/tabs/auxiliary.js @@ -18,7 +18,15 @@ TABS.auxiliary.initialize = function (callback) { } function get_rc_data() { - MSP.send_message(MSPCodes.MSP_RC, false, false, load_html); + if (SERIAL_CONFIG.ports.length == 0) { + MSP.send_message(MSPCodes.MSP_RC, false, false, get_ports_data); + } else { + MSP.send_message(MSPCodes.MSP_RC, false, false, load_html); + } + } + + function get_ports_data() { + MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, load_html); } function load_html() { @@ -33,12 +41,12 @@ TABS.auxiliary.initialize = function (callback) { 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["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"]; 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", "USER3", "USER4"]; + modeSections["Misc Modes"] = ["BEEPER", "LEDS OFF", "LIGHTS", "HOME RESET", "WP PLANNER", "MISSION CHANGE", "BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2", "USER3", "USER4"]; function sort_modes_for_display() { // Sort the modes @@ -49,7 +57,7 @@ TABS.auxiliary.initialize = function (callback) { for (i=0; i - +
+ +
+ + N/A diff --git a/tabs/mixer.js b/tabs/mixer.js index 8494b974..c6b0fb05 100644 --- a/tabs/mixer.js +++ b/tabs/mixer.js @@ -301,6 +301,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { function () { servoRule.setConditionId($(this).val()); }, + true, true ); diff --git a/tabs/osd.html b/tabs/osd.html index f2de7a6a..389ded66 100644 --- a/tabs/osd.html +++ b/tabs/osd.html @@ -248,7 +248,7 @@
-
+
diff --git a/tabs/osd.js b/tabs/osd.js index 327b6581..44bd89d3 100644 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -502,6 +502,7 @@ OSD.DjiElements = { "Timers", "VTX", "CRSF", + "SwitchIndicators", "GVars", "PIDs", "PIDOutputs", @@ -1882,6 +1883,11 @@ OSD.constants = { id: 135, preview: 'LEVEL ' + FONT.embed_dot('5.4') }, + { + name: 'MISSION_INDEX', + id: 139, + preview: 'WP NO 7' + }, ] }, { @@ -2052,7 +2058,7 @@ OSD.updateDisplaySize = function () { var item = OSD.msp.helpers.unpack.position(origPos[jj]); // leave element alone if outside of screen (enable and disable element to relocate to 0,0) if (item.x < OSD.data.display_size.x && item.y < OSD.data.display_size.y) { - items[jj] = item; + items[jj] = item; } } } @@ -2617,6 +2623,8 @@ OSD.GUI.updateDjiView = function(on) { $(element).hide(); } }); + + $('.switch-indicator-container').hide(); } else { $(OSD.DjiElements.emptyGroups).each(function(index, groupName) { $('#osdGroup' + groupName).show(); @@ -2629,6 +2637,8 @@ OSD.GUI.updateDjiView = function(on) { $('.settings-container, .alarms-container').find('.settings').children() .show() .removeClass('no-bottom'); + + $('.switch-indicator-container').show(); } OSD.GUI.updateDjiMessageElements($('#useCraftnameForMessages').is(':checked')); }; @@ -3121,7 +3131,7 @@ function updateCraftName() { for (let si = 0; si < generalGroup.items.length; si++) { if (generalGroup.items[si].name == "CRAFT_NAME") { let craftNameText = $('#craft_name').val(); - + if (craftNameText == "") { generalGroup.items[si].preview = "CRAFT_NAME"; } else { diff --git a/tabs/outputs.html b/tabs/outputs.html index 6898a7a0..b19f953f 100644 --- a/tabs/outputs.html +++ b/tabs/outputs.html @@ -52,6 +52,14 @@
+ +
+ + +
+
@@ -86,6 +94,7 @@
+
diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index eb2dd329..0f1fafb6 100644 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -496,7 +496,7 @@ -
+
diff --git a/tabs/ports.js b/tabs/ports.js index af923652..f6320ed9 100644 --- a/tabs/ports.js +++ b/tabs/ports.js @@ -94,7 +94,7 @@ TABS.ports.initialize = function (callback) { ); functionRules.push({ - name: 'HDZERO_VTX', + name: 'MSP_DISPLAYPORT', groups: ['peripherals'], maxPorts: 1 } ); diff --git a/tabs/programming.js b/tabs/programming.js index 6c22c85b..8114b913 100644 --- a/tabs/programming.js +++ b/tabs/programming.js @@ -40,7 +40,6 @@ TABS.programming.initialize = function (callback, scrollPosition) { } function processHtml() { - LOGIC_CONDITIONS.init($('#subtab-lc')); LOGIC_CONDITIONS.render();