mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 17:25:14 +03:00
Merge remote-tracking branch 'origin/master' into dzikuvx-simplify-receiver-tab
This commit is contained in:
commit
ea9007ccab
12 changed files with 202 additions and 25 deletions
|
@ -2225,7 +2225,7 @@
|
|||
"message": "Save Settings"
|
||||
},
|
||||
"cliMscBtn": {
|
||||
"message": "MSC"
|
||||
"message": "Blackbox (MSC)"
|
||||
},
|
||||
"cliDiffAllBtn": {
|
||||
"message": "Diff All"
|
||||
|
@ -2642,7 +2642,7 @@
|
|||
"message": "Set this option if you need an alternate failsafe behavior when the craft is close to Home. For example the author of the feature has a plane that failsafes when the wings detach on landing, when the RTH failsafe behavior normally desired in flight is no longer wanted or needed."
|
||||
},
|
||||
"failsafeMinDistanceItem": {
|
||||
"message": "Failsafe Minimum Distance in centimeters"
|
||||
"message": "Failsafe Minimum Distance"
|
||||
},
|
||||
"failsafeMinDistanceHelp": {
|
||||
"message": "The craft will use the alternate failsafe behavior when it is between 0 and this minimum distance in centimeters away from Home. For example if set to 2000 centimeters (20 meters), and the craft is at 13 meters, the Failsafe Minimum Distance Procedure will be followed. When the craft is at 25 meters, the normal failsafe procedure will be followed. If set to 0, the normal failsafe procedure will be used at all times. "
|
||||
|
@ -4892,6 +4892,15 @@
|
|||
"save": {
|
||||
"message": "Save"
|
||||
},
|
||||
"copy": {
|
||||
"message": "Copy"
|
||||
},
|
||||
"paste": {
|
||||
"message": "Paste"
|
||||
},
|
||||
"clear": {
|
||||
"message": "Clear"
|
||||
},
|
||||
"active": {
|
||||
"message": "Active"
|
||||
},
|
||||
|
@ -5685,6 +5694,15 @@
|
|||
"osdSettingsSaved": {
|
||||
"message": "OSD settings saved"
|
||||
},
|
||||
"osdLayoutInsertedIntoClipboard": {
|
||||
"message": "Layout has been saved to clipboard"
|
||||
},
|
||||
"osdLayoutPasteFromClipboard": {
|
||||
"message": "Layout has been restored from clipboard"
|
||||
},
|
||||
"osdClearLayout": {
|
||||
"message": "Layout has been cleared"
|
||||
},
|
||||
"failedToOpenSerialPort": {
|
||||
"message": "<span style=\"color: red\">Failed</span> to open serial port"
|
||||
},
|
||||
|
@ -5736,6 +5754,12 @@
|
|||
"ezTuneExpo": {
|
||||
"message": "Expo"
|
||||
},
|
||||
"ezTuneSnappiness": {
|
||||
"message": "Snappiness"
|
||||
},
|
||||
"ezTuneSnappinessTips": {
|
||||
"message": "Helps to have a snappy stick feeling. Whenever you do a fast stick movement, high Snappiness will accelerate the drone response. Both when you start and stop the manouver. Try different values to find the one that suits you best."
|
||||
},
|
||||
"ezTuneFilterHzTips": {
|
||||
"message": "This sets the base cutoff frequency for all INAV gyro and D-term filters. Higher values will result in lower filter delay and better stabilization, but more noise will go through the filters and motors will get hot, UAV might oscillate and be unfyable. Your goal is to increase this value as high as possible before any negative effects appear. Negative effects include: hot motors, audible osciallations, UAV rapidly shaking, UAV gaining altitude by itself. Usual starting points for 'Filter Hz' are: <strong>3-inch props</strong>: 90, <strong>5-inch props</strong>: 110, <strong>7-inch props</strong>: 90, <strong>10-inch props</strong>: 75, <strong>12-inch props</strong>: 60. Use Blackbox and common sense to find a value that is most suited for your UAV."
|
||||
},
|
||||
|
|
|
@ -959,27 +959,60 @@ helper.defaultsDialog = (function () {
|
|||
});
|
||||
});
|
||||
|
||||
for (var i = 0; i < 3; i++ ) {
|
||||
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [i], false, callback);
|
||||
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [0], false, callback);
|
||||
});
|
||||
controlProfileSettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0; i < 3; i++ ) {
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [i], false, callback);
|
||||
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [1], false, callback);
|
||||
});
|
||||
controlProfileSettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [2], false, callback);
|
||||
});
|
||||
controlProfileSettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [0], false, callback);
|
||||
});
|
||||
batterySettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [1], false, callback);
|
||||
});
|
||||
batterySettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
|
||||
chain.push(function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [2], false, callback);
|
||||
});
|
||||
batterySettings.forEach(input => {
|
||||
chain.push(function (callback) {
|
||||
mspHelper.setSetting(input.key, input.value, callback);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Set Mixers
|
||||
if (selectedDefaultPreset.mixerToApply) {
|
||||
|
|
3
js/fc.js
3
js/fc.js
|
@ -566,7 +566,8 @@ var FC = {
|
|||
stability: null,
|
||||
aggressiveness: null,
|
||||
rate: null,
|
||||
expo: null
|
||||
expo: null,
|
||||
snappiness: null,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1515,6 +1515,7 @@ var mspHelper = (function (gui) {
|
|||
EZ_TUNE.aggressiveness = data.getUint8(7);
|
||||
EZ_TUNE.rate = data.getUint8(8);
|
||||
EZ_TUNE.expo = data.getUint8(9);
|
||||
EZ_TUNE.snappiness = data.getUint8(10);
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP2_INAV_EZ_TUNE_SET:
|
||||
|
@ -2159,6 +2160,7 @@ var mspHelper = (function (gui) {
|
|||
buffer.push(EZ_TUNE.aggressiveness);
|
||||
buffer.push(EZ_TUNE.rate);
|
||||
buffer.push(EZ_TUNE.expo);
|
||||
buffer.push(EZ_TUNE.snappiness);
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -734,3 +734,33 @@ button {
|
|||
.osdCustomElement_main_table select, .osdCustomElement_main_table input{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.settings .btn a{
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
font-family: 'open_sansbold', Arial, serif;
|
||||
font-size: 12px;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.25);
|
||||
cursor: pointer;
|
||||
transition: all ease 0.2s;
|
||||
padding: 0 9px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.settings .btn_blue a{
|
||||
background-color: #37a8db;
|
||||
border: 1px solid #3394b5;
|
||||
}
|
||||
|
||||
.settings .btn_danger a{
|
||||
background-color: #e2a2a2;
|
||||
border: 1px solid #e58383;
|
||||
}
|
||||
|
||||
|
||||
.settings .btn a:hover {
|
||||
background-color: #3394b5;
|
||||
transition: all ease 0.2s;
|
||||
}
|
|
@ -198,7 +198,7 @@ TABS.magnetometer.initialize = function (callback) {
|
|||
var magRotation = new THREE.Euler(-THREE.Math.degToRad(degree[0]-180), THREE.Math.degToRad(-180 - degree[2]), THREE.Math.degToRad(degree[1]), 'YXZ');
|
||||
var matrix = (new THREE.Matrix4()).makeRotationFromEuler(magRotation);
|
||||
|
||||
var boardRotation = new THREE.Euler( THREE.Math.degToRad( -self.boardAlignmentConfig.pitch ), THREE.Math.degToRad( -self.boardAlignmentConfig.yaw ), THREE.Math.degToRad( -self.boardAlignmentConfig.roll ), 'YXZ');
|
||||
var boardRotation = new THREE.Euler( THREE.Math.degToRad( self.boardAlignmentConfig.pitch ), THREE.Math.degToRad( -self.boardAlignmentConfig.yaw ), THREE.Math.degToRad( self.boardAlignmentConfig.roll ), 'YXZ');
|
||||
var matrix1 = (new THREE.Matrix4()).makeRotationFromEuler(boardRotation);
|
||||
|
||||
matrix.premultiply(matrix1);
|
||||
|
@ -600,7 +600,7 @@ TABS.magnetometer.initialize3D = function () {
|
|||
var magRotation = new THREE.Euler(-THREE.Math.degToRad(self.alignmentConfig.pitch-180), THREE.Math.degToRad(-180 - self.alignmentConfig.yaw), THREE.Math.degToRad(self.alignmentConfig.roll), 'YXZ');
|
||||
var matrix = (new THREE.Matrix4()).makeRotationFromEuler(magRotation);
|
||||
|
||||
var boardRotation = new THREE.Euler( THREE.Math.degToRad( -self.boardAlignmentConfig.pitch ), THREE.Math.degToRad( -self.boardAlignmentConfig.yaw ), THREE.Math.degToRad( -self.boardAlignmentConfig.roll ), 'YXZ');
|
||||
var boardRotation = new THREE.Euler( THREE.Math.degToRad( self.boardAlignmentConfig.pitch), THREE.Math.degToRad( -self.boardAlignmentConfig.yaw ), THREE.Math.degToRad( self.boardAlignmentConfig.roll ), 'YXZ');
|
||||
var matrix1 = (new THREE.Matrix4()).makeRotationFromEuler(boardRotation);
|
||||
|
||||
/*
|
||||
|
|
|
@ -433,13 +433,18 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
|
|||
rules = currentMixerPreset.motorMixer;
|
||||
}
|
||||
|
||||
if (currentMixerPreset.image != 'quad_x') {
|
||||
for (i = 1; i < 5; i++) {
|
||||
$("#motorNumber"+i).css("visibility", "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
for (const i in rules) {
|
||||
if (rules.hasOwnProperty(i)) {
|
||||
const rule = rules[i];
|
||||
index++;
|
||||
|
||||
if (currentMixerPreset.image != 'quad_x') {
|
||||
$("#motorNumber"+index).css("visibility", "hidden");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,13 +145,14 @@
|
|||
|
||||
<div class="require-sdcard-ready">
|
||||
<ul class="sdcard-contents">
|
||||
<li class="sdcard-other">
|
||||
<div class="legend"></div>
|
||||
</li>
|
||||
<li class="sdcard-free">
|
||||
<div class="legend"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="sdcard-other">
|
||||
<div class="legend"></div>
|
||||
</li>
|
||||
</ul><bbr />
|
||||
<a class="require-msc-ready regular-button onboardLoggingRebootMsc" href="#" i18n="cliMscBtn"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,6 +10,15 @@
|
|||
<div class="settings spacer_right">
|
||||
<select class="osd_layouts">
|
||||
</select>
|
||||
<span class="btn btn_blue">
|
||||
<a class="active osd_copy" href="#" data-i18n="copy"></a>
|
||||
</span>
|
||||
<span class="btn btn_blue">
|
||||
<a class="active osd_paste" href="#" data-i18n="paste"></a>
|
||||
</span>
|
||||
<span class="btn btn_danger">
|
||||
<a class="active osd_clear" href="#" data-i18n="clear"></a>
|
||||
</span>
|
||||
<input class="osd_search" placeholder="Search...">
|
||||
</div>
|
||||
<div class="spacer_right">
|
||||
|
|
59
tabs/osd.js
59
tabs/osd.js
|
@ -138,6 +138,8 @@ var video_type = null;
|
|||
var isGuidesChecked = false;
|
||||
var FONT = FONT || {};
|
||||
|
||||
var layout_clipboard = {layout: [], filled: false};
|
||||
|
||||
var FONT = FONT || {};
|
||||
FONT.initData = function () {
|
||||
if (FONT.data) {
|
||||
|
@ -3106,6 +3108,9 @@ OSD.GUI.updateAll = function() {
|
|||
return;
|
||||
}
|
||||
var layouts = $('.osd_layouts');
|
||||
var copy = $('.osd_copy');
|
||||
var paste = $('.osd_paste').hide();
|
||||
var clear = $('.osd_clear');
|
||||
if (OSD.data.layout_count > 1) {
|
||||
layouts.empty();
|
||||
for (var ii = 0; ii < OSD.data.layout_count; ii++) {
|
||||
|
@ -3121,9 +3126,63 @@ OSD.GUI.updateAll = function() {
|
|||
OSD.GUI.updateDjiView($('#djiUnsupportedElements').find('input').is(':checked'));
|
||||
OSD.GUI.updatePreviews();
|
||||
});
|
||||
|
||||
copy.on('click', function() {
|
||||
if(OSD.data.selected_layout >= 0 && OSD.data.selected_layout < OSD.data.layout_count){
|
||||
layout_clipboard = {layout: JSON.parse(JSON.stringify(OSD.data.layouts[OSD.data.selected_layout])), filled: true};
|
||||
paste.show();
|
||||
GUI.log(chrome.i18n.getMessage('osdLayoutInsertedIntoClipboard'));
|
||||
}
|
||||
});
|
||||
|
||||
paste.on('click', function() {
|
||||
if(layout_clipboard.filled == true){
|
||||
|
||||
var oldLayout = JSON.parse(JSON.stringify(OSD.data.layouts[OSD.data.selected_layout]))
|
||||
OSD.data.layouts[OSD.data.selected_layout] = JSON.parse(JSON.stringify(layout_clipboard.layout));
|
||||
layouts.trigger('change');
|
||||
OSD.data.layouts[OSD.data.selected_layout].forEach(function(item, index){
|
||||
if(!(item.isVisible === false && oldLayout[index].isVisible === false) && (oldLayout[index].x !== item.x || oldLayout[index].y !== item.y || oldLayout[index].position !== item.position || oldLayout[index].isVisible !== item.isVisible)){
|
||||
OSD.saveItem({id: index});
|
||||
}
|
||||
});
|
||||
GUI.log(chrome.i18n.getMessage('osdLayoutPasteFromClipboard'));
|
||||
}
|
||||
});
|
||||
|
||||
clear.on('click', function() {
|
||||
var oldLayout = JSON.parse(JSON.stringify(OSD.data.layouts[OSD.data.selected_layout]));
|
||||
|
||||
var clearedLayout = [];
|
||||
oldLayout.forEach(function(item, index){
|
||||
var itemCopy = JSON.parse(JSON.stringify(item));
|
||||
itemCopy.isVisible = false;
|
||||
clearedLayout[index] = itemCopy;
|
||||
})
|
||||
|
||||
OSD.data.layouts[OSD.data.selected_layout] = clearedLayout;
|
||||
layouts.trigger('change');
|
||||
OSD.data.layouts[OSD.data.selected_layout].forEach(function(item, index){
|
||||
if(oldLayout[index].isVisible === true){
|
||||
OSD.saveItem({id: index});
|
||||
}
|
||||
});
|
||||
GUI.log(chrome.i18n.getMessage('osdClearLayout'));
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
layouts.hide();
|
||||
layouts.off('change');
|
||||
|
||||
copy.hide();
|
||||
copy.off('change');
|
||||
|
||||
paste.hide();
|
||||
paste.off('change');
|
||||
|
||||
clear.hide();
|
||||
clear.off('change');
|
||||
}
|
||||
|
||||
$('.osd_search').on('input', function() {
|
||||
|
|
|
@ -118,6 +118,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pid-sliders-axis" data-axis="3">
|
||||
<div style="padding: 1em;" data-i18n="ezTuneSnappinessTips"></div>
|
||||
<div class="pid-slider-row">
|
||||
<span data-i18n="ezTuneSnappiness" class="bold"></span>
|
||||
<div class="number no-border">
|
||||
<input id="ez_tune_snappiness" type="number" class="ez-element" />
|
||||
</div>
|
||||
<div class="clear-both"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ez-tune-preview">
|
||||
|
|
|
@ -186,6 +186,8 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
GUI.sliderize($('#ez_tune_rate'), EZ_TUNE.rate, 0, 200);
|
||||
GUI.sliderize($('#ez_tune_expo'), EZ_TUNE.expo, 0, 200);
|
||||
|
||||
GUI.sliderize($('#ez_tune_snappiness'), EZ_TUNE.snappiness, 0, 100);
|
||||
|
||||
$('.ez-element').on('updated', function () {
|
||||
updatePreview();
|
||||
});
|
||||
|
@ -328,6 +330,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
EZ_TUNE.aggressiveness = $('#ez_tune_aggressiveness').val();
|
||||
EZ_TUNE.rate = $('#ez_tune_rate').val();
|
||||
EZ_TUNE.expo = $('#ez_tune_expo').val();
|
||||
EZ_TUNE.snappiness = $('#ez_tune_snappiness').val();
|
||||
|
||||
function send_rc_tuning_changes() {
|
||||
MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, saveRateDynamics);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue