mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 01:05:12 +03:00
Merge branch 'master' into change-profiles-with-programmin
This commit is contained in:
commit
03e569dd7c
11 changed files with 204 additions and 213 deletions
|
@ -68,6 +68,8 @@ in the `./dist/` directory.
|
|||
directory. Running this task on macOS or Linux requires Wine, since it's needed to set the icon
|
||||
for the Windows app. If you don't have Wine installed you can create a release by running the **release-only-linux** task.
|
||||
|
||||
To build a specific release, use the command `release --platform="win64"` for example.
|
||||
|
||||
## Different map providers
|
||||
|
||||
INAV Configurator 2.1 allows to choose between OpenStreetMap, Bing Maps, and MapProxy map providers.
|
||||
|
|
|
@ -2230,9 +2230,6 @@
|
|||
"accLpfCutoffFrequency": {
|
||||
"message": "Accelerometer LPF cutoff frequency"
|
||||
},
|
||||
"accLpfCutoffFrequencyHelp": {
|
||||
"message": "Software-based filter to remove mechanical vibrations from the accelerometer measurements. Value is cutoff frequency (Hz). For larger frames with bigger props set to lower value."
|
||||
},
|
||||
"dtermLpfCutoffFrequency": {
|
||||
"message": "D-term LPF cutoff frequency"
|
||||
},
|
||||
|
@ -3514,6 +3511,12 @@
|
|||
"confirm_delete_point_with_options": {
|
||||
"message": "Do you really want to delete this Waypoint with non-Geo JUMP/SET_HEAD/RTH options? \nIf yes, Non-Geo options attached will be removed also!"
|
||||
},
|
||||
"no_waypoints_to_load": {
|
||||
"message": "No waypoints to load !"
|
||||
},
|
||||
"no_waypoints_to_save": {
|
||||
"message": "No waypoints to save !"
|
||||
},
|
||||
"servoMixer": {
|
||||
"message": "Servo mixer"
|
||||
},
|
||||
|
@ -3838,12 +3841,6 @@
|
|||
"rpm_gyro_min_hz": {
|
||||
"message": "Gyro RPM filter min. frequency"
|
||||
},
|
||||
"acc_lpf_type": {
|
||||
"message": "Accelerometer LPF type"
|
||||
},
|
||||
"acc_lpf_type_help": {
|
||||
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
|
||||
},
|
||||
"dTermMechanics": {
|
||||
"message": "D-term mechanics"
|
||||
},
|
||||
|
@ -3880,18 +3877,6 @@
|
|||
"iTermMechanics": {
|
||||
"message": "I-term mechanics"
|
||||
},
|
||||
"airmode_type": {
|
||||
"message": "Airmode handling type"
|
||||
},
|
||||
"airmode_type_help": {
|
||||
"message": "Defines the Airmode state handling type. <br />Default STICK_CENTER is the classical approach in which Airmode is always active if enabled, but when the throttle is low and ROLL/PITCH/YAW sticks are centered, Iterms is not allowed to grow (ANTI_WINDUP). <br />STICK_CENTER_ONCE works like STICK_CENTER, but only until the first time THROTTLE is not low and ROLL/PITCH/YAW sticks are moved. After that, ANTI_WINDUP is deactivated until next arm. Useful for airplanes. <br />THROTTLE_THRESHOLD is the Airmode behavior known from Betaflight. In this mode, Airmode is active as soon THROTTLE position is above <i>airmode_throttle_threshold</i> and stays active until disarm. ANTI_WINDUP is never triggered. For small Multirotors (up to 7-inch propellers) it is suggested to switch to THROTTLE_THRESHOLD since it keeps full stabilization no matter what pilot does with the sticks. Airplanes default to STICK_CENTER_ONCE mode."
|
||||
},
|
||||
"airmode_throttle_threshold": {
|
||||
"message": "Airmode Throttle threshold"
|
||||
},
|
||||
"airmode_throttle_threshold_help": {
|
||||
"message": "Defines airmode THROTTLE activation threshold when airmode_type THROTTLE_THRESHOLD is used"
|
||||
},
|
||||
"gps_map_center": {
|
||||
"message": "Center"
|
||||
},
|
||||
|
|
|
@ -77,6 +77,10 @@ helper.defaultsDialog = (function () {
|
|||
key: "setpoint_kalman_q",
|
||||
value: 200
|
||||
},
|
||||
{
|
||||
key: "smith_predictor_delay", // Enable Smith Predictor
|
||||
value: 1.5
|
||||
},
|
||||
/*
|
||||
Mechanics
|
||||
*/
|
||||
|
|
|
@ -137,7 +137,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
|||
};
|
||||
|
||||
self.getElevation = async function (globalSettings) {
|
||||
let elevation;
|
||||
let elevation = "N/A";
|
||||
if (globalSettings.mapProviderType == 'bing') {
|
||||
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "sealevel" : "ellipsoid";
|
||||
|
||||
|
@ -146,7 +146,11 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
|||
elevation = myJson.resourceSets[0].resources[0].elevations[0];
|
||||
}
|
||||
else {
|
||||
elevation = "N/A";
|
||||
const response = await fetch('https://api.opentopodata.org/v1/aster30m?locations='+self.getLatMap()+','+self.getLonMap());
|
||||
const myJson = await response.json();
|
||||
if (myJson.status == "OK" && myJson.results[0].elevation != null) {
|
||||
elevation = myJson.results[0].elevation;
|
||||
}
|
||||
}
|
||||
return elevation;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ let WaypointCollection = function () {
|
|||
};
|
||||
|
||||
self.isEmpty = function () {
|
||||
return data == [];
|
||||
return data.length == 0;
|
||||
};
|
||||
|
||||
self.flush = function () {
|
||||
|
@ -414,15 +414,28 @@ let WaypointCollection = function () {
|
|||
let lengthMission = self.getDistance(true);
|
||||
let totalMissionDistance = lengthMission[lengthMission.length -1].toFixed(1);
|
||||
let samples;
|
||||
let sampleMaxNum;
|
||||
let sampleDistance;
|
||||
|
||||
if (globalSettings.mapProviderType == 'bing') {
|
||||
sampleMaxNum = 1024;
|
||||
sampleDistance = 30;
|
||||
} else { // use opentopodata.org instead
|
||||
sampleMaxNum = 99;
|
||||
sampleDistance = 60;
|
||||
}
|
||||
|
||||
if (point2measure.length <= 2){
|
||||
samples = 1;
|
||||
}
|
||||
else if (Math.trunc(totalMissionDistance/30) <= 1024 && point2measure.length > 2){
|
||||
samples = Math.trunc(totalMissionDistance/30);
|
||||
else if (Math.trunc(totalMissionDistance / sampleDistance) <= sampleMaxNum && point2measure.length > 2){
|
||||
samples = Math.trunc(totalMissionDistance / sampleDistance);
|
||||
}
|
||||
else {
|
||||
samples = 1024;
|
||||
samples = sampleMaxNum;
|
||||
}
|
||||
|
||||
let elevation = "N/A";
|
||||
if (globalSettings.mapProviderType == 'bing') {
|
||||
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "sealevel" : "ellipsoid";
|
||||
|
||||
|
@ -438,7 +451,23 @@ let WaypointCollection = function () {
|
|||
}
|
||||
}
|
||||
else {
|
||||
elevation = "N/A";
|
||||
let coordList = "";
|
||||
point2measure.forEach(function (item) {
|
||||
coordList += item + '|';
|
||||
});
|
||||
const response = await fetch('https://api.opentopodata.org/v1/aster30m?locations='+coordList+'&samples='+String(samples+1));
|
||||
const myJson = await response.json();
|
||||
|
||||
if (myJson.status == "OK") {
|
||||
elevation = [];
|
||||
for (var i = 0; i < myJson.results.length; i++){
|
||||
if (myJson.results[i].elevation == null) {
|
||||
elevation[i] = 0;
|
||||
} else {
|
||||
elevation[i] = myJson.results[i].elevation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//console.log("elevation ", elevation);
|
||||
return [lengthMission, totalMissionDistance, samples, elevation, altPoint2measure, namePoint2measure, refPoint2measure];
|
||||
|
|
|
@ -48,6 +48,21 @@
|
|||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.tab-auxiliary .modeSection > td {
|
||||
background-color: #f9f9f9;
|
||||
vertical-align: top;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.tab-auxiliary .modeSectionArea {
|
||||
background-color: #37a8db;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.5);
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.tab-auxiliary .mode {
|
||||
background-color: #f9f9f9;
|
||||
vertical-align: top;
|
||||
|
|
|
@ -61,4 +61,9 @@
|
|||
<a class="deleteRange" href="#"> </a>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<tr class="modeSection">
|
||||
<td colspan="2"><div class="modeSectionArea"><p class="modeSectionName"></p></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -36,20 +36,30 @@ TABS.auxiliary.initialize = function (callback) {
|
|||
|
||||
MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false, get_mode_ranges);
|
||||
|
||||
const modeSections = {};
|
||||
modeSections["ARM"] = "Arming";
|
||||
modeSections["ANGLE"] = "Flight Modes";
|
||||
modeSections["NAV COURSE HOLD"] = "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";
|
||||
|
||||
function sort_modes_for_display() {
|
||||
// This array defines the order that the modes are displayed in the configurator modes page
|
||||
configuratorBoxOrder = [
|
||||
"ARM", "PREARM", // Arming
|
||||
"ANGLE", "HORIZON", "MANUAL", // Flight modes
|
||||
"NAV RTH", "NAV POSHOLD", "NAV CRUISE", "NAV COURSE HOLD", // Navigation mode
|
||||
"NAV ALTHOLD", "HEADING HOLD", "AIR MODE", // Flight mode modifiers
|
||||
"NAV WP", "GCS NAV", "HOME RESET", // Navigation
|
||||
"SERVO AUTOTRIM", "AUTO LEVEL", "AUTO TUNE", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", // Fixed wing specific
|
||||
"TURTLE", "FPV ANGLE MIX", "TURN ASSIST", "MC BRAKING", "SURFACE", "HEADFREE", "HEADADJ", // Multi-rotor specific
|
||||
"BEEPER", "LEDS OFF", "LIGHTS", // Feedback
|
||||
"OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3", // OSD
|
||||
"CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3", // FPV Camera
|
||||
"BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2" // Misc
|
||||
const configuratorBoxOrder = [
|
||||
"ARM", "PREARM", // Arming
|
||||
"ANGLE", "HORIZON", "MANUAL", // Flight modes
|
||||
"NAV COURSE HOLD", "NAV CRUISE", "NAV POSHOLD", "NAV RTH", "NAV WP", "GCS NAV", // Navigation modes
|
||||
"NAV ALTHOLD", "HEADING HOLD", "AIR MODE", // 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", "SURFACE", "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", "BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", // Misc
|
||||
"MSP RC OVERRIDE", "USER1", "USER2"
|
||||
];
|
||||
|
||||
// Sort the modes
|
||||
|
@ -98,6 +108,15 @@ TABS.auxiliary.initialize = function (callback) {
|
|||
}
|
||||
}
|
||||
|
||||
function createModeSection(sectionName) {
|
||||
var modeSectionTemplate = $('#tab-auxiliary-templates .modeSection');
|
||||
var newModeSection = modeSectionTemplate.clone();
|
||||
$(newModeSection).attr('id', 'section-' + sectionName);
|
||||
$(newModeSection).find('.modeSectionName').text(sectionName);
|
||||
|
||||
return newModeSection;
|
||||
}
|
||||
|
||||
function createMode(modeIndex, modeId) {
|
||||
var modeTemplate = $('#tab-auxiliary-templates .mode');
|
||||
var newMode = modeTemplate.clone();
|
||||
|
@ -198,6 +217,11 @@ TABS.auxiliary.initialize = function (callback) {
|
|||
var modeTableBodyElement = $('.tab-auxiliary .modes tbody')
|
||||
for (var modeIndex = 0; modeIndex < AUX_CONFIG.length; modeIndex++) {
|
||||
|
||||
if (AUX_CONFIG[modeIndex] in modeSections) {
|
||||
var newSection = createModeSection(modeSections[AUX_CONFIG[modeIndex]]);
|
||||
modeTableBodyElement.append(newSection);
|
||||
}
|
||||
|
||||
var modeId = AUX_CONFIG_IDS[modeIndex];
|
||||
var newMode = createMode(modeIndex, modeId);
|
||||
modeTableBodyElement.append(newMode);
|
||||
|
@ -415,7 +439,11 @@ TABS.auxiliary.initialize = function (callback) {
|
|||
if (modeElement.find(' .range').length == 0) {
|
||||
modeElement.toggle(!hideUnused);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(".modeSection").each(function() {
|
||||
$(this).toggle(!hideUnused);
|
||||
});
|
||||
}
|
||||
|
||||
let hideUnusedModes = false;
|
||||
|
|
|
@ -975,8 +975,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
map.addLayer(addWaypointMarker(element));
|
||||
}
|
||||
});
|
||||
repaintLine4Waypoints(mission);
|
||||
}
|
||||
repaintLine4Waypoints(mission);
|
||||
}
|
||||
|
||||
function redrawLayer() {
|
||||
|
@ -1503,22 +1503,17 @@ TABS.mission_control.initialize = function (callback) {
|
|||
|
||||
var altitudeMeters = app.ConvertCentimetersToMeters(selectedMarker.getAlt());
|
||||
|
||||
if (globalSettings.mapProviderType == 'bing') {
|
||||
$('#elevationAtWP').fadeIn();
|
||||
$('#groundClearanceAtWP').fadeIn();
|
||||
if (tempSelectedMarkerIndex == null || tempSelectedMarkerIndex != selectedMarker.getLayerNumber()) {
|
||||
(async () => {
|
||||
const elevationAtWP = await selectedMarker.getElevation(globalSettings);
|
||||
$('#elevationValueAtWP').text(elevationAtWP);
|
||||
const returnAltitude = checkAltElevSanity(false, selectedMarker.getAlt(), elevationAtWP, selectedMarker.getP3());
|
||||
selectedMarker.setAlt(returnAltitude);
|
||||
plotElevation();
|
||||
})()
|
||||
}
|
||||
} else {
|
||||
$('#elevationAtWP').fadeOut();
|
||||
$('#groundClearanceAtWP').fadeOut();
|
||||
if (tempSelectedMarkerIndex == null || tempSelectedMarkerIndex != selectedMarker.getLayerNumber()) {
|
||||
(async () => {
|
||||
const elevationAtWP = await selectedMarker.getElevation(globalSettings);
|
||||
$('#elevationValueAtWP').text(elevationAtWP);
|
||||
const returnAltitude = checkAltElevSanity(false, selectedMarker.getAlt(), elevationAtWP, selectedMarker.getP3());
|
||||
selectedMarker.setAlt(returnAltitude);
|
||||
plotElevation();
|
||||
})()
|
||||
}
|
||||
$('#elevationAtWP').fadeIn();
|
||||
$('#groundClearanceAtWP').fadeIn();
|
||||
|
||||
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
|
||||
$('#pointLon').val(Math.round(coord[0] * 10000000) / 10000000);
|
||||
|
@ -1789,33 +1784,31 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (selectedMarker) {
|
||||
const P3Value = selectedMarker.getP3();
|
||||
selectedMarker.setP3( $('#pointP3').prop("checked") ? 1.0 : 0.0);
|
||||
if (globalSettings.mapProviderType == 'bing') {
|
||||
(async () => {
|
||||
const elevationAtWP = await selectedMarker.getElevation(globalSettings);
|
||||
$('#elevationValueAtWP').text(elevationAtWP);
|
||||
var altitude = Number($('#pointAlt').val());
|
||||
if (P3Value != selectedMarker.getP3()) {
|
||||
if ($('#pointP3').prop("checked")) {
|
||||
if (altitude < 0) {
|
||||
altitude = settings.alt;
|
||||
}
|
||||
selectedMarker.setAlt(altitude + elevationAtWP * 100);
|
||||
} else {
|
||||
selectedMarker.setAlt(altitude - Number(elevationAtWP) * 100);
|
||||
(async () => {
|
||||
const elevationAtWP = await selectedMarker.getElevation(globalSettings);
|
||||
$('#elevationValueAtWP').text(elevationAtWP);
|
||||
var altitude = Number($('#pointAlt').val());
|
||||
if (P3Value != selectedMarker.getP3()) {
|
||||
if ($('#pointP3').prop("checked")) {
|
||||
if (altitude < 0) {
|
||||
altitude = settings.alt;
|
||||
}
|
||||
selectedMarker.setAlt(altitude + elevationAtWP * 100);
|
||||
} else {
|
||||
selectedMarker.setAlt(altitude - Number(elevationAtWP) * 100);
|
||||
}
|
||||
const returnAltitude = checkAltElevSanity(false, selectedMarker.getAlt(), elevationAtWP, selectedMarker.getP3());
|
||||
selectedMarker.setAlt(returnAltitude);
|
||||
$('#pointAlt').val(selectedMarker.getAlt());
|
||||
altitudeMeters = app.ConvertCentimetersToMeters(selectedMarker.getAlt());
|
||||
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
|
||||
}
|
||||
const returnAltitude = checkAltElevSanity(false, selectedMarker.getAlt(), elevationAtWP, selectedMarker.getP3());
|
||||
selectedMarker.setAlt(returnAltitude);
|
||||
$('#pointAlt').val(selectedMarker.getAlt());
|
||||
altitudeMeters = app.ConvertCentimetersToMeters(selectedMarker.getAlt());
|
||||
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
|
||||
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
redrawLayer();
|
||||
plotElevation();
|
||||
})()
|
||||
}
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
redrawLayer();
|
||||
plotElevation();
|
||||
})()
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1996,30 +1989,35 @@ TABS.mission_control.initialize = function (callback) {
|
|||
removeAllWaypoints();
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start get point');
|
||||
getWaypointsFromFC();
|
||||
GUI.log('End get point');
|
||||
$('#loadMissionButton').removeClass('disabled');
|
||||
getWaypointsFromFC(false);
|
||||
});
|
||||
|
||||
$('#saveMissionButton').on('click', function () {
|
||||
if (!mission.get().length) {
|
||||
alert(chrome.i18n.getMessage('no_waypoints_to_save'));
|
||||
return;
|
||||
}
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start send point');
|
||||
sendWaypointsToFC();
|
||||
GUI.log('End send point');
|
||||
$('#saveMissionButton').removeClass('disabled');
|
||||
|
||||
sendWaypointsToFC(false);
|
||||
});
|
||||
|
||||
$('#loadEepromMissionButton').on('click', function () {
|
||||
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
||||
removeAllWaypoints();
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_LOAD, [0], getWaypointsFromFC);
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start get point');
|
||||
getWaypointsFromFC(true);
|
||||
});
|
||||
|
||||
$('#saveEepromMissionButton').on('click', function () {
|
||||
if (!mission.get().length) {
|
||||
alert(chrome.i18n.getMessage('no_waypoints_to_save'));
|
||||
return;
|
||||
}
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start send point');
|
||||
sendWaypointsToFC();
|
||||
sendWaypointsToFC(true);
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
@ -2225,30 +2223,51 @@ TABS.mission_control.initialize = function (callback) {
|
|||
// Load/Save FC mission Toolbox
|
||||
//
|
||||
/////////////////////////////////////////////
|
||||
function getWaypointsFromFC() {
|
||||
mspHelper.loadWaypoints(function() {
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_load_ok'));
|
||||
mission.reinit();
|
||||
mission.copy(MISSION_PLANER);
|
||||
mission.update(true);
|
||||
var coord = ol.proj.fromLonLat([mission.getWaypoint(0).getLonMap(), mission.getWaypoint(0).getLatMap()]);
|
||||
map.getView().setCenter(coord);
|
||||
map.getView().setZoom(16);
|
||||
redrawLayers();
|
||||
updateTotalInfo();
|
||||
});
|
||||
function getWaypointsFromFC(loadEeprom) {
|
||||
if (loadEeprom) {
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_LOAD, [0], getWaypointData);
|
||||
} else {
|
||||
getWaypointData();
|
||||
}
|
||||
|
||||
function getWaypointData() {
|
||||
mspHelper.loadWaypoints(function() {
|
||||
GUI.log('End get point');
|
||||
if (loadEeprom) {
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_load_ok'));
|
||||
$('#loadEepromMissionButton').removeClass('disabled');
|
||||
} else {
|
||||
$('#loadMissionButton').removeClass('disabled');
|
||||
}
|
||||
if (!MISSION_PLANER.getCountBusyPoints()) {
|
||||
alert(chrome.i18n.getMessage('no_waypoints_to_load'));
|
||||
return;
|
||||
}
|
||||
mission.reinit();
|
||||
mission.copy(MISSION_PLANER);
|
||||
mission.update(true);
|
||||
var coord = ol.proj.fromLonLat([mission.getWaypoint(0).getLonMap(), mission.getWaypoint(0).getLatMap()]);
|
||||
map.getView().setCenter(coord);
|
||||
map.getView().setZoom(16);
|
||||
redrawLayers();
|
||||
updateTotalInfo();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function sendWaypointsToFC() {
|
||||
function sendWaypointsToFC(saveEeprom) {
|
||||
MISSION_PLANER.reinit();
|
||||
MISSION_PLANER.copy(mission);
|
||||
MISSION_PLANER.update(true, true);
|
||||
mspHelper.saveWaypoints(function() {
|
||||
GUI.log('End send point');
|
||||
$('#saveEepromMissionButton').removeClass('disabled');
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false);
|
||||
|
||||
if (saveEeprom) {
|
||||
$('#saveEepromMissionButton').removeClass('disabled');
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false);
|
||||
} else {
|
||||
$('#saveMissionButton').removeClass('disabled');
|
||||
}
|
||||
mission.setMaxWaypoints(MISSION_PLANER.getMaxWaypoints());
|
||||
mission.setValidMission(MISSION_PLANER.getValidMission());
|
||||
mission.setCountBusyPoints(MISSION_PLANER.getCountBusyPoints());
|
||||
|
@ -2286,10 +2305,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
/* resetAltitude = true : For selected WPs only. Changes WP Altitude value back to previous value if setting below ground level.
|
||||
^ resetAltitude = false : changes WP Altitude to value required to give ground clearance = default Altitude setting */
|
||||
function checkAltElevSanity(resetAltitude, checkAltitude, elevation, P3Datum) {
|
||||
if (globalSettings.mapProviderType != 'bing') {
|
||||
return checkAltitude;
|
||||
}
|
||||
|
||||
let groundClearance = "NO HOME";
|
||||
let altitude = checkAltitude;
|
||||
if (P3Datum) {
|
||||
|
|
|
@ -270,68 +270,39 @@
|
|||
<div class="helpicon cf_tip" data-i18n_title="gyro_main_lpf_hz_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hides-v2_5">
|
||||
<th>Gyro Dynamic Notch Filter</th>
|
||||
<td>
|
||||
<div style="padding-left: 1em; line-height: 28px;">
|
||||
<input type="checkbox" data-bit="5" class="feature toggle" name="DYNAMIC_FILTERS" title="DYNAMIC_FILTERS" id="feature-5">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hides-v2_5">
|
||||
<th>Gyro Dynamic Notch Width</th>
|
||||
<td>
|
||||
<input data-setting="dyn_notch_width_percent" type="number" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" title="Sets the distance in percent between dynamic gyro notches. Set to 0 to use single dynamic gyro notch."></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hides-v2_5">
|
||||
<th>Gyro Dynamic Notch Min Frequency</th>
|
||||
<td>
|
||||
<input data-setting="dyn_notch_min_hz" type="number" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" title="Minimum frequency for dynamic gyro notch filters. Value should depends on propeller size. 150Hz work fine with 5" and smaller. For 7" and above lower even below 100Hz."></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_5">
|
||||
<tr>
|
||||
<th>Matrix Gyro Filter</th>
|
||||
<td>
|
||||
<select data-setting="dynamic_gyro_notch_enabled" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="dynamic_gyro_notch_enabled_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_5">
|
||||
<tr>
|
||||
<th>Matrix Filter Min Frequency</th>
|
||||
<td>
|
||||
<input data-setting="dynamic_gyro_notch_min_hz" type="number" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" title="Minimum frequency for the Matrix Filter. Value should depends on propeller size. 150Hz work fine with 5" and smaller. For 7" and above lower even below 100Hz."></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_5">
|
||||
<tr>
|
||||
<th>Matrix Filter Q Factor</th>
|
||||
<td>
|
||||
<input data-setting="dynamic_gyro_notch_q" type="number" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" title="The higher value, the higher selectivity of the Matrix Filter. Values between 150 and 300 are recommended"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_5">
|
||||
<tr>
|
||||
<th>Unicorn Filter</th>
|
||||
<td>
|
||||
<select data-setting="setpoint_kalman_enabled" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_6">
|
||||
<tr>
|
||||
<th>Unicorn Filter Q Factor</th>
|
||||
<td>
|
||||
<input data-setting="setpoint_kalman_q" type="number" class="rate-tpa_input" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v2_6">
|
||||
<th>Unicorn Filter Window Size</th>
|
||||
<td>
|
||||
<input data-setting="setpoint_kalman_w" type="number" class="rate-tpa_input" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -379,39 +350,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="clear-both"></div>
|
||||
<div class="tab_subtitle" data-i18n="tabFilteringAdvanced" style="margin-top: 1em;"></div>
|
||||
<div class="cf_column">
|
||||
<table class="settings-table settings-table--filtering">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th data-i18n="accLpfCutoffFrequency"></th>
|
||||
<td>
|
||||
<input type="number" id="accSoftLpfHz" class="rate-tpa_input" step="1" min="0"
|
||||
max="200" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="accLpfCutoffFrequencyHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="acc_lpf_type"></th>
|
||||
<td>
|
||||
<select data-setting="acc_lpf_type" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="acc_lpf_type_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="yawLpfCutoffFrequency"></th>
|
||||
<td>
|
||||
<input type="number" id="yawLpfHz" class="rate-tpa_input" step="1" min="0" max="200" />
|
||||
Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="yawLpfCutoffFrequencyHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="subtab-mechanics" class="subtab__content">
|
||||
|
@ -420,20 +358,6 @@
|
|||
<div class="cf_column">
|
||||
<table class="settings-table settings-table--filtering">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th data-i18n="airmode_type"></th>
|
||||
<td>
|
||||
<select data-setting="airmode_type" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="airmode_type_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="airmode_throttle_threshold"></th>
|
||||
<td>
|
||||
<select data-setting="airmode_throttle_threshold" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="airmode_throttle_threshold_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="itermRelax"></th>
|
||||
<td>
|
||||
|
|
|
@ -123,14 +123,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
$('.requires-v2_4').hide();
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.5.0")) {
|
||||
$('.requires-v2_5').show();
|
||||
$('.hides-v2_5').hide();
|
||||
} else {
|
||||
$('.requires-v2_5').hide();
|
||||
$('.hides-v2_5').show();
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.6.0")) {
|
||||
$('.requires-v2_6').show();
|
||||
$('.hides-v2_6').hide();
|
||||
|
@ -161,26 +153,14 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
|
||||
pid_and_rc_to_form();
|
||||
|
||||
var $magHoldYawRate = $("#magHoldYawRate"),
|
||||
$accSoftLpfHz = $('#accSoftLpfHz'),
|
||||
$yawLpfHz = $('#yawLpfHz');
|
||||
let $magHoldYawRate = $("#magHoldYawRate");
|
||||
|
||||
$magHoldYawRate.val(INAV_PID_CONFIG.magHoldRateLimit);
|
||||
$accSoftLpfHz.val(INAV_PID_CONFIG.accSoftLpfHz);
|
||||
$yawLpfHz.val(FILTER_CONFIG.yawLpfHz);
|
||||
|
||||
$magHoldYawRate.change(function () {
|
||||
INAV_PID_CONFIG.magHoldRateLimit = parseInt($magHoldYawRate.val(), 10);
|
||||
});
|
||||
|
||||
$accSoftLpfHz.change(function () {
|
||||
INAV_PID_CONFIG.accSoftLpfHz = parseInt($accSoftLpfHz.val(), 10);
|
||||
});
|
||||
|
||||
$yawLpfHz.change(function () {
|
||||
FILTER_CONFIG.yawLpfHz = parseInt($yawLpfHz.val(), 10);
|
||||
});
|
||||
|
||||
if (!FC.isRpyFfComponentUsed()) {
|
||||
$('.rpy_ff').prop('disabled', 'disabled');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue