Merge pull request #1381 from breadoven/abo_mission_cont_multimissions

Mission control Multi Missions
pull/1395/head
breadoven 3 years ago committed by GitHub
commit 92721516ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3508,6 +3508,9 @@
"missionSafehomeHead": {
"message": "Safe Home manager"
},
"missionMultiMissionHead": {
"message": "Multi Missions"
},
"missionTemplateHead": {
"message": "Mission template"
},
@ -3526,6 +3529,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 !"
},

@ -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

@ -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:
@ -3207,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);
});
};

@ -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,11 +180,15 @@ let WaypointCollection = function () {
optionIdx = 0;
idx++;
}
if (element.getNumber() == ((bMWPfile && bReverse) ? self.get().length : self.get().length-1)) {
element.setEndMission(0xA5);
}
else {
element.setEndMission(0);
/* 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 if ((element.getNumber() == self.get().length - 2) && element.getEndMission() == 0xA5) {
element.setEndMission(0);
}
}
}
});

@ -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;
.mission-control-multimission {
top: 90px;
left: .5em;
}
.ol-touch .mission-control-safehome {
top: 120px;
.ol-touch .mission-control-multimission {
top: 100px;
}
.mission-control-elevation {
top: 90px;
top: 115px;
left: .5em;
}
.ol-touch .mission-control-elevation {
top: 100px;
top: 120px;
}
.mission-control-safehome {
top: 140px;
left: .5em;
}
.ol-touch .mission-control-safehome {
top: 140px;
}
.mission-control-template {
top: 140px;
left: .5em;

@ -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>
@ -110,13 +152,13 @@
</thead>
<tbody id="homeTableBody">
<tr>
<td><div id="viewHomePoint" class="btnTable btnTableIcon">
<a class="ic_center" data-role="home-center" href="#" title="move to center view"></a>
</div>
</td>
<td><input type="number" class="home-lon" /></td>
<td><input type="number" class="home-lat" /></td>
<td><span id="elevationValueAtHome">N/A</span></td>
<td><div id="viewHomePoint" class="btnTable btnTableIcon">
<a class="ic_center" data-role="home-center" href="#" title="move to center view"></a>
</div>
</td>
<td><input type="number" class="home-lon" /></td>
<td><input type="number" class="home-lat" /></td>
<td><span id="elevationValueAtHome">N/A</span></td>
</tr>
</tbody>
</table>
@ -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>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save