mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 17:25:14 +03:00
Merge branch 'iNavFlight:master' into change-profiles-with-programmin
This commit is contained in:
commit
8d4bd93673
12 changed files with 547 additions and 303 deletions
|
@ -3351,7 +3351,7 @@
|
||||||
},
|
},
|
||||||
"osdSettingPLUS_CODE_DIGITS_HELP": {
|
"osdSettingPLUS_CODE_DIGITS_HELP": {
|
||||||
"message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm."
|
"message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm."
|
||||||
},
|
},
|
||||||
"osdSettingPLUS_CODE_SHORT_HELP": {
|
"osdSettingPLUS_CODE_SHORT_HELP": {
|
||||||
"message": "Removing 2, 4 and 6 leading digits requires a reference location within, respectively, ~800km, ~40km and ~2km to recover the original coordinates."
|
"message": "Removing 2, 4 and 6 leading digits requires a reference location within, respectively, ~800km, ~40km and ~2km to recover the original coordinates."
|
||||||
},
|
},
|
||||||
|
@ -3971,7 +3971,7 @@
|
||||||
"message": "I2C Speed"
|
"message": "I2C Speed"
|
||||||
},
|
},
|
||||||
"configurationI2cSpeedHelp": {
|
"configurationI2cSpeedHelp": {
|
||||||
"message": "I2C speed should be kept at the highest level that allows for all connected devices to work. Default 400kHz is a save value and it is suggested to switch to 800kHz in case of Multirotors."
|
"message": "I2C speed should be kept at the highest level that allows for all connected devices to work. Default 400kHz is a safe value and it is suggested to switch to 800kHz in case of Multirotors."
|
||||||
},
|
},
|
||||||
"i2cSpeedSuggested800khz": {
|
"i2cSpeedSuggested800khz": {
|
||||||
"message": "Please switch to 800kHz if connected hardware allows for it"
|
"message": "Please switch to 800kHz if connected hardware allows for it"
|
||||||
|
@ -4003,6 +4003,9 @@
|
||||||
"MissionPlannerJumpTargetRemoval": {
|
"MissionPlannerJumpTargetRemoval": {
|
||||||
"message": "You can't remove a Waypoint which is defined as a JUMP target! \nYou first need to remove the target on the waypoint triggering the JUMP."
|
"message": "You can't remove a Waypoint which is defined as a JUMP target! \nYou first need to remove the target on the waypoint triggering the JUMP."
|
||||||
},
|
},
|
||||||
|
"MissionPlannerAltitudeChangeReset": {
|
||||||
|
"message": "Altitude below ground level. Change ignored"
|
||||||
|
},
|
||||||
"SafehomeSelected": {
|
"SafehomeSelected": {
|
||||||
"message": ""
|
"message": ""
|
||||||
},
|
},
|
||||||
|
|
2
js/fc.js
2
js/fc.js
|
@ -861,7 +861,7 @@ var FC = {
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
getAccelerometerNames: function () {
|
getAccelerometerNames: function () {
|
||||||
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "ICM20689", "FAKE"];
|
return [ "NONE", "AUTO", "MPU6050", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "ICM20689", "FAKE"];
|
||||||
},
|
},
|
||||||
getBarometerNames: function () {
|
getBarometerNames: function () {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.6.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "2.6.0")) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setNumber = function (data) {
|
self.setNumber = function (data) {
|
||||||
number = data;
|
number = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getLayerNumber = function () {
|
self.getLayerNumber = function () {
|
||||||
return layerNumber;
|
return layerNumber;
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setLayerNumber = function (data) {
|
self.setLayerNumber = function (data) {
|
||||||
layerNumber = data;
|
layerNumber = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getPoiNumber = function () {
|
self.getPoiNumber = function () {
|
||||||
return poiNumber;
|
return poiNumber;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setPoiNumber = function (data) {
|
self.setPoiNumber = function (data) {
|
||||||
poiNumber = data;
|
poiNumber = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.isUsed = function () {
|
self.isUsed = function () {
|
||||||
return isUsed;
|
return isUsed;
|
||||||
};
|
};
|
||||||
|
@ -39,7 +39,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setUsed = function (data) {
|
self.setUsed = function (data) {
|
||||||
isUsed = data;
|
isUsed = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.isAttached = function () {
|
self.isAttached = function () {
|
||||||
return isAttached;
|
return isAttached;
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.getLon = function () {
|
self.getLon = function () {
|
||||||
return lon;
|
return lon;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getLonMap = function () {
|
self.getLonMap = function () {
|
||||||
return lon / 10000000;
|
return lon / 10000000;
|
||||||
};
|
};
|
||||||
|
@ -63,7 +63,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.getLat = function () {
|
self.getLat = function () {
|
||||||
return lat;
|
return lat;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getLatMap = function () {
|
self.getLatMap = function () {
|
||||||
return lat / 10000000;
|
return lat / 10000000;
|
||||||
};
|
};
|
||||||
|
@ -71,55 +71,55 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setLat = function (data) {
|
self.setLat = function (data) {
|
||||||
lat = data;
|
lat = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getAction = function () {
|
self.getAction = function () {
|
||||||
return action;
|
return action;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setAction = function (data) {
|
self.setAction = function (data) {
|
||||||
action = data;
|
action = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getAlt = function () {
|
self.getAlt = function () {
|
||||||
return alt;
|
return alt;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setAlt = function (data) {
|
self.setAlt = function (data) {
|
||||||
alt = data;
|
alt = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getP1 = function () {
|
self.getP1 = function () {
|
||||||
return p1;
|
return p1;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setP1 = function (data) {
|
self.setP1 = function (data) {
|
||||||
p1 = data;
|
p1 = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getP2 = function () {
|
self.getP2 = function () {
|
||||||
return p2;
|
return p2;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setP2 = function (data) {
|
self.setP2 = function (data) {
|
||||||
p2 = data;
|
p2 = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getP3 = function () {
|
self.getP3 = function () {
|
||||||
return p3;
|
return p3;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setP3 = function (data) {
|
self.setP3 = function (data) {
|
||||||
p3 = data;
|
p3 = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getEndMission = function () {
|
self.getEndMission = function () {
|
||||||
return endMission;
|
return endMission;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setEndMission = function (data) {
|
self.setEndMission = function (data) {
|
||||||
endMission = data;
|
endMission = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getAttachedId = function () {
|
self.getAttachedId = function () {
|
||||||
return attachedId;
|
return attachedId;
|
||||||
};
|
};
|
||||||
|
@ -127,7 +127,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setAttachedId = function (data) {
|
self.setAttachedId = function (data) {
|
||||||
attachedId = data;
|
attachedId = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getAttachedNumber = function () {
|
self.getAttachedNumber = function () {
|
||||||
return attachedNumber;
|
return attachedNumber;
|
||||||
};
|
};
|
||||||
|
@ -135,16 +135,18 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
self.setAttachedNumber = function (data) {
|
self.setAttachedNumber = function (data) {
|
||||||
attachedNumber = data;
|
attachedNumber = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getElevation = async function (globalSettings) {
|
self.getElevation = async function (globalSettings) {
|
||||||
let elevation;
|
let elevation;
|
||||||
if (globalSettings.mapProviderType == 'bing') {
|
if (globalSettings.mapProviderType == 'bing') {
|
||||||
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/List?points='+self.getLatMap()+','+self.getLonMap()+'&heights=ellipsoid&key='+globalSettings.mapApiKey);
|
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "sealevel" : "ellipsoid";
|
||||||
const myJson = await response.json();
|
|
||||||
|
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/List?points='+self.getLatMap()+','+self.getLonMap()+'&heights='+elevationEarthModel+'&key='+globalSettings.mapApiKey);
|
||||||
|
const myJson = await response.json();
|
||||||
elevation = myJson.resourceSets[0].resources[0].elevations[0];
|
elevation = myJson.resourceSets[0].resources[0].elevations[0];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
elevation = "NA";
|
elevation = "N/A";
|
||||||
}
|
}
|
||||||
return elevation;
|
return elevation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ let WaypointCollection = function () {
|
||||||
countBusyPoints = 0,
|
countBusyPoints = 0,
|
||||||
version = 0,
|
version = 0,
|
||||||
center = {}
|
center = {}
|
||||||
|
|
||||||
self.getMaxWaypoints = function () {
|
self.getMaxWaypoints = function () {
|
||||||
return maxWaypoints;
|
return maxWaypoints;
|
||||||
};
|
};
|
||||||
|
@ -18,15 +18,15 @@ let WaypointCollection = function () {
|
||||||
self.setMaxWaypoints = function (data) {
|
self.setMaxWaypoints = function (data) {
|
||||||
maxWaypoints = data;
|
maxWaypoints = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getValidMission = function () {
|
self.getValidMission = function () {
|
||||||
return isValidMission;
|
return isValidMission;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setValidMission = function (data) {
|
self.setValidMission = function (data) {
|
||||||
isValidMission = data;
|
isValidMission = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCountBusyPoints = function () {
|
self.getCountBusyPoints = function () {
|
||||||
return countBusyPoints;
|
return countBusyPoints;
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ let WaypointCollection = function () {
|
||||||
self.setCountBusyPoints = function (data) {
|
self.setCountBusyPoints = function (data) {
|
||||||
countBusyPoints = data;
|
countBusyPoints = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getVersion = function () {
|
self.getVersion = function () {
|
||||||
return version;
|
return version;
|
||||||
};
|
};
|
||||||
|
@ -42,11 +42,11 @@ let WaypointCollection = function () {
|
||||||
self.setVersion = function (data) {
|
self.setVersion = function (data) {
|
||||||
version = data;
|
version = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCenter = function () {
|
self.getCenter = function () {
|
||||||
return center;
|
return center;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setCenter = function (data) {
|
self.setCenter = function (data) {
|
||||||
center = data;
|
center = data;
|
||||||
};
|
};
|
||||||
|
@ -54,11 +54,11 @@ let WaypointCollection = function () {
|
||||||
self.setCenterZoom = function (data) {
|
self.setCenterZoom = function (data) {
|
||||||
center.zoom = data;
|
center.zoom = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setCenterLon = function (data) {
|
self.setCenterLon = function (data) {
|
||||||
center.lon = data;
|
center.lon = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setCenterLat = function (data) {
|
self.setCenterLat = function (data) {
|
||||||
center.lat = data;
|
center.lat = data;
|
||||||
};
|
};
|
||||||
|
@ -70,7 +70,7 @@ let WaypointCollection = function () {
|
||||||
self.get = function () {
|
self.get = function () {
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.isEmpty = function () {
|
self.isEmpty = function () {
|
||||||
return data == [];
|
return data == [];
|
||||||
};
|
};
|
||||||
|
@ -78,7 +78,7 @@ let WaypointCollection = function () {
|
||||||
self.flush = function () {
|
self.flush = function () {
|
||||||
data = [];
|
data = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
self.reinit = function () {
|
self.reinit = function () {
|
||||||
data = [];
|
data = [];
|
||||||
maxWaypoints = 60;
|
maxWaypoints = 60;
|
||||||
|
@ -99,13 +99,13 @@ let WaypointCollection = function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.updateWaypoint = function(newWaypoint) {
|
self.updateWaypoint = function(newWaypoint) {
|
||||||
if (newWaypoint.isUsed()) {
|
if (newWaypoint.isUsed()) {
|
||||||
data[newWaypoint.getNumber()] = newWaypoint;
|
data[newWaypoint.getNumber()] = newWaypoint;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.dropWaypoint = function(newWaypoint) {
|
self.dropWaypoint = function(newWaypoint) {
|
||||||
self.getWaypoint(newWaypoint.getNumber()).setUsed(false);
|
self.getWaypoint(newWaypoint.getNumber()).setUsed(false);
|
||||||
let indexId = newWaypoint.getNumber()
|
let indexId = newWaypoint.getNumber()
|
||||||
|
@ -120,7 +120,7 @@ let WaypointCollection = function () {
|
||||||
data.splice(indexId, 1);
|
data.splice(indexId, 1);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.insertWaypoint = function (newWaypoint, indexId) {
|
self.insertWaypoint = function (newWaypoint, indexId) {
|
||||||
data.forEach(function (wp) {
|
data.forEach(function (wp) {
|
||||||
if (wp.getNumber() >= indexId) {
|
if (wp.getNumber() >= indexId) {
|
||||||
|
@ -133,7 +133,7 @@ let WaypointCollection = function () {
|
||||||
data.splice(indexId, 0, newWaypoint);
|
data.splice(indexId, 0, newWaypoint);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
self.drop = function (waypointId) {
|
self.drop = function (waypointId) {
|
||||||
self.getWaypoint(waypointId).setUsed(false);
|
self.getWaypoint(waypointId).setUsed(false);
|
||||||
var tmpData = [];
|
var tmpData = [];
|
||||||
|
@ -148,7 +148,7 @@ let WaypointCollection = function () {
|
||||||
|
|
||||||
data = tmpData;
|
data = tmpData;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.update = function (bMWPfile=false, bReverse=false) {
|
self.update = function (bMWPfile=false, bReverse=false) {
|
||||||
let oldWPNumber = 0;
|
let oldWPNumber = 0;
|
||||||
let optionIdx = 0;
|
let optionIdx = 0;
|
||||||
|
@ -167,7 +167,7 @@ let WaypointCollection = function () {
|
||||||
element.setP1(element.getP1()+1);
|
element.setP1(element.getP1()+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([MWNP.WPTYPE.JUMP,MWNP.WPTYPE.SET_HEAD,MWNP.WPTYPE.RTH].includes(element.getAction())) {
|
if ([MWNP.WPTYPE.JUMP,MWNP.WPTYPE.SET_HEAD,MWNP.WPTYPE.RTH].includes(element.getAction())) {
|
||||||
element.setAttachedId(oldWPNumber);
|
element.setAttachedId(oldWPNumber);
|
||||||
element.setAttachedNumber(optionIdx);
|
element.setAttachedNumber(optionIdx);
|
||||||
|
@ -189,7 +189,7 @@ let WaypointCollection = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getNonAttachedList = function () {
|
self.getNonAttachedList = function () {
|
||||||
let tmpData = [];
|
let tmpData = [];
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -199,8 +199,8 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
return tmpData;
|
return tmpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getAttachedList = function () {
|
self.getAttachedList = function () {
|
||||||
let tmpData = [];
|
let tmpData = [];
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -210,8 +210,8 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
return tmpData;
|
return tmpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getAttachedFromWaypoint = function (waypoint) {
|
self.getAttachedFromWaypoint = function (waypoint) {
|
||||||
let tmpData = [];
|
let tmpData = [];
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -221,8 +221,8 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
return tmpData;
|
return tmpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.addAttachedFromWaypoint = function (waypoint) {
|
self.addAttachedFromWaypoint = function (waypoint) {
|
||||||
let tmpNumber = 0;
|
let tmpNumber = 0;
|
||||||
let tmpData = self.getAttachedFromWaypoint(waypoint);
|
let tmpData = self.getAttachedFromWaypoint(waypoint);
|
||||||
|
@ -234,8 +234,8 @@ let WaypointCollection = function () {
|
||||||
tempWp.setAttachedId(waypoint.getNumber());
|
tempWp.setAttachedId(waypoint.getNumber());
|
||||||
self.insertWaypoint(tempWp, waypoint.getNumber()+tmpNumber+1);
|
self.insertWaypoint(tempWp, waypoint.getNumber()+tmpNumber+1);
|
||||||
self.update();
|
self.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
self.dropAttachedFromWaypoint = function (waypoint, waypointAttachedNumber) {
|
self.dropAttachedFromWaypoint = function (waypoint, waypointAttachedNumber) {
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
if (element.isAttached() && element.getAttachedId() == waypoint.getNumber() && element.getAttachedNumber() == waypointAttachedNumber) {
|
if (element.isAttached() && element.getAttachedId() == waypoint.getNumber() && element.getAttachedNumber() == waypointAttachedNumber) {
|
||||||
|
@ -243,9 +243,9 @@ let WaypointCollection = function () {
|
||||||
self.update();
|
self.update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.extractBuffer = function(waypointId) {
|
self.extractBuffer = function(waypointId) {
|
||||||
let buffer = [];
|
let buffer = [];
|
||||||
let waypoint = self.getWaypoint(waypointId);
|
let waypoint = self.getWaypoint(waypointId);
|
||||||
|
@ -270,10 +270,10 @@ let WaypointCollection = function () {
|
||||||
buffer.push(lowByte(waypoint.getP3())); //sbufReadU16(src); // P3
|
buffer.push(lowByte(waypoint.getP3())); //sbufReadU16(src); // P3
|
||||||
buffer.push(highByte(waypoint.getP3()));
|
buffer.push(highByte(waypoint.getP3()));
|
||||||
buffer.push(waypoint.getEndMission()); //sbufReadU8(src); // future: to set nav flag
|
buffer.push(waypoint.getEndMission()); //sbufReadU8(src); // future: to set nav flag
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.missionDisplayDebug = function() {
|
self.missionDisplayDebug = function() {
|
||||||
if (data && data.length != 0) {
|
if (data && data.length != 0) {
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -289,7 +289,7 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.copy = function(mission){
|
self.copy = function(mission){
|
||||||
mission.get().forEach(function (element) {
|
mission.get().forEach(function (element) {
|
||||||
self.put(element);
|
self.put(element);
|
||||||
|
@ -300,7 +300,7 @@ let WaypointCollection = function () {
|
||||||
self.setVersion(mission.getVersion());
|
self.setVersion(mission.getVersion());
|
||||||
self.setCenter(mission.getCenter());
|
self.setCenter(mission.getCenter());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.convertJumpNumberToWaypoint = function(jumpId) {
|
self.convertJumpNumberToWaypoint = function(jumpId) {
|
||||||
let outputNumber = 0;
|
let outputNumber = 0;
|
||||||
self.getNonAttachedList().forEach(function (element) {
|
self.getNonAttachedList().forEach(function (element) {
|
||||||
|
@ -310,7 +310,7 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
return outputNumber;
|
return outputNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.isJumpTargetAttached = function(waypoint) {
|
self.isJumpTargetAttached = function(waypoint) {
|
||||||
let lJumptTargetAttached = [];
|
let lJumptTargetAttached = [];
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -320,7 +320,7 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
return (lJumptTargetAttached.length != 0 && lJumptTargetAttached != 'undefined')
|
return (lJumptTargetAttached.length != 0 && lJumptTargetAttached != 'undefined')
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getPoiList = function() {
|
self.getPoiList = function() {
|
||||||
let poiList = [];
|
let poiList = [];
|
||||||
data.forEach(function (element) {
|
data.forEach(function (element) {
|
||||||
|
@ -330,7 +330,7 @@ let WaypointCollection = function () {
|
||||||
});
|
});
|
||||||
return poiList;
|
return poiList;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getPoint2Measure = function(reverse=false) {
|
self.getPoint2Measure = function(reverse=false) {
|
||||||
let point2measure = [];
|
let point2measure = [];
|
||||||
let altPoint2measure = [];
|
let altPoint2measure = [];
|
||||||
|
@ -383,10 +383,10 @@ let WaypointCollection = function () {
|
||||||
nStart++;
|
nStart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure];
|
return [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure];
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getDistance = function(display) {
|
self.getDistance = function(display) {
|
||||||
let lengthLine = [];
|
let lengthLine = [];
|
||||||
const [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure] = self.getPoint2Measure();
|
const [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure] = self.getPoint2Measure();
|
||||||
|
@ -394,9 +394,9 @@ let WaypointCollection = function () {
|
||||||
return [-1];
|
return [-1];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
const cumulativeSum = (sum => value => sum += value)(0);
|
const cumulativeSum = (sum => value => sum += value)(0);
|
||||||
|
|
||||||
let oldCoord = [];
|
let oldCoord = [];
|
||||||
point2measure.forEach(function (coord) {
|
point2measure.forEach(function (coord) {
|
||||||
if (oldCoord != 'undefined' && oldCoord != []) {
|
if (oldCoord != 'undefined' && oldCoord != []) {
|
||||||
|
@ -408,7 +408,7 @@ let WaypointCollection = function () {
|
||||||
return lengthLine.map(cumulativeSum);
|
return lengthLine.map(cumulativeSum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getElevation = async function(globalSettings) {
|
self.getElevation = async function(globalSettings) {
|
||||||
const [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure] = self.getPoint2Measure(true);
|
const [nLoop, point2measure, altPoint2measure, namePoint2measure, refPoint2measure] = self.getPoint2Measure(true);
|
||||||
let lengthMission = self.getDistance(true);
|
let lengthMission = self.getDistance(true);
|
||||||
|
@ -424,19 +424,21 @@ let WaypointCollection = function () {
|
||||||
samples = 1024;
|
samples = 1024;
|
||||||
}
|
}
|
||||||
if (globalSettings.mapProviderType == 'bing') {
|
if (globalSettings.mapProviderType == 'bing') {
|
||||||
|
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "sealevel" : "ellipsoid";
|
||||||
|
|
||||||
if (point2measure.length >1) {
|
if (point2measure.length >1) {
|
||||||
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/Polyline?points='+point2measure+'&heights=ellipsoid&samples='+String(samples+1)+'&key='+globalSettings.mapApiKey);
|
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/Polyline?points='+point2measure+'&heights='+elevationEarthModel+'&samples='+String(samples+1)+'&key='+globalSettings.mapApiKey);
|
||||||
const myJson = await response.json();
|
const myJson = await response.json();
|
||||||
elevation = myJson.resourceSets[0].resources[0].elevations;
|
elevation = myJson.resourceSets[0].resources[0].elevations;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/List?points='+point2measure+'&heights=ellipsoid&key='+globalSettings.mapApiKey);
|
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/List?points='+point2measure+'&heights='+elevationEarthModel+'&key='+globalSettings.mapApiKey);
|
||||||
const myJson = await response.json();
|
const myJson = await response.json();
|
||||||
elevation = myJson.resourceSets[0].resources[0].elevations;
|
elevation = myJson.resourceSets[0].resources[0].elevations;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
elevation = "NA";
|
elevation = "N/A";
|
||||||
}
|
}
|
||||||
//console.log("elevation ", elevation);
|
//console.log("elevation ", elevation);
|
||||||
return [lengthMission, totalMissionDistance, samples, elevation, altPoint2measure, namePoint2measure, refPoint2measure];
|
return [lengthMission, totalMissionDistance, samples, elevation, altPoint2measure, namePoint2measure, refPoint2measure];
|
||||||
|
|
|
@ -27,12 +27,12 @@ viewBox="0 0 850 850"
|
||||||
<polygon id="_1" class="fil1" points="435.91,470.5 416,524.05 407.87,524.05 427.82,470.5 "/>
|
<polygon id="_1" class="fil1" points="435.91,470.5 416,524.05 407.87,524.05 427.82,470.5 "/>
|
||||||
<path id="_2" class="fil1" d="M476.15 524.05l-36.3 0 0 -6.51 13.81 -13.89c4.07,-4.17 6.77,-7.12 8.11,-8.87 1.33,-1.75 2.3,-3.39 2.91,-4.93 0.62,-1.53 0.92,-3.18 0.92,-4.95 0,-2.41 -0.73,-4.32 -2.18,-5.71 -1.45,-1.39 -3.46,-2.09 -6.02,-2.09 -2.05,0 -4.04,0.38 -5.97,1.14 -1.91,0.75 -4.12,2.13 -6.65,4.1l-4.65 -5.67c2.99,-2.52 5.88,-4.29 8.69,-5.34 2.81,-1.05 5.8,-1.58 8.98,-1.58 4.97,0 8.97,1.3 11.97,3.9 3.01,2.6 4.51,6.1 4.51,10.49 0,2.43 -0.43,4.71 -1.3,6.89 -0.87,2.17 -2.2,4.41 -4,6.72 -1.8,2.3 -4.77,5.43 -8.96,9.35l-9.3 9.02 0 0.36 25.43 0 0 7.57z"/>
|
<path id="_2" class="fil1" d="M476.15 524.05l-36.3 0 0 -6.51 13.81 -13.89c4.07,-4.17 6.77,-7.12 8.11,-8.87 1.33,-1.75 2.3,-3.39 2.91,-4.93 0.62,-1.53 0.92,-3.18 0.92,-4.95 0,-2.41 -0.73,-4.32 -2.18,-5.71 -1.45,-1.39 -3.46,-2.09 -6.02,-2.09 -2.05,0 -4.04,0.38 -5.97,1.14 -1.91,0.75 -4.12,2.13 -6.65,4.1l-4.65 -5.67c2.99,-2.52 5.88,-4.29 8.69,-5.34 2.81,-1.05 5.8,-1.58 8.98,-1.58 4.97,0 8.97,1.3 11.97,3.9 3.01,2.6 4.51,6.1 4.51,10.49 0,2.43 -0.43,4.71 -1.3,6.89 -0.87,2.17 -2.2,4.41 -4,6.72 -1.8,2.3 -4.77,5.43 -8.96,9.35l-9.3 9.02 0 0.36 25.43 0 0 7.57z"/>
|
||||||
<rect class="fil0 str1" x="108.12" y="583.6" width="90" height="90"/>
|
<rect class="fil0 str1" x="108.12" y="583.6" width="90" height="90"/>
|
||||||
<path class="fil1" d="M174.4 643.67l-7.23 0 0 11.7 -8.38 0 0 -11.7 -24.48 0 0 -6.61 24.48 -35.39 8.38 0 0 34.88 7.23 0 0 7.12zm-15.61 -7.12l0 -13.45c0,-4.79 0.12,-8.7 0.36,-11.77l-0.29 0c-0.69,1.62 -1.76,3.58 -3.22,5.87l-13.3 19.35 16.45 0z"/>
|
<path class="fil1" d="M170.47 614.13c0,3.4 -0.98,6.23 -2.96,8.48 -1.99,2.26 -4.76,3.77 -8.36,4.56l0 0.29c4.3,0.54 7.52,1.87 9.67,4.01 2.15,2.14 3.23,4.99 3.23,8.53 0,5.15 -1.83,9.13 -5.46,11.92 -3.64,2.8 -8.82,4.2 -15.53,4.2 -5.94,0 -10.95,-0.96 -15.02,-2.9l0 -7.66c2.27,1.12 4.67,1.99 7.21,2.6 2.55,0.61 4.99,0.91 7.34,0.91 4.15,0 7.25,-0.77 9.3,-2.31 2.05,-1.54 3.07,-3.91 3.07,-7.14 0,-2.86 -1.12,-4.96 -3.4,-6.31 -2.27,-1.34 -5.84,-2.01 -10.7,-2.01l-4.65 0 0 -6.98 4.73 0c8.55,0 12.82,-2.95 12.82,-8.86 0,-2.3 -0.75,-4.08 -2.24,-5.33 -1.48,-1.23 -3.68,-1.86 -6.6,-1.86 -2.02,0 -3.97,0.29 -5.86,0.86 -1.87,0.58 -4.1,1.69 -6.66,3.35l-4.21 -6c4.9,-3.61 10.61,-5.41 17.1,-5.41 5.4,0 9.61,1.16 12.65,3.48 3.02,2.32 4.53,5.51 4.53,9.58z"/>
|
||||||
<path class="fil2" d="M490.19 412.07l345.42 169.55 0 -179.94 -376.74 -217.33c-18.77,-10.83 -46,-10.37 -65.03,0l-379.45 206.74 0 179.93 345.42 -158.95 130.38 0z"/>
|
<path class="fil2" d="M490.19 412.07l345.42 169.55 0 -179.94 -376.74 -217.33c-18.77,-10.83 -46,-10.37 -65.03,0l-379.45 206.74 0 179.93 345.42 -158.95 130.38 0z"/>
|
||||||
<polygon class="fil3" points="581.33,456.8 814.41,571.21 814.41,498.09 581.33,383.68 "/>
|
<polygon class="fil3" points="581.33,456.8 814.41,571.21 814.41,498.09 581.33,383.68 "/>
|
||||||
<polygon class="fil4" points="35.59,561.27 268.67,454.01 268.67,380.88 35.59,488.14 "/>
|
<polygon class="fil4" points="35.59,561.27 268.67,454.01 268.67,380.88 35.59,488.14 "/>
|
||||||
<path class="fil5" d="M404.3 385.32l0 -89.14 -28.9 0 49.6 -89.14 49.6 89.14 -28.9 0 0 89.14 -41.4 0zm0 -44.57m-14.45 -44.57m10.35 -44.57m49.6 0m10.35 44.57m-14.45 44.57m-20.7 44.57"/>
|
<path class="fil5" d="M404.3 385.32l0 -89.14 -28.9 0 49.6 -89.14 49.6 89.14 -28.9 0 0 89.14 -41.4 0zm0 -44.57m-14.45 -44.57m10.35 -44.57m49.6 0m10.35 44.57m-14.45 44.57m-20.7 44.57"/>
|
||||||
<rect class="fil0 str2" x="653.12" y="583.6" width="90" height="90"/>
|
<rect class="fil0 str2" x="653.12" y="583.6" width="90" height="90"/>
|
||||||
<path class="fil1" d="M699.34 621.92c5.4,0 9.68,1.43 12.83,4.29 3.15,2.86 4.72,6.76 4.72,11.7 0,5.71 -1.78,10.17 -5.36,13.39 -3.57,3.21 -8.66,4.82 -15.26,4.82 -5.98,0 -10.69,-0.96 -14.1,-2.9l0 -7.81c1.97,1.12 4.25,1.99 6.81,2.6 2.56,0.61 4.95,0.91 7.15,0.91 3.88,0 6.84,-0.86 8.86,-2.6 2.03,-1.72 3.04,-4.26 3.04,-7.61 0,-6.39 -4.07,-9.59 -12.23,-9.59 -1.16,0 -2.57,0.11 -4.26,0.35 -1.68,0.23 -3.16,0.49 -4.42,0.79l-3.85 -2.28 2.05 -26.16 27.84 0 0 7.65 -20.27 0 -1.2 13.25c0.85,-0.14 1.89,-0.31 3.13,-0.51 1.24,-0.19 2.75,-0.29 4.52,-0.29z"/>
|
<path class="fil1" d="M719.39 643.67l-7.22 0 0 11.7 -8.39 0 0 -11.7 -24.47 0 0 -6.61 24.47 -35.39 8.39 0 0 34.88 7.22 0 0 7.12zm-15.61 -7.12l0 -13.45c0,-4.79 0.13,-8.7 0.36,-11.77l-0.28 0c-0.69,1.62 -1.76,3.58 -3.23,5.87l-13.3 19.35 16.45 0z"/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.7 KiB |
|
@ -22,6 +22,14 @@
|
||||||
background: #37a8db;
|
background: #37a8db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-auxiliary .mode.inRange .info {
|
||||||
|
background: #104156;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.tab-auxiliary .mode.inRange:nth-child(odd) .info {
|
||||||
|
background: #104156;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-auxiliary .mode.off .info {
|
.tab-auxiliary .mode.off .info {
|
||||||
background: #828885;
|
background: #828885;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -198,6 +206,33 @@
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-auxiliary .acroEnabled {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background-color: #828885;
|
||||||
|
color: white;
|
||||||
|
font-family: 'open_sansbold', Arial, serif;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all ease 0.2s;
|
||||||
|
line-height: 28px;
|
||||||
|
position: fixed;
|
||||||
|
bottom:10px;
|
||||||
|
left:20px;
|
||||||
|
width:10%;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 25000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-auxiliary .acroEnabled.on {
|
||||||
|
background-color: #37a8db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-auxiliary .acroEnabled.off {
|
||||||
|
background-color: #828885;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) {
|
@media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) {
|
||||||
.tab-auxiliary .fixed_band {
|
.tab-auxiliary .fixed_band {
|
||||||
width: calc(100% - -30px);
|
width: calc(100% - -30px);
|
||||||
|
|
|
@ -302,7 +302,7 @@
|
||||||
.tab-mission-control .safehomesTable {
|
.tab-mission-control .safehomesTable {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 8px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-mission-control .safehomesTable input[type="text"] {
|
.tab-mission-control .safehomesTable input[type="text"] {
|
||||||
|
@ -311,7 +311,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-mission-control .safehomesTable input[type="number"] {
|
.tab-mission-control .safehomesTable input[type="number"] {
|
||||||
font-size: 8px;
|
font-size: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
@ -498,8 +498,8 @@
|
||||||
width:20px;
|
width:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-mission-control .textLegend{
|
.tab-mission-control .textLegend{
|
||||||
margin:2px;
|
margin:2px;
|
||||||
}
|
}
|
||||||
.tab-mission-control .valueLegend{
|
.tab-mission-control .valueLegend{
|
||||||
float:right;
|
float:right;
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
<a class="save" href="#" i18n="auxiliaryButtonSave"></a>
|
<a class="save" href="#" i18n="auxiliaryButtonSave"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="acroEnabled">
|
||||||
|
ACRO
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab-auxiliary-templates">
|
<div id="tab-auxiliary-templates">
|
||||||
<table class="modes">
|
<table class="modes">
|
||||||
|
|
|
@ -111,6 +111,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
$(newMode).data('index', modeIndex);
|
$(newMode).data('index', modeIndex);
|
||||||
$(newMode).data('id', modeId);
|
$(newMode).data('id', modeId);
|
||||||
$(newMode).data('origId', ORIG_AUX_CONFIG_IDS[modeIndex]);
|
$(newMode).data('origId', ORIG_AUX_CONFIG_IDS[modeIndex]);
|
||||||
|
$(newMode).data('modeName', AUX_CONFIG[modeIndex]);
|
||||||
|
|
||||||
$(newMode).find('.name').data('modeElement', newMode);
|
$(newMode).find('.name').data('modeElement', newMode);
|
||||||
$(newMode).find('a.addRange').data('modeElement', newMode);
|
$(newMode).find('a.addRange').data('modeElement', newMode);
|
||||||
|
@ -180,6 +181,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
|
|
||||||
$(rangeElement).find('a.deleteRange').click(function () {
|
$(rangeElement).find('a.deleteRange').click(function () {
|
||||||
var rangeElement = $(this).data('rangeElement');
|
var rangeElement = $(this).data('rangeElement');
|
||||||
|
modeElement.removeClass('inRange');
|
||||||
rangeElement.remove();
|
rangeElement.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -344,8 +346,19 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
|
|
||||||
function update_ui() {
|
function update_ui() {
|
||||||
let hasUsedMode = false;
|
let hasUsedMode = false;
|
||||||
|
let acroEnabled = true;
|
||||||
|
let acroFail = ["ANGLE", "HORIZON", "MANUAL", "NAV RTH", "NAV POSHOLD", "NAV CRUISE", "NAV COURSE HOLD", "NAV WP", "GCS NAV"];
|
||||||
|
|
||||||
|
var auxChannelCount = RC.active_channels - 4;
|
||||||
|
|
||||||
|
for (var i = 0; i < (auxChannelCount); i++) {
|
||||||
|
update_marker(i, RC.channels[i + 4]);
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < AUX_CONFIG.length; i++) {
|
for (var i = 0; i < AUX_CONFIG.length; i++) {
|
||||||
var modeElement = $('#mode-' + i);
|
var modeElement = $('#mode-' + i);
|
||||||
|
let inRange = false;
|
||||||
|
|
||||||
if (modeElement.find(' .range').length == 0) {
|
if (modeElement.find(' .range').length == 0) {
|
||||||
// if the mode is unused, skip it
|
// if the mode is unused, skip it
|
||||||
modeElement.removeClass('off').removeClass('on');
|
modeElement.removeClass('off').removeClass('on');
|
||||||
|
@ -353,12 +366,48 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FC.isModeBitSet(modeElement.data('origId'))) {
|
if (FC.isModeBitSet(modeElement.data('origId'))) {
|
||||||
$('.mode .name').eq(modeElement.data('index')).data('modeElement').addClass('on').removeClass('off');
|
// The flight controller can activate the mode
|
||||||
|
$('.mode .name').eq(modeElement.data('index')).data('modeElement').addClass('on').removeClass('inRange').removeClass('off');
|
||||||
|
|
||||||
|
if (jQuery.inArray(modeElement.data('modeName'), acroFail) !== -1) {
|
||||||
|
acroEnabled = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$('.mode .name').eq(modeElement.data('index')).data('modeElement').removeClass('on').addClass('off');
|
// Check to see if the mode is in range
|
||||||
|
var modeRanges = modeElement.find(' .range');
|
||||||
|
for (r = 0; r < modeRanges.length; r++) {
|
||||||
|
var rangeLow = $(modeRanges[r]).find('.lowerLimitValue').html();
|
||||||
|
var rangeHigh = $(modeRanges[r]).find('.upperLimitValue').html();
|
||||||
|
var markerPosition = $(modeRanges[r]).find('.marker')[0].style.left;
|
||||||
|
markerPosition = markerPosition.substring(0, markerPosition.length-1);
|
||||||
|
|
||||||
|
rangeLow = (rangeLow - 900) / (2100-900) * 100;
|
||||||
|
rangeHigh = (rangeHigh - 900) / (2100-900) * 100;
|
||||||
|
|
||||||
|
if ((markerPosition >= rangeLow) && (markerPosition <= rangeHigh)) {
|
||||||
|
inRange = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inRange) {
|
||||||
|
$('.mode .name').eq(modeElement.data('index')).data('modeElement').removeClass('on').addClass('inRange').removeClass('off');
|
||||||
|
|
||||||
|
if (jQuery.inArray(modeElement.data('modeName'), acroFail) !== -1) {
|
||||||
|
acroEnabled = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If not, it is shown as disabled.
|
||||||
|
$('.mode .name').eq(modeElement.data('index')).data('modeElement').removeClass('on').removeClass('inRange').addClass('off');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hasUsedMode = true;
|
hasUsedMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (acroEnabled) {
|
||||||
|
$('.acroEnabled').addClass('on').removeClass('off');
|
||||||
|
} else {
|
||||||
|
$('.acroEnabled').removeClass('on').addClass('off');
|
||||||
|
}
|
||||||
|
|
||||||
let hideUnused = hideUnusedModes && hasUsedMode;
|
let hideUnused = hideUnusedModes && hasUsedMode;
|
||||||
for (let i = 0; i < AUX_CONFIG.length; i++) {
|
for (let i = 0; i < AUX_CONFIG.length; i++) {
|
||||||
|
@ -367,11 +416,6 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
modeElement.toggle(!hideUnused);
|
modeElement.toggle(!hideUnused);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var auxChannelCount = RC.active_channels - 4;
|
|
||||||
|
|
||||||
for (var i = 0; i < (auxChannelCount); i++) {
|
|
||||||
update_marker(i, RC.channels[i + 4]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let hideUnusedModes = false;
|
let hideUnusedModes = false;
|
||||||
|
@ -391,6 +435,8 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
// enable data pulling
|
// enable data pulling
|
||||||
helper.mspBalancedInterval.add('aux_data_pull', 50, 1, get_rc_data);
|
helper.mspBalancedInterval.add('aux_data_pull', 50, 1, get_rc_data);
|
||||||
|
|
||||||
|
$(".tab-auxiliary .acroEnabled").width($("#mode-0 .info").width());
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -398,3 +444,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
TABS.auxiliary.cleanup = function (callback) {
|
TABS.auxiliary.cleanup = function (callback) {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$(window).on('resize', function(){
|
||||||
|
$(".tab-auxiliary .acroEnabled").width($("#mode-0 .info").width());
|
||||||
|
});
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="spacer" id="ActionContent">
|
<div class="spacer" id="ActionContent">
|
||||||
|
|
||||||
<div class="btn save_btn">
|
<div class="btn save_btn">
|
||||||
<a id="loadFileMissionButton" class="btnicon ic_loadFromFile" href="#" title="Load Mission File"></a>
|
<a id="loadFileMissionButton" class="btnicon ic_loadFromFile" href="#" title="Load Mission File"></a>
|
||||||
<a id="saveFileMissionButton" class="btnicon ic_save2File" href="#" title="Save Mission File"></a>
|
<a id="saveFileMissionButton" class="btnicon ic_save2File" href="#" title="Save Mission File"></a>
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="missionPlanerHome" class="gui_box grey" style="display: none">
|
<div id="missionPlanerHome" class="gui_box grey" style="display: none">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionHomeHead">Take Off home</div>
|
<div class="spacer_box_title i18n-replaced" data-i18n="missionHomeHead">Take Off home</div>
|
||||||
|
@ -102,28 +102,32 @@
|
||||||
<table class="safehomesTable">
|
<table class="safehomesTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 50px" data-i18n="SafehomeSelected"></th>
|
<th style="width: 40px" data-i18n="SafehomeSelected"></th>
|
||||||
<th style="width: 120px" data-i18n="SafehomeLon"></th>
|
<th style="width: 140px" data-i18n="SafehomeLat"></th>
|
||||||
<th style="width: 120px" data-i18n="SafehomeLat"></th>
|
<th style="width: 140px" data-i18n="SafehomeLon"></th>
|
||||||
<th style="width: 120px" data-i18n="SafehomeAlt"></th>
|
<th style="width: 100px" data-i18n="SafehomeAlt"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="homeTableBody">
|
<tbody id="homeTableBody">
|
||||||
<tr>
|
<tr>
|
||||||
<td><div id="viewHomePoint" class="btnTable btnTableIcon">
|
<td><div id="viewHomePoint" class="btnTable btnTableIcon">
|
||||||
<a class="ic_center" data-role="home-center" href="#" title="move to center view"></a>
|
<a class="ic_center" data-role="home-center" href="#" title="move to center view"></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><input type="number" class="home-lon" /></td>
|
<td><input type="number" class="home-lon" /></td>
|
||||||
<td><input type="number" class="home-lat" /></td>
|
<td><input type="number" class="home-lat" /></td>
|
||||||
<td><span id="elevationValueAtHome">NA</span></td>
|
<td><span id="elevationValueAtHome">N/A</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="point" id="elevationEarthModelclass" style="display: none">
|
||||||
|
<label class="spacer_box_title i18n-replaced" for="elevationEarthModel">Use Sea Level Earth DEM Model: </label>
|
||||||
|
<input id="elevationEarthModel" type="checkbox" value="0" class="togglemedium" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="missionPlanerSafehome" class="gui_box grey" style="display: none">
|
<div id="missionPlanerSafehome" class="gui_box grey" style="display: none">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionSafehomeHead">Safe Home manager</div>
|
<div class="spacer_box_title i18n-replaced" data-i18n="missionSafehomeHead">Safe Home manager</div>
|
||||||
|
@ -141,11 +145,11 @@
|
||||||
<table class="safehomesTable">
|
<table class="safehomesTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 80px" data-i18n="SafehomeSelected"></th>
|
<th style="width: 40px" data-i18n="SafehomeSelected"></th>
|
||||||
<th style="width: 50px" data-i18n="SafehomeId"></th>
|
<th style="width: 40px" data-i18n="SafehomeId"></th>
|
||||||
<th style="width: 80px" data-i18n="SafehomeEnabled"></th>
|
<th style="width: 60px" data-i18n="SafehomeEnabled"></th>
|
||||||
<th style="width: 120px" data-i18n="SafehomeLon"></th>
|
<th style="width: 140px" data-i18n="SafehomeLat"></th>
|
||||||
<th style="width: 120px" data-i18n="SafehomeLat"></th>
|
<th style="width: 140px" data-i18n="SafehomeLon"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="safehomesTableBody">
|
<tbody id="safehomesTableBody">
|
||||||
|
@ -215,7 +219,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="point" id="elevationAtWP" style="display: none">
|
<div class="point" id="elevationAtWP" style="display: none">
|
||||||
<label class="point-label">Elevation (m): </label>
|
<label class="point-label">Elevation (m): </label>
|
||||||
<span id="elevationValueAtWP">NA</span>
|
<span id="elevationValueAtWP">N/A</span>
|
||||||
|
</div>
|
||||||
|
<div class="point" id="groundClearanceAtWP" style="display: none">
|
||||||
|
<label class="point-label">Grd Dist (m): </label>
|
||||||
|
<span id="groundClearanceValueAtWP">N/A</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="point" id="pointP1class" style="display: none">
|
<div class="point" id="pointP1class" style="display: none">
|
||||||
<label class="point-label" for="pointP1">Parameter 1: </label>
|
<label class="point-label" for="pointP1">Parameter 1: </label>
|
||||||
|
@ -244,7 +252,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="point-radio" id="pointOptionclass" style="display: none">
|
<!-- <div class="point-radio" id="pointOptionclass" style="display: none">
|
||||||
<div class="radio-line">
|
<div class="radio-line">
|
||||||
<input type="radio" id="Options_None" name="Options" value="None" checked>
|
<input type="radio" id="Options_None" name="Options" value="None" checked>
|
||||||
|
@ -256,7 +264,7 @@
|
||||||
<input type="checkbox" id="Options_LandRTH">
|
<input type="checkbox" id="Options_LandRTH">
|
||||||
<label for="Options_LandRTH">Land after RTH</label><br>
|
<label for="Options_LandRTH">Land after RTH</label><br>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio-line">
|
<div class="radio-line">
|
||||||
<input type="radio" id="Options_JUMP" name="Options" value="JUMP">
|
<input type="radio" id="Options_JUMP" name="Options" value="JUMP">
|
||||||
<label class="radio-options" for="Options_JUMP">JUMP</label>
|
<label class="radio-options" for="Options_JUMP">JUMP</label>
|
||||||
<label for="Options_TargetJUMP">Target WP: </label>
|
<label for="Options_TargetJUMP">Target WP: </label>
|
||||||
|
@ -264,14 +272,14 @@
|
||||||
<label for="Options_NumberJUMP">Repeat: </label>
|
<label for="Options_NumberJUMP">Repeat: </label>
|
||||||
<input id="Options_NumberJUMP" type="text" value="0" required><br>
|
<input id="Options_NumberJUMP" type="text" value="0" required><br>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio-line">
|
<div class="radio-line">
|
||||||
<input type="radio" id="Options_HEAD" name="Options" value="SET_HEAD">
|
<input type="radio" id="Options_HEAD" name="Options" value="SET_HEAD">
|
||||||
<label class="radio-options" for="Options_HEAD">HEAD</label>
|
<label class="radio-options" for="Options_HEAD">HEAD</label>
|
||||||
<label for="Options_HeadingHead">Heading: </label>
|
<label for="Options_HeadingHead">Heading: </label>
|
||||||
<input id="Options_HeadingHead" type="text" value="-1" required><br>
|
<input id="Options_HeadingHead" type="text" value="-1" required><br>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2724,11 +2724,18 @@ OSD.GUI.updatePreviews = function() {
|
||||||
// consume drag/drop events.
|
// consume drag/drop events.
|
||||||
$img.find('img').css('pointer-events', 'none');
|
$img.find('img').css('pointer-events', 'none');
|
||||||
if (item && item.positionable !== false) {
|
if (item && item.positionable !== false) {
|
||||||
|
var nameKey = 'osdElement_' + item.name;
|
||||||
|
var nameMessage = chrome.i18n.getMessage(nameKey);
|
||||||
|
|
||||||
|
if (!nameMessage) {
|
||||||
|
nameMessage = inflection.titleize(item.name);
|
||||||
|
}
|
||||||
|
|
||||||
$img.addClass('field-' + item.id)
|
$img.addClass('field-' + item.id)
|
||||||
.data('item', item)
|
.data('item', item)
|
||||||
.prop('draggable', true)
|
.prop('draggable', true)
|
||||||
.on('dragstart', OSD.GUI.preview.onDragStart)
|
.on('dragstart', OSD.GUI.preview.onDragStart)
|
||||||
.prop('title', inflection.titleize(item.name));
|
.prop('title', nameMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
$row.append($img);
|
$row.append($img);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue