Merge branch 'master' into feature/uiunits
|
@ -566,7 +566,7 @@
|
|||
"message": "Settings restored to <strong>default</strong>"
|
||||
},
|
||||
"initialSetupEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Setup"
|
||||
},
|
||||
|
||||
"RX_PPM": {
|
||||
|
@ -1015,7 +1015,7 @@
|
|||
"message": "Craft name. Can be displayed by OSD and by compatible RC systems."
|
||||
},
|
||||
"configurationEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Configuration"
|
||||
},
|
||||
"configurationButtonSave": {
|
||||
"message": "Save and Reboot"
|
||||
|
@ -1222,7 +1222,7 @@
|
|||
"message": "PID data <strong>refreshed</strong>"
|
||||
},
|
||||
"pidTuningEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: PID Tuning"
|
||||
},
|
||||
|
||||
"receiverHelp": {
|
||||
|
@ -1286,7 +1286,7 @@
|
|||
"message": "RC Tuning data <strong>refreshed</strong>"
|
||||
},
|
||||
"receiverEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Receiver"
|
||||
},
|
||||
|
||||
"auxiliaryHelp": {
|
||||
|
@ -1534,9 +1534,11 @@
|
|||
"message": "Save"
|
||||
},
|
||||
"adjustmentsEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Adjustments"
|
||||
},
|
||||
"programmingEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Programming"
|
||||
},
|
||||
|
||||
"transponderNotSupported": {
|
||||
"message": "Your flight controller's firmware does not support transponder functionality."
|
||||
},
|
||||
|
@ -1562,7 +1564,7 @@
|
|||
"message": "Transponder data is <span style=\"color: red\">invalid</span>"
|
||||
},
|
||||
"transponderEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: Transponder"
|
||||
},
|
||||
"servosChangeDirection": {
|
||||
"message": "Change Direction in TX To Match"
|
||||
|
@ -2018,7 +2020,7 @@
|
|||
"message": "Save"
|
||||
},
|
||||
"ledStripEepromSaved": {
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>"
|
||||
"message": "EEPROM <span style=\"color: #37a8db\">saved</span>: LED"
|
||||
},
|
||||
|
||||
"controlAxisRoll": {
|
||||
|
@ -2498,12 +2500,21 @@
|
|||
"userControlMode": {
|
||||
"message": "User Control Mode"
|
||||
},
|
||||
"posholdDefaultSpeed": {
|
||||
"message": "Default navigation speed [cm/s]"
|
||||
},
|
||||
"posholdDefaultSpeedHelp": {
|
||||
"message": "Default speed during RTH, also used for WP navigation if no speed set for WP leg. Limited to Max. navigation speed"
|
||||
},
|
||||
"posholdMaxSpeed": {
|
||||
"message": "Max. navigation speed [cm/s]"
|
||||
},
|
||||
"posholdMaxManualSpeed": {
|
||||
"message": "Max. CRUISE speed [cm/s]"
|
||||
},
|
||||
"posholdMaxManualSpeedHelp": {
|
||||
"message": "Maximum horizonal velocity allowed for pilot manual control during POSHOLD/CRUISE mode"
|
||||
},
|
||||
"posholdMaxClimbRate": {
|
||||
"message": "Max. navigation climb rate [cm/s]"
|
||||
},
|
||||
|
@ -2804,6 +2815,12 @@
|
|||
"osd_plus_code_short": {
|
||||
"message" : "Plus Code Remove Leading Digits"
|
||||
},
|
||||
"osd_esc_rpm_precision": {
|
||||
"message": "ESC RPM precision"
|
||||
},
|
||||
"osd_esc_rpm_precision_help": {
|
||||
"message": "The number of digits shown in the RPM display. If the RPM is higher than the number of digits, it will be shown in thousand RPM with as many decimal places as allowed."
|
||||
},
|
||||
"osd_crosshairs_style": {
|
||||
"message" : "Crosshairs Style"
|
||||
},
|
||||
|
@ -3060,7 +3077,7 @@
|
|||
"message": "Shows the throttle stick position in flight modes where it controls the throttle output. On navigation modes, it shows the actual throttle value applied to the motors."
|
||||
},
|
||||
"osdElement_GPS_SPEED": {
|
||||
"message": "GPS Speed"
|
||||
"message": "Ground Speed"
|
||||
},
|
||||
"osdElement_GPS_SPEED_HELP": {
|
||||
"message": "Shows GPS ground speed."
|
||||
|
@ -3251,6 +3268,9 @@
|
|||
"osdElement_WIND_SPEED_VERTICAL_HELP": {
|
||||
"message": "Shows estimated vertical wind speed and direction (up or down)."
|
||||
},
|
||||
"osdElement_ACTIVE_PROFILE": {
|
||||
"message": "Show the active profile"
|
||||
},
|
||||
"osdElement_LEVEL_PIDS": {
|
||||
"message": "Level PIDs"
|
||||
},
|
||||
|
@ -3363,16 +3383,16 @@
|
|||
"message": "Hide unsupported elements"
|
||||
},
|
||||
"osd_dji_ESC_temp": {
|
||||
"message" : "Source of ESC Temperature"
|
||||
"message" : "Source of <i>ESC Temperature</i>"
|
||||
},
|
||||
"osd_dji_RSSI_source": {
|
||||
"message" : "Source of RSSI"
|
||||
"message" : "Source of <i>RSSI</i>"
|
||||
},
|
||||
"osd_dji_GPS_source": {
|
||||
"message" : "Source of GPS Speed"
|
||||
"message" : "Source of <i>GPS Speed</i>"
|
||||
},
|
||||
"osd_dji_speed_source": {
|
||||
"message" : "Source of 3D Speed"
|
||||
"message" : "Source of <i>3D Speed</i>"
|
||||
},
|
||||
"osd_dji_use_craft_name_elements": {
|
||||
"message" : "Use craft name for messages and additional elements.</span><br/>Elements in <span class=\"blue\">blue</span> appear in Craft Name."
|
||||
|
@ -3494,6 +3514,9 @@
|
|||
"missionSafehomeHead": {
|
||||
"message": "Safe Home manager"
|
||||
},
|
||||
"missionMultiMissionHead": {
|
||||
"message": "Multi Missions"
|
||||
},
|
||||
"missionTemplateHead": {
|
||||
"message": "Mission template"
|
||||
},
|
||||
|
@ -3512,6 +3535,15 @@
|
|||
"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!"
|
||||
},
|
||||
"confirm_multimission_file_load": {
|
||||
"message": "This is a multi mission file. Loading will over write current multi mission.\nContinue?"
|
||||
},
|
||||
"confirm_overwrite_multimission_file_load_option": {
|
||||
"message": "This will over write current multi mission.\nContinue?"
|
||||
},
|
||||
"multimission_active_index_saved_eeprom": {
|
||||
"message": "Mission active index saved"
|
||||
},
|
||||
"no_waypoints_to_load": {
|
||||
"message": "No waypoints to load !"
|
||||
},
|
||||
|
@ -3857,10 +3889,16 @@
|
|||
"fwLevelTrimMechanics": {
|
||||
"message": "Fixed Wing Level Trim"
|
||||
},
|
||||
"d_boost_factor": {
|
||||
"message": "D-Boost Factor"
|
||||
"d_boost_min": {
|
||||
"message": "D-Boost Min. Scale"
|
||||
},
|
||||
"d_boost_factor_help": {
|
||||
"d_boost_min_help": {
|
||||
"message": "Defines the max allowed Dterm attenuation during stick acceleration phase. Value 1.0 mean Dterm is not attenuate. 0.5 mean it's allowed to shrink by half. Lower values result in faster response during fast stick movement."
|
||||
},
|
||||
"d_boost_max": {
|
||||
"message": "D-Boost Max. Scale"
|
||||
},
|
||||
"d_boost_max_help": {
|
||||
"message": "Defines the maximum Dterm boost when maximum angular acceleration is reached. 1.0 means D-Boost is disabled, 2.0 means Dterm is allowed to grow by 100%. Values between 1.5 and 1.7 are usually the sweet spot."
|
||||
},
|
||||
"d_boost_max_at_acceleration": {
|
||||
|
|
50
images/icons/cf_icon_multimission_white.svg
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 141.7 141.7"
|
||||
enable-background="new 0 0 141.7 141.7"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="cf_icon_MM_white.svg"
|
||||
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs12" /><sodipodi:namedview
|
||||
id="namedview10"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
showgrid="false"
|
||||
inkscape:zoom="3.7402965"
|
||||
inkscape:cx="77.132923"
|
||||
inkscape:cy="70.983678"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="715"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g7"
|
||||
transform="rotate(-90,69.810245,71.05)">
|
||||
<g
|
||||
id="_x34_29._Network">
|
||||
<g
|
||||
id="g4">
|
||||
<path
|
||||
fill="#ffffff"
|
||||
d="M 122.4,98.3 V 77.6 c 0,-7.2 -5.9,-13.1 -13.1,-13.1 H 76.6 V 43.7 C 84.2,41 89.7,33.7 89.7,25.2 89.7,14.4 80.9,5.6 70.1,5.6 59.3,5.6 50.5,14.4 50.5,25.2 50.5,33.8 56,41 63.6,43.7 V 64.5 H 30.7 c -7.2,0 -13.1,5.9 -13.1,13.1 V 98.4 C 10,101 4.5,108.3 4.5,116.8 c 0,10.8 8.8,19.6 19.6,19.6 10.8,0 19.6,-8.8 19.6,-19.6 0,-8.5 -5.5,-15.8 -13.1,-18.5 V 77.6 h 32.7 v 20.8 c -7.6,2.7 -13.1,9.9 -13.1,18.5 0,10.8 8.8,19.6 19.6,19.6 10.8,0 19.6,-8.8 19.6,-19.6 0,-8.5 -5.5,-15.8 -13.1,-18.5 V 77.6 H 109 v 20.8 c -7.6,2.7 -13.1,9.9 -13.1,18.5 0,10.8 8.8,19.6 19.6,19.6 10.8,0 19.6,-8.8 19.6,-19.6 0.4,-8.6 -5.1,-15.9 -12.7,-18.6 z m -98.2,25.1 c -3.6,0 -6.5,-2.9 -6.5,-6.5 0,-3.6 2.9,-6.5 6.5,-6.5 3.6,0 6.5,2.9 6.5,6.5 0,3.6 -2.9,6.5 -6.5,6.5 z m 45.8,0 c -3.6,0 -6.5,-2.9 -6.5,-6.5 0,-3.6 2.9,-6.5 6.5,-6.5 3.6,0 6.5,2.9 6.5,6.5 0.1,3.6 -2.9,6.5 -6.5,6.5 z m 0,-91.7 c -3.6,0 -6.5,-2.9 -6.5,-6.6 0,-3.6 2.9,-6.5 6.5,-6.5 3.6,0 6.5,2.9 6.5,6.5 0.1,3.7 -2.9,6.6 -6.5,6.6 z m 45.8,91.7 c -3.6,0 -6.5,-2.9 -6.5,-6.5 0,-3.6 2.9,-6.5 6.5,-6.5 3.6,0 6.5,2.9 6.5,6.5 0.1,3.6 -2.8,6.5 -6.5,6.5 z"
|
||||
id="path2" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -214,7 +214,11 @@ helper.defaultsDialog = (function () {
|
|||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
key: "d_boost_min",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
key: "d_boost_max",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
|
@ -263,7 +267,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_z_p",
|
||||
value: 20
|
||||
value: 15
|
||||
},
|
||||
{
|
||||
key: "nav_fw_pos_z_d",
|
||||
|
@ -279,7 +283,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "max_angle_inclination_rll",
|
||||
value: 350
|
||||
value: 450
|
||||
},
|
||||
{
|
||||
key: "nav_fw_bank_angle",
|
||||
|
@ -291,7 +295,11 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "fw_i_pitch",
|
||||
value: 10
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "fw_d_pitch",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "fw_ff_pitch",
|
||||
|
@ -299,15 +307,19 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "fw_p_roll",
|
||||
value: 10
|
||||
value: 15
|
||||
},
|
||||
{
|
||||
key: "fw_i_roll",
|
||||
value: 8
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
key: "fw_d_roll",
|
||||
value: 7
|
||||
},
|
||||
{
|
||||
key: "fw_ff_roll",
|
||||
value: 40
|
||||
value: 50
|
||||
},
|
||||
{
|
||||
key: "fw_p_yaw",
|
||||
|
@ -315,7 +327,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "fw_i_yaw",
|
||||
value: 5
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
key: "fw_ff_yaw",
|
||||
|
@ -355,7 +367,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "nav_wp_radius",
|
||||
value: 1500
|
||||
value: 5000
|
||||
},
|
||||
],
|
||||
"features": [
|
||||
|
@ -392,7 +404,11 @@ helper.defaultsDialog = (function () {
|
|||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
key: "d_boost_min",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
key: "d_boost_max",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
|
@ -441,7 +457,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_z_p",
|
||||
value: 20
|
||||
value: 15
|
||||
},
|
||||
{
|
||||
key: "nav_fw_pos_z_d",
|
||||
|
@ -457,7 +473,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "max_angle_inclination_rll",
|
||||
value: 450
|
||||
value: 550
|
||||
},
|
||||
{
|
||||
key: "nav_fw_bank_angle",
|
||||
|
@ -465,11 +481,15 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "fw_p_pitch",
|
||||
value: 10
|
||||
value: 15
|
||||
},
|
||||
{
|
||||
key: "fw_i_pitch",
|
||||
value: 15
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "fw_d_pitch",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "fw_ff_pitch",
|
||||
|
@ -477,15 +497,15 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "fw_p_roll",
|
||||
value: 5
|
||||
value: 15
|
||||
},
|
||||
{
|
||||
key: "fw_i_roll",
|
||||
value: 8
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
key: "fw_ff_roll",
|
||||
value: 35
|
||||
value: 50
|
||||
},
|
||||
{
|
||||
key: "imu_acc_ignore_rate",
|
||||
|
@ -521,7 +541,7 @@ helper.defaultsDialog = (function () {
|
|||
},
|
||||
{
|
||||
key: "nav_wp_radius",
|
||||
value: 1500
|
||||
value: 5000
|
||||
},
|
||||
],
|
||||
"features": [
|
||||
|
|
13
js/fc.js
|
@ -1243,6 +1243,17 @@ var FC = {
|
|||
hasOperand: [true, true],
|
||||
output: "boolean"
|
||||
},
|
||||
|
||||
41: {
|
||||
name: "LOITER RADIUS OVERRIDE",
|
||||
hasOperand: [true, false],
|
||||
output: "boolean"
|
||||
},
|
||||
42: {
|
||||
name: "SET PROFILE",
|
||||
hasOperand: [true, false],
|
||||
output: "boolean"
|
||||
},
|
||||
}
|
||||
},
|
||||
getOperandTypes: function () {
|
||||
|
@ -1301,6 +1312,8 @@ var FC = {
|
|||
32: "CRSF LQ",
|
||||
33: "CRSF SNR",
|
||||
34: "GPS Valid Fix",
|
||||
35: "Loiter Radius [cm]",
|
||||
36: "Active Profile",
|
||||
}
|
||||
},
|
||||
3: {
|
||||
|
|
|
@ -455,7 +455,8 @@ var mspHelper = (function (gui) {
|
|||
data.getInt32(10, true),
|
||||
data.getInt16(14, true),
|
||||
data.getInt16(16, true),
|
||||
data.getInt16(18, true)
|
||||
data.getInt16(18, true),
|
||||
data.getUint8(20)
|
||||
));
|
||||
break;
|
||||
case MSPCodes.MSP_BOXIDS:
|
||||
|
@ -2988,32 +2989,30 @@ var mspHelper = (function (gui) {
|
|||
|
||||
self.loadWaypoints = function (callback) {
|
||||
MISSION_PLANER.reinit();
|
||||
let waypointId = 1;
|
||||
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, getFirstWP);
|
||||
let waypointId = 0;
|
||||
let startTime = new Date().getTime();
|
||||
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, loadWaypoint);
|
||||
|
||||
function getFirstWP() {
|
||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint)
|
||||
};
|
||||
|
||||
function nextWaypoint() {
|
||||
function loadWaypoint() {
|
||||
waypointId++;
|
||||
if (waypointId < MISSION_PLANER.getCountBusyPoints()) {
|
||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint);
|
||||
}
|
||||
else {
|
||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, loadWaypoint);
|
||||
} else {
|
||||
GUI.log('Receive time: ' + (new Date().getTime() - startTime) + 'ms');
|
||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, callback);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
self.saveWaypoints = function (callback) {
|
||||
let waypointId = 1;
|
||||
MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, nextWaypoint)
|
||||
let waypointId = 0;
|
||||
let startTime = new Date().getTime();
|
||||
sendWaypoint();
|
||||
|
||||
function nextWaypoint() {
|
||||
function sendWaypoint() {
|
||||
waypointId++;
|
||||
if (waypointId < MISSION_PLANER.get().length) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, nextWaypoint);
|
||||
MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, sendWaypoint);
|
||||
}
|
||||
else {
|
||||
MSP.send_message(MSPCodes.MSP_SET_WP, MISSION_PLANER.extractBuffer(waypointId), false, endMission);
|
||||
|
@ -3021,6 +3020,7 @@ var mspHelper = (function (gui) {
|
|||
};
|
||||
|
||||
function endMission() {
|
||||
GUI.log('Send time: ' + (new Date().getTime() - startTime) + 'ms');
|
||||
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, callback);
|
||||
}
|
||||
};
|
||||
|
@ -3208,9 +3208,9 @@ var mspHelper = (function (gui) {
|
|||
});
|
||||
};
|
||||
|
||||
self.setSetting = function (name, value) {
|
||||
self.setSetting = function (name, value, callback) {
|
||||
this.encodeSetting(name, value).then(function (data) {
|
||||
return MSP.promise(MSPCodes.MSPV2_SET_SETTING, data);
|
||||
return MSP.promise(MSPCodes.MSPV2_SET_SETTING, data).then(callback);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ let WaypointCollection = function () {
|
|||
};
|
||||
|
||||
self.isEmpty = function () {
|
||||
return data == [];
|
||||
return data.length == 0;
|
||||
};
|
||||
|
||||
self.flush = function () {
|
||||
|
@ -149,7 +149,7 @@ let WaypointCollection = function () {
|
|||
data = tmpData;
|
||||
};
|
||||
|
||||
self.update = function (bMWPfile=false, bReverse=false) {
|
||||
self.update = function (updateEndFlag = true, bMWPfile=false, bReverse=false) {
|
||||
let oldWPNumber = 0;
|
||||
let optionIdx = 0;
|
||||
let idx = 0;
|
||||
|
@ -180,13 +180,17 @@ let WaypointCollection = function () {
|
|||
optionIdx = 0;
|
||||
idx++;
|
||||
}
|
||||
if (element.getNumber() == ((bMWPfile && bReverse) ? self.get().length : self.get().length-1)) {
|
||||
|
||||
/* only update EndMission flag when required and only if single mission loaded on map */
|
||||
if (updateEndFlag) {
|
||||
if (element.getNumber() == self.get().length - 1) {
|
||||
element.setEndMission(0xA5);
|
||||
}
|
||||
else {
|
||||
else if ((element.getNumber() == self.get().length - 2) && element.getEndMission() == 0xA5) {
|
||||
element.setEndMission(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -13250,48 +13250,48 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
resources/osd/bold/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13253,48 +13253,48 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
resources/osd/clarity/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13256,48 +13256,48 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
resources/osd/clarity_medium/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13250,48 +13250,48 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
resources/osd/default/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -125,6 +125,7 @@ SYM_HEADING_W | SYM.HEADING_W | Heading graph West
|
|||
SYM_HEADING_DIVIDED_LINE | SYM.HEADING_DIVIDED_LINE | Heading graphic | 204 | 0xCC
|
||||
SYM_HEADING_LINE | SYM.HEADING_LINE | Heading graphic | 205 | 0xCD
|
||||
SYM_MAX | SYM.MAX | Max icon | 206 | 0xCE
|
||||
SYM_PROFILE | SYM.PROFILE | Profile icon | 207 | 0xCF
|
||||
| | | |
|
||||
SYM_LOGO_START | | INAV Logo | 257 - 280 | 0x101 - 0x118
|
||||
SYM_AH_LEFT | SYM.AH_LEFT | AHI Arrow left | 300 | 0x12C
|
||||
|
|
|
@ -13250,51 +13250,51 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01000000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
00101010
|
||||
10100000
|
||||
00000001
|
||||
00000000
|
||||
00001010
|
||||
10101000
|
||||
00101010
|
||||
10100000
|
||||
00000000
|
||||
00000000
|
||||
00001010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
00101010
|
||||
00000010
|
||||
10101000
|
||||
00101010
|
||||
00101000
|
||||
10101000
|
||||
00101010
|
||||
00101000
|
||||
10101000
|
||||
00101010
|
||||
00000010
|
||||
10101000
|
||||
00101010
|
||||
00101010
|
||||
10101000
|
||||
00101010
|
||||
00101010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
resources/osd/impact/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13247,51 +13247,51 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01000000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
00101010
|
||||
10100000
|
||||
00000001
|
||||
00000000
|
||||
00001010
|
||||
10101000
|
||||
00101010
|
||||
10100000
|
||||
00000000
|
||||
00000000
|
||||
00001010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
00101010
|
||||
00000010
|
||||
10101000
|
||||
00101010
|
||||
00101000
|
||||
10101000
|
||||
00101010
|
||||
00101000
|
||||
10101000
|
||||
00101010
|
||||
00000010
|
||||
10101000
|
||||
00101010
|
||||
00101010
|
||||
10101000
|
||||
00101010
|
||||
00101010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
resources/osd/impact_mini/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13250,51 +13250,51 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00100101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
resources/osd/large/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -13253,48 +13253,48 @@ MAX7456
|
|||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010000
|
||||
00000101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
01001010
|
||||
10100000
|
||||
00000101
|
||||
00100000
|
||||
00001010
|
||||
10100001
|
||||
00101010
|
||||
10100101
|
||||
01011000
|
||||
00100101
|
||||
00000001
|
||||
01011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10000010
|
||||
00011000
|
||||
00100100
|
||||
10101000
|
||||
01011000
|
||||
00100100
|
||||
10000001
|
||||
01011000
|
||||
00100100
|
||||
10000101
|
||||
01011000
|
||||
00100101
|
||||
00010101
|
||||
01011000
|
||||
00101010
|
||||
10101010
|
||||
10101000
|
||||
01000000
|
||||
00000000
|
||||
00000001
|
||||
01010101
|
||||
01010101
|
||||
01010101
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
resources/osd/vision/207.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -61,6 +61,10 @@
|
|||
background-image: url(../images/icons/cf_icon_MP_removeAll_grey.svg);
|
||||
}
|
||||
|
||||
.tab-mission-control .ic_openMultimission {
|
||||
background-image: url(../images/icons/cf_icon_multimission_white.svg);
|
||||
}
|
||||
|
||||
.tab-mission-control .ic_save {
|
||||
background-image: url(../images/icons/cf_icon_MP_save_grey.svg);
|
||||
}
|
||||
|
@ -93,6 +97,10 @@
|
|||
background-image: url(../images/icons/cf_icon_MP_center_grey.svg);
|
||||
}
|
||||
|
||||
.tab-mission-control .ic_setup {
|
||||
background-image: url(../images/icons/cf_icon_setup_white.svg);
|
||||
}
|
||||
|
||||
.tab-mission-control .btnicon {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
@ -277,21 +285,31 @@
|
|||
.ol-touch .mission-control-settings {
|
||||
top: 80px;
|
||||
}
|
||||
.mission-control-safehome {
|
||||
top: 115px;
|
||||
left: .5em;
|
||||
}
|
||||
.ol-touch .mission-control-safehome {
|
||||
top: 120px;
|
||||
}
|
||||
|
||||
.mission-control-elevation {
|
||||
.mission-control-multimission {
|
||||
top: 90px;
|
||||
left: .5em;
|
||||
}
|
||||
.ol-touch .mission-control-elevation {
|
||||
.ol-touch .mission-control-multimission {
|
||||
top: 100px;
|
||||
}
|
||||
|
||||
.mission-control-elevation {
|
||||
top: 115px;
|
||||
left: .5em;
|
||||
}
|
||||
.ol-touch .mission-control-elevation {
|
||||
top: 120px;
|
||||
}
|
||||
|
||||
.mission-control-safehome {
|
||||
top: 140px;
|
||||
left: .5em;
|
||||
}
|
||||
.ol-touch .mission-control-safehome {
|
||||
top: 140px;
|
||||
}
|
||||
|
||||
.mission-control-template {
|
||||
top: 140px;
|
||||
left: .5em;
|
||||
|
|
|
@ -86,7 +86,6 @@
|
|||
<option value="19" i18n="adjustmentsFunction19"></option>
|
||||
<option value="20" i18n="adjustmentsFunction20"></option>
|
||||
<option value="21" i18n="adjustmentsFunction21"></option>
|
||||
<option value="22" i18n="adjustmentsFunction22"></option>
|
||||
<option value="23" i18n="adjustmentsFunction23"></option>
|
||||
<option value="24" i18n="adjustmentsFunction24"></option>
|
||||
<option value="25" i18n="adjustmentsFunction25"></option>
|
||||
|
|
|
@ -219,9 +219,19 @@
|
|||
<input id="max-speed" data-unit="cms" type="number" data-setting="nav_auto_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
|
||||
<label for="max-speed"><span data-i18n="posholdMaxSpeed"></span></label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<input id="default-auto-speed" type="number" data-setting="nav_auto_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
|
||||
<label for="default-auto-speed"><span data-i18n="posholdDefaultSpeed"></span></label>
|
||||
<div class="helpicon cf_tip" data-i18n_title="posholdDefaultSpeedHelp"></div>
|
||||
</div>
|
||||
<div class="number">
|
||||
<input id="max-auto-speed" type="number" data-setting="nav_max_auto_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
|
||||
<label for="max-auto-speed"><span data-i18n="posholdMaxSpeed"></span></label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<input id="max-manual-speed" data-unit="cms" type="number" data-setting="nav_manual_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
|
||||
<label for="max-manual-speed"><span data-i18n="posholdMaxManualSpeed"></span></label>
|
||||
<div class="helpicon cf_tip" data-i18n_title="posholdMaxManualSpeedHelp"></div>
|
||||
</div>
|
||||
<div class="number">
|
||||
<input id="max-bank-angle" type="number" data-setting="nav_mc_bank_angle" data-setting-multiplier="1" step="1" min="15" max="45" />
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="missionPlanerTotalInfo" class="gui_box grey">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionTotalInformationHead">Total information</div>
|
||||
|
@ -63,6 +64,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="missionPlanerSettings" class="gui_box grey" style="display: none">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionDefaultSettingsHead">Default settings</div>
|
||||
|
@ -87,6 +89,46 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="missionPlannerMultiMission" class="gui_box grey" style="display: none">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionMultiMissionHead">Multi Missions</div>
|
||||
<div class="btnMenu btnMenuIcon save_btn">
|
||||
<div id="showHideMultimissionButton">
|
||||
<a class="ic_hide" href="#" title="Hide"></a>
|
||||
</div>
|
||||
<a id="cancelMultimission" class="ic_cancel" href="#" title="Cancel"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer" id="multimissionContent">
|
||||
<div class="btn btnTable btnTableIcon save_btn">
|
||||
<div>
|
||||
<span>Missions Info:</span>
|
||||
<span id="multimissionInfo">None</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px">
|
||||
<span>Active Mission:</span>
|
||||
<span id="activeNissionIndex">1</span>
|
||||
<a class="ic_save disabled" id="setActiveMissionButton" href="#" title="Set Active"></a>
|
||||
</div>
|
||||
<hr>
|
||||
<div style="display: inline-block">
|
||||
<label for="multimissionOptionList">Mission No.</label>
|
||||
<select name="Number" id="multimissionOptionList" style="width: 50px">
|
||||
<option value="0">ALL</option>
|
||||
</select>
|
||||
<div style="float: right">
|
||||
<span>Update All</span>
|
||||
<a class="ic_save disabled" id="updateMultimissionButton" href="#" title="Update All"></a>
|
||||
</div>
|
||||
<div style="margin-bottom: 5px; margin-top: 5px">
|
||||
<label for="addMultimissionButton">Add New Mission</label>
|
||||
<a class="ic_add disabled" id="addMultimissionButton" href="#" title="Add"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="missionPlanerHome" class="gui_box grey" style="display: none">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionHomeHead">Take Off home</div>
|
||||
|
@ -180,8 +222,11 @@
|
|||
<div id="showHideWPeditButton" class="save_btn">
|
||||
<a class="ic_hide" href="#" title="Hide"></a>
|
||||
</div>
|
||||
<div id="removePoint" class="btnMenu-danger">
|
||||
<a class="ic_removeAll" href="#" title="Remove"></a>
|
||||
<div id="removePoint" class="btn btnMenu-danger">
|
||||
<a id="removePointButton" class="ic_removeAll" href="#" title="Remove"></a>
|
||||
</div>
|
||||
<div id="editMission" class="save_btn" style="display: none">
|
||||
<a id="editMissionButton" class="ic_setup" href="#" title="Edit Mission"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -238,8 +283,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px">
|
||||
<div id="addOptionsPoint" class="btnTable btnTableIcon btnTable-success">
|
||||
<a class="ic_add" data-role="waypointOptions-add" href="#" style="float: center" title="Add"></a>
|
||||
<div id="addOptionsPoint" class="btn btnTable btnTableIcon btnTable-success">
|
||||
<a id="addOptionsPointButton" class="ic_add" data-role="waypointOptions-add" href="#" style="float: center" title="Add"></a>
|
||||
</div>
|
||||
</th>
|
||||
<th style="width: 50px" data-i18n="WaypointOptionId"></th>
|
||||
|
|
|
@ -357,6 +357,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
var selectedMarker = null;
|
||||
var selectedFeature = null;
|
||||
var tempMarker = null;
|
||||
var disableMarkerEdit = false;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define & init parameters for default Settings
|
||||
|
@ -379,11 +380,19 @@ TABS.mission_control.initialize = function (callback) {
|
|||
vMaxDistSH = 0;
|
||||
settings = { speed: 0, alt: 5000, safeRadiusSH : 50, maxDistSH : vMaxDistSH};
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define & init Waypoints parameters
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
var mission = new WaypointCollection();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define & init Multi Mission parameters
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
var multimission = new WaypointCollection();
|
||||
var multimissionCount = 0;
|
||||
var maxMultimissionCount = 9;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define & init home parameters
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -481,7 +490,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
|
||||
const $row = $safehomesTableBody.find('tr:last');
|
||||
|
||||
|
||||
$row.find(".safehome-number").text(safehome.getNumber()+1);
|
||||
|
||||
$row.find(".safehome-enabled-value").prop('checked',safehome.isUsed()).change(function () {
|
||||
|
@ -734,6 +742,240 @@ TABS.mission_control.initialize = function (callback) {
|
|||
renderHomeOnMap();
|
||||
plotElevation();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
// Manage Multi Mission
|
||||
//
|
||||
/////////////////////////////////////////////
|
||||
/* Multi Mission working method:
|
||||
* 'multimission' waypoint collection is a repository for all multi missions.
|
||||
* 'mission' WP collection remains as the WP source for the map display.
|
||||
* All missions can be displayed on the map or only a single mission. With all missions displayed 'mission' and
|
||||
* 'multimission' are copies containing all missions. When a single mission is displayed 'multimission' contains all
|
||||
* missions except the currently displayed mission.
|
||||
* On update to display all missions the current dislayed mission is merged back into 'multimission' and 'mission'
|
||||
* updated as a copy of 'multimission'.
|
||||
* When all missions are displayed WP data can be viewed but mission edit is disabled.
|
||||
* Mission WPs can be edited only when a single mission is loaded on the map. */
|
||||
|
||||
var startWPCount = 0;
|
||||
|
||||
function renderMultimissionTable() {
|
||||
$('#multimissionOptionList').prop('options').length = 1;
|
||||
for (var i = 1; i <= multimissionCount; i++) {
|
||||
$('#multimissionOptionList').append($('<option>', {value: i, text: i}));
|
||||
}
|
||||
updateMultimissionState();
|
||||
$('#activeNissionIndex').text(1);
|
||||
}
|
||||
|
||||
function updateMultimissionState() {
|
||||
setMultimissionEditControl(false);
|
||||
if (!mission.isEmpty() || multimissionCount) {
|
||||
if ((!multimissionCount || (multimissionCount && !mission.isEmpty())) && multimissionCount < maxMultimissionCount) {
|
||||
$("#addMultimissionButton").removeClass('disabled');
|
||||
} else {
|
||||
$("#addMultimissionButton").addClass('disabled');
|
||||
}
|
||||
if (multimissionCount) {
|
||||
let totalmultimissionWPs;
|
||||
if (singleMissionActive()) {
|
||||
totalmultimissionWPs = multimission.get().length + mission.get().length;
|
||||
$("#updateMultimissionButton").removeClass('disabled');
|
||||
$("#setActiveMissionButton").removeClass('disabled');
|
||||
} else {
|
||||
$('#missionDistance').text('N/A');
|
||||
totalmultimissionWPs = mission.get().length;
|
||||
$("#editMission").show();
|
||||
$("#updateMultimissionButton").addClass('disabled');
|
||||
$("#setActiveMissionButton").addClass('disabled');
|
||||
setMultimissionEditControl(true);
|
||||
}
|
||||
$('#multimissionInfo').text(multimissionCount + ' missions (' + totalmultimissionWPs + '/' + mission.getMaxWaypoints() + ' WPs)');
|
||||
document.getElementById('multimissionInfo').style.color = totalmultimissionWPs > mission.getMaxWaypoints() ? "#FF0000" : "#303030";
|
||||
} else {
|
||||
$('#cancelMultimission').trigger('click');
|
||||
$('#multimissionInfo').text('No multi missions loaded');
|
||||
$("#updateMultimissionButton").addClass('disabled');
|
||||
$("#setActiveMissionButton").addClass('disabled');
|
||||
}
|
||||
} else {
|
||||
$("#addMultimissionButton").addClass('disabled');
|
||||
$("#setActiveMissionButton").addClass('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
// /* checks if single mission loaded on map */
|
||||
function singleMissionActive() {
|
||||
return !multimissionCount || Number($('#multimissionOptionList').val());
|
||||
}
|
||||
|
||||
function updateAllMultimission(missionDelete = false, newMission = false) {
|
||||
// flag if new MM mission empty on update
|
||||
let missionIsEmptyOnUpdate = mission.isEmpty() ? true : false;
|
||||
|
||||
/* copy active single mission into MM on update so MM contains all missions.
|
||||
* active mission may be deleted by not copying back into MM on update */
|
||||
var i = startWPCount;
|
||||
if (!missionDelete) {
|
||||
mission.get().forEach(function (element) {
|
||||
multimission.get().splice(i, 0, element);
|
||||
i++;
|
||||
});
|
||||
}
|
||||
|
||||
i = 0;
|
||||
multimission.get().forEach(function (element) { // renumber MM WPs
|
||||
element.setNumber(i);
|
||||
i++;
|
||||
});
|
||||
multimission.update(false);
|
||||
// multimission.missionDisplayDebug();
|
||||
|
||||
// if new mission added no need to redraw so return
|
||||
if (newMission) return;
|
||||
|
||||
mission.reinit();
|
||||
mission.copy(multimission);
|
||||
mission.update(false);
|
||||
// mission.missionDisplayDebug();
|
||||
|
||||
/* Remove empty missions on update.
|
||||
* Cancel MM if only 2 MM missions loaded and one mission is empty */
|
||||
if (missionIsEmptyOnUpdate) {
|
||||
multimissionCount -= multimissionCount == 2 ? 2 : 1;
|
||||
if (!multimissionCount) {
|
||||
multimissionCount = 0;
|
||||
multimission.flush();
|
||||
}
|
||||
renderMultimissionTable();
|
||||
}
|
||||
|
||||
selectedMarker = null;
|
||||
clearEditForm();
|
||||
setView(14);
|
||||
refreshLayers();
|
||||
updateTotalInfo();
|
||||
}
|
||||
|
||||
/* selects single mission from MM repository */
|
||||
function editMultimission() {
|
||||
var MMCount = 0;
|
||||
var endWPCount = 0;
|
||||
var found = false;
|
||||
startWPCount = 0;
|
||||
|
||||
mission.get().forEach(function (element) {
|
||||
if (element.getEndMission() == 0xA5 && !found) {
|
||||
MMCount ++;
|
||||
endWPCount = element.getNumber();
|
||||
if (MMCount == Number($('#multimissionOptionList').val())) {
|
||||
found = true;
|
||||
} else {
|
||||
startWPCount = endWPCount + 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mission.reinit();
|
||||
tempMissionData = multimission.get().slice(startWPCount, endWPCount + 1); // copy selected single mission from MM
|
||||
let i = 0;
|
||||
tempMissionData.forEach(function (element) { // write mission copy to active map mission
|
||||
mission.put(element);
|
||||
mission.get()[i].setNumber(i);
|
||||
i++;
|
||||
});
|
||||
multimission.get().splice(startWPCount, (endWPCount - startWPCount + 1)) // cut current active map mission from MM
|
||||
|
||||
mission.update();
|
||||
selectedMarker = null;
|
||||
clearEditForm();
|
||||
setView(14);
|
||||
refreshLayers();
|
||||
updateTotalInfo();
|
||||
}
|
||||
|
||||
/* single mission selection using WP Edit panel button */
|
||||
function mapSelectEditMultimission(WPNumber) {
|
||||
let MMCount = 1;
|
||||
|
||||
mission.get().forEach(function (element) {
|
||||
if (element.getEndMission() == 0xA5 && element.getNumber() < WPNumber) {
|
||||
MMCount ++;
|
||||
}
|
||||
});
|
||||
$('#multimissionOptionList').val(MMCount).change();
|
||||
}
|
||||
|
||||
function deleteMultimission() {
|
||||
updateAllMultimission(true);
|
||||
multimissionCount -= multimissionCount == 2 ? 2 : 1;
|
||||
if (!multimissionCount) {
|
||||
multimission.flush();
|
||||
}
|
||||
renderMultimissionTable();
|
||||
}
|
||||
|
||||
function addMultimission() {
|
||||
if (singleMissionActive() || !multimissionCount) {
|
||||
updateAllMultimission(false, true);
|
||||
}
|
||||
multimissionCount += !multimissionCount ? 2 : 1;
|
||||
renderMultimissionTable();
|
||||
$('#multimissionOptionList').val(multimissionCount);
|
||||
|
||||
removeAllWaypoints();
|
||||
startWPCount = multimission.get().length;
|
||||
|
||||
updateMultimissionState();
|
||||
}
|
||||
|
||||
function removeAllMultiMissionCheck() {
|
||||
if (!multimissionCount) {
|
||||
return true;
|
||||
} else if (singleMissionActive()) {
|
||||
deleteMultimission();
|
||||
return false;
|
||||
}
|
||||
|
||||
multimissionCount = 0;
|
||||
multimission.flush();
|
||||
renderMultimissionTable();
|
||||
return true;
|
||||
}
|
||||
|
||||
function fileLoadMultiMissionCheck() {
|
||||
if (singleMissionActive()) {
|
||||
return true;
|
||||
} else if (confirm(chrome.i18n.getMessage('confirm_overwrite_multimission_file_load_option'))) {
|
||||
nwdialog.setContext(document);
|
||||
nwdialog.openFileDialog(function(result) {
|
||||
loadMissionFile(result);
|
||||
multimissionCount = 0;
|
||||
multimission.flush();
|
||||
renderMultimissionTable();
|
||||
})
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* disable mission/WP edit when all missions displayed on map, true = edit disabled */
|
||||
function setMultimissionEditControl(enabled = true) {
|
||||
disableMarkerEdit = enabled;
|
||||
$("*", "#MPeditPoint").prop('disabled',enabled);
|
||||
if (enabled) {
|
||||
$("#addOptionsPointButton").addClass('disabled');
|
||||
$("#removePointButton").addClass('disabled');
|
||||
$("#waypointOptionsTableBody").fadeOut();
|
||||
} else {
|
||||
$("#addOptionsPointButton").removeClass('disabled');
|
||||
$("#removePointButton").removeClass('disabled');
|
||||
$("#waypointOptionsTableBody").fadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
// Manage Waypoint
|
||||
|
@ -742,7 +984,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
|
||||
function removeAllWaypoints() {
|
||||
mission.reinit();
|
||||
cleanLayers();
|
||||
refreshLayers();
|
||||
clearEditForm();
|
||||
updateTotalInfo();
|
||||
clearFilename();
|
||||
|
@ -811,7 +1053,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
let oldPos,
|
||||
oldAction,
|
||||
poiList = [],
|
||||
oldHeading;
|
||||
oldHeading,
|
||||
multiMissionWPNum = 0;
|
||||
let activatePoi = false;
|
||||
let activateHead = false;
|
||||
$('#missionDistance').text(0);
|
||||
|
@ -843,12 +1086,21 @@ TABS.mission_control.initialize = function (callback) {
|
|||
else if (typeof oldPos !== 'undefined' && activatePoi != true && activateHead == true) {
|
||||
paintLine(oldPos, coord, element.getNumber(), color='#1497f1', lineDash=0, lineText=String(oldHeading)+"°");
|
||||
}
|
||||
|
||||
if (element.getEndMission() == 0xA5) {
|
||||
oldPos = 'undefined';
|
||||
activatePoi = false;
|
||||
activateHead = false;
|
||||
multiMissionWPNum = element.getNumber() + 1;
|
||||
} else {
|
||||
oldPos = coord;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (element.isAttached()) {
|
||||
if (element.getAction() == MWNP.WPTYPE.JUMP) {
|
||||
let coord = ol.proj.fromLonLat([mission.getWaypoint(element.getP1()).getLonMap(), mission.getWaypoint(element.getP1()).getLatMap()]);
|
||||
let jumpWPIndex = multiMissionWPNum + element.getP1();
|
||||
let coord = ol.proj.fromLonLat([mission.getWaypoint(jumpWPIndex).getLonMap(), mission.getWaypoint(jumpWPIndex).getLatMap()]);
|
||||
paintLine(oldPos, coord, element.getNumber(), color='#e935d6', lineDash=5, lineText="Repeat x"+(element.getP2() == -1 ? " infinite" : String(element.getP2())), selection=false, arrow=true);
|
||||
}
|
||||
// If classic WPs is defined with a heading = -1, change Boolean for POI to false. If it is defined with a value different from -1, activate Heading boolean
|
||||
|
@ -864,6 +1116,13 @@ TABS.mission_control.initialize = function (callback) {
|
|||
oldHeading = String(element.getP1());
|
||||
}
|
||||
}
|
||||
|
||||
if (element.getEndMission() == 0xA5) {
|
||||
oldPos = 'undefined';
|
||||
activatePoi = false;
|
||||
activateHead = false;
|
||||
multiMissionWPNum = element.getNumber() + 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
//reset text position
|
||||
|
@ -871,8 +1130,13 @@ TABS.mission_control.initialize = function (callback) {
|
|||
textGeom.setCoordinates(map.getCoordinateFromPixel([0,0]));
|
||||
}
|
||||
let lengthMission = mission.getDistance(true);
|
||||
|
||||
if (disableMarkerEdit) {
|
||||
$('#missionDistance').text('N/A');
|
||||
} else {
|
||||
$('#missionDistance').text(lengthMission[lengthMission.length -1] != -1 ? lengthMission[lengthMission.length -1].toFixed(1) : 'infinite');
|
||||
}
|
||||
}
|
||||
|
||||
function paintLine(pos1, pos2, pos2ID, color='#1497f1', lineDash=0, lineText="", selection=true, arrow=false) {
|
||||
var line = new ol.geom.LineString([pos1, pos2]);
|
||||
|
@ -920,7 +1184,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
if (arrow) {
|
||||
var vectorSource = new ol.source.Vector({
|
||||
features: [feature, featureArrow]
|
||||
|
@ -949,6 +1212,11 @@ TABS.mission_control.initialize = function (callback) {
|
|||
map.addLayer(vectorLayer);
|
||||
}
|
||||
|
||||
function refreshLayers() {
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
}
|
||||
|
||||
function cleanLayers() {
|
||||
for (var i in lines) {
|
||||
map.removeLayer(lines[i]);
|
||||
|
@ -975,9 +1243,9 @@ TABS.mission_control.initialize = function (callback) {
|
|||
map.addLayer(addWaypointMarker(element));
|
||||
}
|
||||
});
|
||||
}
|
||||
repaintLine4Waypoints(mission);
|
||||
}
|
||||
}
|
||||
|
||||
function redrawLayer() {
|
||||
if (selectedFeature && selectedMarker) {
|
||||
|
@ -1093,6 +1361,12 @@ TABS.mission_control.initialize = function (callback) {
|
|||
return waypoint;
|
||||
}
|
||||
|
||||
function setView(zoom) {
|
||||
var coord = ol.proj.fromLonLat([mission.getWaypoint(0).getLonMap(), mission.getWaypoint(0).getLatMap()]);
|
||||
map.getView().setCenter(coord);
|
||||
map.getView().setZoom(zoom);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
// Manage Map construction
|
||||
|
@ -1217,7 +1491,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
|
||||
};
|
||||
ol.inherits(app.PlannerSafehomeControl, ol.control.Control);
|
||||
|
||||
|
@ -1254,21 +1527,61 @@ TABS.mission_control.initialize = function (callback) {
|
|||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
|
||||
};
|
||||
ol.inherits(app.PlannerElevationControl, ol.control.Control);
|
||||
|
||||
// /**
|
||||
// * @constructor
|
||||
// * @extends {ol.control.Control}
|
||||
// * @param {Object=} opt_options Control options.
|
||||
// */
|
||||
app.PlannerMultiMissionControl = function (opt_options) {
|
||||
let versionCheck = true;
|
||||
if (CONFIG !== undefined && !semver.gte(CONFIG.flightControllerVersion, "4.0.0")) {
|
||||
versionCheck = false;
|
||||
}
|
||||
|
||||
var options = opt_options || {};
|
||||
var button = document.createElement('button');
|
||||
|
||||
button.innerHTML = ' ';
|
||||
button.style = 'background: url(\'../images/icons/cf_icon_multimission_white.svg\') no-repeat 1px -1px;background-color: rgba(0,60,136,.5);';
|
||||
|
||||
var handleShowSettings = function () {
|
||||
if (versionCheck) {
|
||||
$('#missionPlannerMultiMission').fadeIn(300);
|
||||
}
|
||||
};
|
||||
|
||||
button.addEventListener('click', handleShowSettings, false);
|
||||
button.addEventListener('touchstart', handleShowSettings, false);
|
||||
|
||||
var element = document.createElement('div');
|
||||
element.className = 'mission-control-multimission ol-unselectable ol-control';
|
||||
element.appendChild(button);
|
||||
element.title = versionCheck ? 'MP MultiMission' : 'Unavailable';
|
||||
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
};
|
||||
ol.inherits(app.PlannerMultiMissionControl, ol.control.Control);
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||
* @return {boolean} `true` to start the drag sequence.
|
||||
*/
|
||||
app.Drag.prototype.handleDownEvent = function (evt) {
|
||||
if (disableMarkerEdit) return false;
|
||||
|
||||
var map = evt.map;
|
||||
|
||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
||||
function (feature, layer) {
|
||||
return feature;
|
||||
});
|
||||
|
||||
tempMarker = map.forEachFeatureAtPixel(evt.pixel,
|
||||
function (feature, layer) {
|
||||
return layer;
|
||||
|
@ -1331,7 +1644,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
$('.home-lon').val(Math.round(coord[0] * 10000000) / 10000000);
|
||||
$('.home-lat').val(Math.round(coord[1] * 10000000) / 10000000);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1409,6 +1721,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (CONFIGURATOR.connectionValid) {
|
||||
control_list = [
|
||||
new app.PlannerSettingsControl(),
|
||||
new app.PlannerMultiMissionControl(),
|
||||
new app.PlannerSafehomeControl(),
|
||||
new app.PlannerElevationControl(),
|
||||
]
|
||||
|
@ -1416,6 +1729,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
else {
|
||||
control_list = [
|
||||
new app.PlannerSettingsControl(),
|
||||
new app.PlannerMultiMissionControl(),
|
||||
new app.PlannerElevationControl(),
|
||||
//new app.PlannerSafehomeControl() // TO COMMENT FOR RELEASE : DECOMMENT FOR DEBUG
|
||||
]
|
||||
|
@ -1468,6 +1782,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
map.getView().setZoom(result.missionPlanerLastValues.zoom);
|
||||
}
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Map on-click behavior definition
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1495,6 +1810,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
return layer;
|
||||
});
|
||||
if (selectedFeature && tempMarker.kind == "waypoint") {
|
||||
$("#editMission").hide();
|
||||
selectedMarker = mission.getWaypoint(tempMarker.number);
|
||||
var geometry = selectedFeature.getGeometry();
|
||||
var coord = ol.proj.toLonLat(geometry.getCoordinates());
|
||||
|
@ -1525,7 +1841,6 @@ TABS.mission_control.initialize = function (callback) {
|
|||
$('#pointP2').val(selectedMarker.getP2());
|
||||
changeSwitchery($('#pointP3'), selectedMarker.getP3() == 1);
|
||||
|
||||
|
||||
// Selection box update depending on choice of type of waypoint
|
||||
for (var j in dictOfLabelParameterPoint[selectedMarker.getAction()]) {
|
||||
if (dictOfLabelParameterPoint[selectedMarker.getAction()][j] != '') {
|
||||
|
@ -1539,7 +1854,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
$('#MPeditPoint').fadeIn(300);
|
||||
redrawLayer();
|
||||
}
|
||||
else if (selectedFeature && tempMarker.kind == "line" && tempMarker.selection) {
|
||||
else if (selectedFeature && tempMarker.kind == "line" && tempMarker.selection && !disableMarkerEdit) {
|
||||
let tempWpCoord = ol.proj.toLonLat(evt.coordinate);
|
||||
let tempWp = new Waypoint(tempMarker.number, MWNP.WPTYPE.WAYPOINT, Math.round(tempWpCoord[1] * 10000000), Math.round(tempWpCoord[0] * 10000000), alt=Number(settings.alt), p1=Number(settings.speed));
|
||||
if (homeMarkers.length && HOME.getAlt() != "N/A") {
|
||||
|
@ -1548,16 +1863,14 @@ TABS.mission_control.initialize = function (callback) {
|
|||
tempWp.setAlt(checkAltElevSanity(false, settings.alt, elevationAtWP, 0));
|
||||
|
||||
mission.insertWaypoint(tempWp, tempMarker.number);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
})()
|
||||
} else {
|
||||
mission.insertWaypoint(tempWp, tempMarker.number);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
}
|
||||
}
|
||||
|
@ -1576,7 +1889,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
$('.home-lon').val(Math.round(coord[0] * 10000000) / 10000000);
|
||||
$('.home-lat').val(Math.round(coord[1] * 10000000) / 10000000);
|
||||
}
|
||||
else {
|
||||
else if (!disableMarkerEdit) {
|
||||
let tempWpCoord = ol.proj.toLonLat(evt.coordinate);
|
||||
let tempWp = new Waypoint(mission.get().length, MWNP.WPTYPE.WAYPOINT, Math.round(tempWpCoord[1] * 10000000), Math.round(tempWpCoord[0] * 10000000), alt=Number(settings.alt), p1=Number(settings.speed));
|
||||
if (homeMarkers.length && HOME.getAlt() != "N/A") {
|
||||
|
@ -1585,20 +1898,19 @@ TABS.mission_control.initialize = function (callback) {
|
|||
tempWp.setAlt(checkAltElevSanity(false, settings.alt, elevationAtWP, 0));
|
||||
|
||||
mission.put(tempWp);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
})()
|
||||
} else {
|
||||
mission.put(tempWp);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
}
|
||||
}
|
||||
//mission.missionDisplayDebug();
|
||||
updateMultimissionState();
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1701,6 +2013,19 @@ TABS.mission_control.initialize = function (callback) {
|
|||
}
|
||||
});
|
||||
|
||||
$('#showHideMultimissionButton').on('click', function () {
|
||||
var src = ($(this).children().attr('class') === 'ic_hide')
|
||||
? 'ic_show'
|
||||
: 'ic_hide';
|
||||
$(this).children().attr('class', src);
|
||||
if ($(this).children().attr('class') === 'ic_hide') {
|
||||
$('#multimissionContent').fadeIn(300);
|
||||
}
|
||||
else {
|
||||
$('#multimissionContent').fadeOut(300);
|
||||
}
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Callback for Waypoint edition
|
||||
/////////////////////////////////////////////
|
||||
|
@ -1719,7 +2044,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
else {$('#pointP'+String(j).slice(-1)+'class').fadeOut(300);}
|
||||
}
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
redrawLayer();
|
||||
}
|
||||
});
|
||||
|
@ -1728,9 +2053,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (selectedMarker) {
|
||||
selectedMarker.setLat(Math.round(Number($('#pointLat').val()) * 10000000));
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
selectedFeature = markers[selectedMarker.getLayerNumber()].getSource().getFeatures()[0];
|
||||
selectedFeature.setStyle(getWaypointIcon(selectedMarker, true));
|
||||
plotElevation();
|
||||
|
@ -1741,9 +2065,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (selectedMarker) {
|
||||
selectedMarker.setLon(Math.round(Number($('#pointLon').val()) * 10000000));
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(singleMissionActive());
|
||||
refreshLayers();
|
||||
selectedFeature = markers[selectedMarker.getLayerNumber()].getSource().getFeatures()[0];
|
||||
selectedFeature.setStyle(getWaypointIcon(selectedMarker, true));
|
||||
plotElevation();
|
||||
|
@ -1756,7 +2079,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
const returnAltitude = checkAltElevSanity(true, Number($('#pointAlt').val()), elevationAtWP, selectedMarker.getP3());
|
||||
selectedMarker.setAlt(returnAltitude);
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
redrawLayer();
|
||||
plotElevation();
|
||||
}
|
||||
|
@ -1766,7 +2089,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (selectedMarker) {
|
||||
selectedMarker.setP1(Number($('#pointP1').val()));
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
redrawLayer();
|
||||
}
|
||||
});
|
||||
|
@ -1775,12 +2098,16 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (selectedMarker) {
|
||||
selectedMarker.setP2(Number($('#pointP2').val()));
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
redrawLayer();
|
||||
}
|
||||
});
|
||||
|
||||
$('#pointP3').on('change', function (event) {
|
||||
if (disableMarkerEdit) {
|
||||
changeSwitchery($('#pointP3'), selectedMarker.getP3() == 1);
|
||||
}
|
||||
|
||||
if (selectedMarker) {
|
||||
const P3Value = selectedMarker.getP3();
|
||||
selectedMarker.setP3( $('#pointP3').prop("checked") ? 1.0 : 0.0);
|
||||
|
@ -1805,7 +2132,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
|
||||
|
||||
mission.updateWaypoint(selectedMarker);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
redrawLayer();
|
||||
plotElevation();
|
||||
})()
|
||||
|
@ -1820,8 +2147,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
mission.dropAttachedFromWaypoint(selectedMarker, $(event.currentTarget).attr("data-index")-1);
|
||||
renderWaypointOptionsTable(selectedMarker);
|
||||
//cleanLines();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
refreshLayers();
|
||||
selectedFeature = markers[selectedMarker.getLayerNumber()].getSource().getFeatures()[0];
|
||||
selectedFeature.setStyle(getWaypointIcon(selectedMarker, true));
|
||||
}
|
||||
|
@ -1832,13 +2158,17 @@ TABS.mission_control.initialize = function (callback) {
|
|||
mission.addAttachedFromWaypoint(selectedMarker);
|
||||
renderWaypointOptionsTable(selectedMarker);
|
||||
//cleanLines();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
refreshLayers();
|
||||
selectedFeature = markers[selectedMarker.getLayerNumber()].getSource().getFeatures()[0];
|
||||
selectedFeature.setStyle(getWaypointIcon(selectedMarker, true));
|
||||
}
|
||||
});
|
||||
|
||||
$('#editMission').on('click', function () {
|
||||
mapSelectEditMultimission(selectedMarker.getNumber());
|
||||
updateMultimissionState();
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Callback for SAFEHOMES Table
|
||||
/////////////////////////////////////////////
|
||||
|
@ -1915,19 +2245,63 @@ TABS.mission_control.initialize = function (callback) {
|
|||
mission.updateWaypoint(selectedMarker);
|
||||
}
|
||||
|
||||
mission.update();
|
||||
redrawLayer();
|
||||
plotElevation();
|
||||
})()
|
||||
}
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Callback for MULTIMISSION Table
|
||||
/////////////////////////////////////////////
|
||||
$('#multimissionOptionList').on('change', function () {
|
||||
if (singleMissionActive()) {
|
||||
// updateAllMultimission only when a single mission is loaded on map
|
||||
// or new mission is empty.
|
||||
if (mission.isEmpty()) {
|
||||
updateAllMultimission();
|
||||
return;
|
||||
}
|
||||
let missions = 0;
|
||||
mission.get().forEach(function (element) {
|
||||
missions += element.getEndMission() == 0xA5 ? 1 : 0;
|
||||
});
|
||||
if (missions == 1) updateAllMultimission();
|
||||
} else {
|
||||
updateAllMultimission();
|
||||
updateMultimissionState();
|
||||
return;
|
||||
}
|
||||
updateMultimissionState();
|
||||
editMultimission();
|
||||
});
|
||||
|
||||
$('#addMultimissionButton').on('click', function () {
|
||||
addMultimission();
|
||||
});
|
||||
|
||||
$('#updateMultimissionButton').on('click', function () {
|
||||
$('#multimissionOptionList').val('0').change();
|
||||
});
|
||||
|
||||
$('#cancelMultimission').on('click', function () {
|
||||
$('#missionPlannerMultiMission').fadeOut(300);
|
||||
});
|
||||
|
||||
$('#setActiveMissionButton').on('click', function () {
|
||||
$('#activeNissionIndex').text(Number($('#multimissionOptionList').val()));
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Callback for Remove buttons
|
||||
/////////////////////////////////////////////
|
||||
$('#removeAllPoints').on('click', function () {
|
||||
if (markers.length && confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) {
|
||||
if (removeAllMultiMissionCheck()) {
|
||||
removeAllWaypoints();
|
||||
updateMultimissionState();
|
||||
}
|
||||
|
||||
plotElevation();
|
||||
}
|
||||
});
|
||||
|
@ -1941,36 +2315,35 @@ TABS.mission_control.initialize = function (callback) {
|
|||
if (confirm(chrome.i18n.getMessage('confirm_delete_point_with_options'))) {
|
||||
mission.getAttachedFromWaypoint(selectedMarker).forEach(function (element) {
|
||||
mission.dropWaypoint(element);
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
});
|
||||
mission.dropWaypoint(selectedMarker);
|
||||
selectedMarker = null;
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
clearEditForm();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
}
|
||||
}
|
||||
else {
|
||||
mission.dropWaypoint(selectedMarker);
|
||||
selectedMarker = null;
|
||||
mission.update();
|
||||
mission.update(singleMissionActive());
|
||||
clearEditForm();
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
refreshLayers();
|
||||
plotElevation();
|
||||
}
|
||||
updateMultimissionState();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Callback for Save/load buttons
|
||||
/////////////////////////////////////////////
|
||||
$('#loadFileMissionButton').on('click', function () {
|
||||
if (!fileLoadMultiMissionCheck()) return;
|
||||
|
||||
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
||||
removeAllWaypoints();
|
||||
nwdialog.setContext(document);
|
||||
nwdialog.openFileDialog(function(result) {
|
||||
loadMissionFile(result);
|
||||
|
@ -1985,7 +2358,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
});
|
||||
|
||||
$('#loadMissionButton').on('click', function () {
|
||||
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
||||
let message = multimissionCount ? 'confirm_overwrite_multimission_file_load_option' : 'confirm_delete_all_points';
|
||||
if ((markers.length || multimissionCount) && !confirm(chrome.i18n.getMessage(message))) return;
|
||||
removeAllWaypoints();
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start get point');
|
||||
|
@ -1993,7 +2367,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
});
|
||||
|
||||
$('#saveMissionButton').on('click', function () {
|
||||
if (!mission.get().length) {
|
||||
if (mission.isEmpty()) {
|
||||
alert(chrome.i18n.getMessage('no_waypoints_to_save'));
|
||||
return;
|
||||
}
|
||||
|
@ -2003,7 +2377,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
});
|
||||
|
||||
$('#loadEepromMissionButton').on('click', function () {
|
||||
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
||||
let message = multimissionCount ? 'confirm_overwrite_multimission_file_load_option' : 'confirm_delete_all_points';
|
||||
if ((markers.length || multimissionCount) && !confirm(chrome.i18n.getMessage(message))) return;
|
||||
removeAllWaypoints();
|
||||
$(this).addClass('disabled');
|
||||
GUI.log('Start get point');
|
||||
|
@ -2011,7 +2386,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
});
|
||||
|
||||
$('#saveEepromMissionButton').on('click', function () {
|
||||
if (!mission.get().length) {
|
||||
if (mission.isEmpty()) {
|
||||
alert(chrome.i18n.getMessage('no_waypoints_to_save'));
|
||||
return;
|
||||
}
|
||||
|
@ -2040,13 +2415,10 @@ TABS.mission_control.initialize = function (callback) {
|
|||
closeSettingsPanel();
|
||||
});
|
||||
|
||||
|
||||
|
||||
updateTotalInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
// Load/Save MWP File Toolbox
|
||||
|
@ -2070,6 +2442,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
|
||||
// parse mission file
|
||||
removeAllWaypoints();
|
||||
let missionEndFlagCount = 0;
|
||||
var node = null;
|
||||
var nodemission = null;
|
||||
for (var noderoot in result) {
|
||||
|
@ -2136,6 +2509,11 @@ TABS.mission_control.initialize = function (callback) {
|
|||
point.setP2(parseInt(node.$[attr]));
|
||||
} else if (attr.match(/parameter3/i)) {
|
||||
point.setP3(parseInt(node.$[attr]));
|
||||
} else if (attr.match(/flag/i)) {
|
||||
point.setEndMission(parseInt(node.$[attr]));
|
||||
if (parseInt(node.$[attr]) == 0xA5) {
|
||||
missionEndFlagCount ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
mission.put(point);
|
||||
|
@ -2144,8 +2522,26 @@ TABS.mission_control.initialize = function (callback) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (missionEndFlagCount > 1) {
|
||||
if (multimissionCount && !confirm(chrome.i18n.getMessage('confirm_multimission_file_load'))) {
|
||||
mission.flush();
|
||||
return;
|
||||
} else {
|
||||
// update Attached Waypoints (i.e non Map Markers)
|
||||
mission.update(true);
|
||||
mission.update(false, true);
|
||||
multimissionCount = missionEndFlagCount;
|
||||
multimission.reinit();
|
||||
multimission.copy(mission);
|
||||
renderMultimissionTable();
|
||||
$('#missionPlannerMultiMission').fadeIn(300);
|
||||
}
|
||||
} else {
|
||||
// update Attached Waypoints (i.e non Map Markers)
|
||||
mission.update(true, true);
|
||||
}
|
||||
updateMultimissionState();
|
||||
|
||||
if (Object.keys(mission.getCenter()).length !== 0) {
|
||||
var coord = ol.proj.fromLonLat([mission.getCenter().lon / 10000000 , mission.getCenter().lat / 10000000]);
|
||||
map.getView().setCenter(coord);
|
||||
|
@ -2157,9 +2553,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
var coord = ol.proj.fromLonLat([mission.getWaypoint(0).getLonMap(), mission.getWaypoint(0).getLatMap()]);
|
||||
map.getView().setCenter(coord);
|
||||
map.getView().setZoom(16);
|
||||
setView(16);
|
||||
}
|
||||
|
||||
redrawLayers();
|
||||
|
@ -2201,6 +2595,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
'parameter1': (MWNP.WPTYPE.REV[waypoint.getAction()] == "JUMP" ? waypoint.getP1()+1 : waypoint.getP1()),
|
||||
'parameter2': waypoint.getP2(),
|
||||
'parameter3': waypoint.getP3(),
|
||||
'flag': waypoint.getEndMission(),
|
||||
} };
|
||||
data.missionitem.push(point);
|
||||
});
|
||||
|
@ -2221,7 +2616,7 @@ TABS.mission_control.initialize = function (callback) {
|
|||
/////////////////////////////////////////////
|
||||
//
|
||||
// Load/Save FC mission Toolbox
|
||||
//
|
||||
// mission = configurator store, WP number indexed from 0, MISSION_PLANER = FC NVM store, WP number indexed from 1
|
||||
/////////////////////////////////////////////
|
||||
function getWaypointsFromFC(loadEeprom) {
|
||||
if (loadEeprom) {
|
||||
|
@ -2245,10 +2640,24 @@ TABS.mission_control.initialize = function (callback) {
|
|||
}
|
||||
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);
|
||||
mission.update(false, true);
|
||||
|
||||
/* check multimissions */
|
||||
multimissionCount = 0;
|
||||
mission.get().forEach(function (element) {
|
||||
if (element.getEndMission() == 0xA5) {
|
||||
multimissionCount ++;
|
||||
}
|
||||
});
|
||||
multimissionCount = multimissionCount > 1 ? multimissionCount : 0;
|
||||
multimission.reinit();
|
||||
if (multimissionCount > 1) {
|
||||
multimission.copy(mission);
|
||||
$('#missionPlannerMultiMission').fadeIn(300);
|
||||
}
|
||||
renderMultimissionTable();
|
||||
|
||||
setView(16);
|
||||
redrawLayers();
|
||||
updateTotalInfo();
|
||||
});
|
||||
|
@ -2258,13 +2667,13 @@ TABS.mission_control.initialize = function (callback) {
|
|||
function sendWaypointsToFC(saveEeprom) {
|
||||
MISSION_PLANER.reinit();
|
||||
MISSION_PLANER.copy(mission);
|
||||
MISSION_PLANER.update(true, true);
|
||||
MISSION_PLANER.update(false, true, true);
|
||||
mspHelper.saveWaypoints(function() {
|
||||
GUI.log('End send point');
|
||||
if (saveEeprom) {
|
||||
$('#saveEepromMissionButton').removeClass('disabled');
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false);
|
||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false, setMissionIndex);
|
||||
} else {
|
||||
$('#saveMissionButton').removeClass('disabled');
|
||||
}
|
||||
|
@ -2274,23 +2683,28 @@ TABS.mission_control.initialize = function (callback) {
|
|||
updateTotalInfo();
|
||||
mission.reinit();
|
||||
mission.copy(MISSION_PLANER);
|
||||
mission.update(true);
|
||||
cleanLayers();
|
||||
redrawLayers();
|
||||
mission.update(false, true);
|
||||
refreshLayers();
|
||||
$('#MPeditPoint').fadeOut(300);
|
||||
});
|
||||
function setMissionIndex() {
|
||||
let activeIndex = singleMissionActive() ? 1 : $('#activeNissionIndex').text();
|
||||
mspHelper.setSetting("nav_wp_multi_mission_index", activeIndex, function () {
|
||||
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, function () {
|
||||
GUI.log(chrome.i18n.getMessage('multimission_active_index_saved_eeprom'));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateTotalInfo() {
|
||||
if (CONFIGURATOR.connectionValid) {
|
||||
$('#availablePoints').text(mission.getCountBusyPoints() + '/' + mission.getMaxWaypoints());
|
||||
let availableWPs = mission.getMaxWaypoints() - mission.getCountBusyPoints();
|
||||
$('#availablePoints').text(availableWPs + '/' + mission.getMaxWaypoints());
|
||||
$('#missionValid').html(mission.getValidMission() ? chrome.i18n.getMessage('armingCheckPass') : chrome.i18n.getMessage('armingCheckFail'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function updateFilename(filename) {
|
||||
$('#missionFilename').text(filename);
|
||||
$('#infoMissionFilename').show();
|
||||
|
@ -2339,8 +2753,8 @@ TABS.mission_control.initialize = function (callback) {
|
|||
}
|
||||
|
||||
function plotElevation() {
|
||||
if ($('#missionPlanerElevation').is(":visible")) {
|
||||
if (mission.get().length == 0) {
|
||||
if ($('#missionPlanerElevation').is(":visible") && !disableMarkerEdit) {
|
||||
if (mission.isEmpty()) {
|
||||
var data = [[0], [0]];
|
||||
var layout = {showlegend: true,
|
||||
legend: {
|
||||
|
@ -2427,6 +2841,16 @@ TABS.mission_control.initialize = function (callback) {
|
|||
|
||||
};
|
||||
|
||||
// window.addEventListener("error", handleError, true);
|
||||
|
||||
// function handleError(evt) {
|
||||
// if (evt.message) { // Chrome sometimes provides this
|
||||
// alert("error: "+evt.message +" at linenumber: "+evt.lineno+" of file: "+evt.filename);
|
||||
// } else {
|
||||
// alert("error: "+evt.type+" from element: "+(evt.srcElement || evt.target));
|
||||
// }
|
||||
// }
|
||||
|
||||
TABS.mission_control.cleanup = function (callback) {
|
||||
if (callback) callback();
|
||||
};
|
||||
|
|
|
@ -75,6 +75,11 @@
|
|||
<select class="update_preview" data-setting="osd_plus_code_short" data-live="true"></select>
|
||||
<span data-i18n="osd_plus_code_short"></span>
|
||||
</label>
|
||||
<div class="helpicon cf_tip" data-i18n_title="osd_esc_rpm_precision_help"></div>
|
||||
<label>
|
||||
<select class="update_preview" data-setting="osd_esc_rpm_precision" data-live="true"></select>
|
||||
<span data-i18n="osd_esc_rpm_precision"></span>
|
||||
</label>
|
||||
<label>
|
||||
<select class="update_preview" data-setting="osd_crosshairs_style" data-live="true"></select>
|
||||
<span data-i18n="osd_crosshairs_style"></span>
|
||||
|
|
19
tabs/osd.js
|
@ -100,6 +100,7 @@ SYM.AH_NM = 0x3F;
|
|||
SYM.WH_NM = 0x70;
|
||||
SYM.VTX_POWER = 0x27;
|
||||
SYM.MAX = 0xCE;
|
||||
SYM.PROFILE = 0xCF;
|
||||
|
||||
SYM.AH_AIRCRAFT0 = 0x1A2;
|
||||
SYM.AH_AIRCRAFT1 = 0x1A3;
|
||||
|
@ -900,7 +901,10 @@ OSD.constants = {
|
|||
name: 'ESC_RPM',
|
||||
id: 106,
|
||||
min_version: '2.3.0',
|
||||
preview: FONT.symbol(SYM.RPM) + '983',
|
||||
preview: function(){
|
||||
let rpmPreview = '112974'.substr((6 - parseInt(Settings.getInputValue('osd_esc_rpm_precision'))));
|
||||
return FONT.symbol(SYM.RPM) + rpmPreview;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'GLIDESLOPE',
|
||||
|
@ -908,6 +912,12 @@ OSD.constants = {
|
|||
min_version: '3.0.0',
|
||||
preview: FONT.symbol(SYM.GLIDESLOPE) + FONT.embed_dot('12.3'),
|
||||
},
|
||||
{
|
||||
name: 'MISSION INFO',
|
||||
id: 129,
|
||||
min_version: '4.0.0',
|
||||
preview: 'M1/6>27WP'
|
||||
},
|
||||
{
|
||||
name: 'VERSION',
|
||||
id: 119,
|
||||
|
@ -1712,6 +1722,13 @@ OSD.constants = {
|
|||
{
|
||||
name: 'osdGroupPIDs',
|
||||
items: [
|
||||
{
|
||||
name: 'ACTIVE_PROFILE',
|
||||
id: 128,
|
||||
preview: function(osd_data) {
|
||||
return FONT.symbol(SYM.PROFILE) + '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'ROLL_PIDS',
|
||||
id: 16,
|
||||
|
|
|
@ -270,13 +270,6 @@
|
|||
<div class="helpicon cf_tip" data-i18n_title="gyro_main_lpf_hz_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<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>
|
||||
<th>Matrix Filter Min Frequency</th>
|
||||
<td>
|
||||
|
@ -291,12 +284,6 @@
|
|||
<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>
|
||||
<th>Unicorn Filter</th>
|
||||
<td>
|
||||
<select data-setting="setpoint_kalman_enabled" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Unicorn Filter Q Factor</th>
|
||||
<td>
|
||||
|
@ -319,13 +306,6 @@
|
|||
<div class="helpicon cf_tip" data-i18n_title="dtermLpfCutoffFrequencyHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="dterm_lpf2_hz"></th>
|
||||
<td>
|
||||
<input data-setting="dterm_lpf2_hz" type="number" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf2_hz_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -358,13 +338,6 @@
|
|||
<div class="cf_column">
|
||||
<table class="settings-table settings-table--filtering">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th data-i18n="itermRelax"></th>
|
||||
<td>
|
||||
<select data-setting="mc_iterm_relax" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="itermRelaxHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="itermRelaxCutoff"></th>
|
||||
<td>
|
||||
|
@ -407,10 +380,17 @@
|
|||
<table class="settings-table settings-table--filtering">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th data-i18n="d_boost_factor"></th>
|
||||
<th data-i18n="d_boost_min"></th>
|
||||
<td>
|
||||
<input data-setting="d_boost_factor" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="d_boost_factor_help"></div>
|
||||
<input data-setting="d_boost_min" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="d_boost_min_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-i18n="d_boost_max"></th>
|
||||
<td>
|
||||
<input data-setting="d_boost_max" class="rate-tpa_input" />
|
||||
<div class="helpicon cf_tip" data-i18n_title="d_boost_max_help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -54,6 +54,7 @@ TABS.programming.initialize = function (callback, scrollPosition) {
|
|||
|
||||
$('#save-button').click(function () {
|
||||
saveChainer.execute();
|
||||
GUI.log(chrome.i18n.getMessage('programmingEepromSaved'));
|
||||
});
|
||||
|
||||
helper.mspBalancedInterval.add('logic_conditions_pull', 100, 1, function () {
|
||||
|
|