mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 01:05:12 +03:00
Code Review
Correction on indentation + Mission validation
This commit is contained in:
parent
9745aee718
commit
d3a48e0f56
8 changed files with 824 additions and 696 deletions
|
@ -3124,7 +3124,7 @@
|
|||
"missionDefaultSettingsHead": {
|
||||
"message": "Default settings"
|
||||
},
|
||||
"missionTemplateHead": {
|
||||
"missionTemplateHead": {
|
||||
"message": "Mission template"
|
||||
},
|
||||
"useOnlyStandalone": {
|
||||
|
@ -3589,10 +3589,10 @@
|
|||
"configurationCurrentMeterType": {
|
||||
"message": "Current Meter Type"
|
||||
},
|
||||
"MissionPlannerJumpSettingsCheck": {
|
||||
"MissionPlannerJumpSettingsCheck": {
|
||||
"message": "JUMP settings incorrect : Check it again !"
|
||||
},
|
||||
"MissionPlannerHeadSettingsCheck": {
|
||||
"MissionPlannerHeadSettingsCheck": {
|
||||
"message": "Heading value is incorrect : Check it again !"
|
||||
}
|
||||
}
|
||||
|
|
219
images/icons/cf_icon_MP_save2file.svg
Normal file
219
images/icons/cf_icon_MP_save2file.svg
Normal file
|
@ -0,0 +1,219 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666667 8.4666667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="cf_icon_MP_save2file.svg">
|
||||
<defs
|
||||
id="defs2">
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter920"
|
||||
x="-1.3837457e-05"
|
||||
width="1.0000277"
|
||||
y="-1.3373132e-05"
|
||||
height="1.0000267">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="1.3311481e-05"
|
||||
id="feGaussianBlur922" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="25.455844"
|
||||
inkscape:cx="17.94419"
|
||||
inkscape:cy="15.357511"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer2"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1368"
|
||||
inkscape:window-height="850"
|
||||
inkscape:window-x="-6"
|
||||
inkscape:window-y="-6"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Calque 2">
|
||||
<rect
|
||||
style="opacity:0.994175;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:3.175;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:100"
|
||||
id="rect836"
|
||||
width="8.8929396"
|
||||
height="8.7165508"
|
||||
x="0.029398149"
|
||||
y="0.014699074" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="display:inline">
|
||||
<rect
|
||||
style="opacity:0.994175;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.175;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:100"
|
||||
id="rect838"
|
||||
width="3.1896987"
|
||||
height="4.2627311"
|
||||
x="2.8810186"
|
||||
y="2.2416089"
|
||||
ry="0.14699078" />
|
||||
<rect
|
||||
style="opacity:0.994175;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.175;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:100"
|
||||
id="rect840"
|
||||
width="0.10289352"
|
||||
height="0.1175926"
|
||||
x="4.2774305"
|
||||
y="4.2333331"
|
||||
ry="0.051446758" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="coin"
|
||||
style="display:inline;opacity:0.980775;filter:url(#filter920)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:100;stroke-opacity:1"
|
||||
id="path851"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="5.5856476"
|
||||
sodipodi:cy="2.6752317"
|
||||
sodipodi:r1="1.4524583"
|
||||
sodipodi:r2="0.48779002"
|
||||
sodipodi:arg1="2.1981044"
|
||||
sodipodi:arg2="3.245302"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 4.7331018,3.8511572 4.9935391,1.3489427 7.0303018,2.8255952 Z"
|
||||
inkscape:transform-center-x="-0.24768571"
|
||||
transform="matrix(1.0496075,0.44790841,0.11075364,1,-0.47061262,-2.5315702)"
|
||||
inkscape:transform-center-y="-0.2423188" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.00160072;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.55905;stroke-opacity:1;paint-order:normal"
|
||||
id="path878"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="4.531703"
|
||||
sodipodi:cy="3.5546846"
|
||||
sodipodi:r1="1.1501029"
|
||||
sodipodi:r2="0.57505137"
|
||||
sodipodi:arg1="1.5707963"
|
||||
sodipodi:arg2="2.6179939"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 4.531703,4.7047875 -0.9960183,-1.7251543 1.9920366,0 z"
|
||||
inkscape:transform-center-y="0.1930168"
|
||||
transform="matrix(0,0.58136529,-0.67130283,-0.33565141,8.0709536,1.1862026)"
|
||||
inkscape:transform-center-x="0.19301688" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.00160072;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.55905;stroke-opacity:1;paint-order:normal"
|
||||
id="path924"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="4.531703"
|
||||
sodipodi:cy="3.5546846"
|
||||
sodipodi:r1="1.1501029"
|
||||
sodipodi:r2="0.57505137"
|
||||
sodipodi:arg1="1.5707963"
|
||||
sodipodi:arg2="2.6179939"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 4.531703,4.7047875 -0.9960183,-1.7251543 1.9920366,0 z"
|
||||
inkscape:transform-center-y="0.1930168"
|
||||
transform="matrix(0,0.58136529,-0.67130283,-0.33565141,8.0709536,1.1862026)"
|
||||
inkscape:transform-center-x="0.19301688" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g932"
|
||||
inkscape:label="coin_decoupe"
|
||||
style="display:inline;opacity:0.980775;filter:url(#filter920)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:100;stroke-opacity:1"
|
||||
id="path926"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="5.5856476"
|
||||
sodipodi:cy="2.6752317"
|
||||
sodipodi:r1="1.4524583"
|
||||
sodipodi:r2="0.48779002"
|
||||
sodipodi:arg1="2.1981044"
|
||||
sodipodi:arg2="3.245302"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 4.7331018,3.8511572 4.9935391,1.3489427 7.0303018,2.8255952 Z"
|
||||
inkscape:transform-center-x="-0.24768571"
|
||||
transform="matrix(1.0496075,0.44790841,0.11075364,1,-0.47061262,-2.5315702)"
|
||||
inkscape:transform-center-y="-0.2423188" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.00160072;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.55905;stroke-opacity:1;paint-order:normal"
|
||||
id="path928"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="4.531703"
|
||||
sodipodi:cy="3.5546846"
|
||||
sodipodi:r1="1.1501029"
|
||||
sodipodi:r2="0.57505137"
|
||||
sodipodi:arg1="1.5707963"
|
||||
sodipodi:arg2="2.6179939"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 4.531703,4.7047875 -0.9960183,-1.7251543 1.9920366,0 z"
|
||||
inkscape:transform-center-y="0.1930168"
|
||||
transform="matrix(0,0.58136529,-0.67130283,-0.33565141,8.0709536,1.1862026)"
|
||||
inkscape:transform-center-x="0.19301688" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:0.994175;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.203596;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="path930"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="4.531703"
|
||||
sodipodi:cy="3.5546846"
|
||||
sodipodi:r1="1.1501029"
|
||||
sodipodi:r2="0.57505137"
|
||||
sodipodi:arg1="1.5707963"
|
||||
sodipodi:arg2="2.6179939"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 4.531703,4.7047875 -0.9960183,-1.7251543 1.9920366,0 z"
|
||||
inkscape:transform-center-y="-0.23115762"
|
||||
transform="matrix(0,-0.69624532,0.80395486,0.40197743,2.4520438,4.7798234)"
|
||||
inkscape:transform-center-x="-0.23115767" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.2 KiB |
BIN
images/icons/save2file.png
Normal file
BIN
images/icons/save2file.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 604 B |
4
js/fc.js
4
js/fc.js
|
@ -246,8 +246,8 @@ var FC = {
|
|||
alt: 0,
|
||||
endMission: 0,
|
||||
p1: 0,
|
||||
p2: 0,
|
||||
p3: 0
|
||||
p2: 0,
|
||||
p3: 0
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -447,8 +447,8 @@ var mspHelper = (function (gui) {
|
|||
MISSION_PLANER.bufferPoint.lon = data.getInt32(6, true) / 10000000;
|
||||
MISSION_PLANER.bufferPoint.alt = data.getInt32(10, true);
|
||||
MISSION_PLANER.bufferPoint.p1 = data.getInt16(14, true);
|
||||
MISSION_PLANER.bufferPoint.p2 = data.getInt16(16, true);
|
||||
MISSION_PLANER.bufferPoint.p3 = data.getInt16(18, true);
|
||||
MISSION_PLANER.bufferPoint.p2 = data.getInt16(16, true);
|
||||
MISSION_PLANER.bufferPoint.p3 = data.getInt16(18, true);
|
||||
|
||||
break;
|
||||
case MSPCodes.MSP_BOXIDS:
|
||||
|
@ -2163,17 +2163,17 @@ var mspHelper = (function (gui) {
|
|||
};
|
||||
|
||||
self.sendBlackboxConfiguration = function (onDataCallback) {
|
||||
var buffer = [];
|
||||
var messageId = MSPCodes.MSP_SET_BLACKBOX_CONFIG;
|
||||
buffer.push(BLACKBOX.blackboxDevice & 0xFF);
|
||||
messageId = MSPCodes.MSP2_SET_BLACKBOX_CONFIG;
|
||||
buffer.push(lowByte(BLACKBOX.blackboxRateNum));
|
||||
buffer.push(highByte(BLACKBOX.blackboxRateNum));
|
||||
buffer.push(lowByte(BLACKBOX.blackboxRateDenom));
|
||||
buffer.push(highByte(BLACKBOX.blackboxRateDenom));
|
||||
var buffer = [];
|
||||
var messageId = MSPCodes.MSP_SET_BLACKBOX_CONFIG;
|
||||
buffer.push(BLACKBOX.blackboxDevice & 0xFF);
|
||||
messageId = MSPCodes.MSP2_SET_BLACKBOX_CONFIG;
|
||||
buffer.push(lowByte(BLACKBOX.blackboxRateNum));
|
||||
buffer.push(highByte(BLACKBOX.blackboxRateNum));
|
||||
buffer.push(lowByte(BLACKBOX.blackboxRateDenom));
|
||||
buffer.push(highByte(BLACKBOX.blackboxRateDenom));
|
||||
//noinspection JSUnusedLocalSymbols
|
||||
MSP.send_message(messageId, buffer, false, function (response) {
|
||||
onDataCallback();
|
||||
onDataCallback();
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2739,7 +2739,7 @@ var mspHelper = (function (gui) {
|
|||
};
|
||||
|
||||
self.loadBatteryConfig = function (callback) {
|
||||
MSP.send_message(MSPCodes.MSPV2_BATTERY_CONFIG, false, false, callback);
|
||||
MSP.send_message(MSPCodes.MSPV2_BATTERY_CONFIG, false, false, callback);
|
||||
};
|
||||
|
||||
self.loadArmingConfig = function (callback) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
display: block;
|
||||
cursor: pointer;
|
||||
transition: all ease 0.2s;
|
||||
padding: 0 9px;
|
||||
padding: 0 0 0 20px;
|
||||
line-height: 28px;
|
||||
margin: 5px;
|
||||
float: left;
|
||||
|
@ -22,11 +22,17 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.tab-mission-control .btn a:hover {
|
||||
background-color: #3394b5;
|
||||
transition: all ease 0.2s;
|
||||
}
|
||||
|
||||
.tab-mission-control .ic_save {
|
||||
background-image: url(../images/icons/cf_icon_mission_white.svg);
|
||||
}
|
||||
|
||||
|
||||
.tab-mission-control .btn a:active {
|
||||
background-color: #37a8db;
|
||||
transition: all ease 0.0s;
|
||||
|
@ -199,3 +205,4 @@
|
|||
.tab-mission-control .missionTable tr:nth-child(even) th {
|
||||
background-color: #ebe7e7;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="missionPlanerTemplate" class="gui_box grey" style="display: none">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title i18n-replaced" data-i18n="missionTemplateHead">Mission Template</div>
|
||||
</div>
|
||||
<div class="spacer">
|
||||
</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>
|
||||
|
@ -51,20 +44,10 @@
|
|||
<div id="missionValid" style="display: inline-block"></div>
|
||||
</div>
|
||||
<br>
|
||||
<!--<div style="display: flex;">
|
||||
<input type="checkbox" style="width: 18px; margin-left: 5px;" id="rthEndMission">
|
||||
<label for="rthEndMission" style="padding: 2px;">RTH at the end of the mission</label>
|
||||
</div>
|
||||
<div id="rthSettings" style="display: none">
|
||||
<div style="display: flex">
|
||||
<input type="checkbox" id="rthLanding" style="width: 18px; margin-left: 5px;">
|
||||
<label for="rthLanding" style="padding: 2px">Landing</label>
|
||||
</div>
|
||||
</div>-->
|
||||
<hr>
|
||||
<div class="btn save_btn">
|
||||
<a id="loadFileMissionButton" class="save" href="#" data-i18n="loadFileMissionButton">Load file mission</a>
|
||||
<a id="saveFileMissionButton" class="save" href="#" data-i18n="saveFileMissionButton">Save file mission</a>
|
||||
<a id="loadFileMissionButton" class="tabicon ic_save2file" href="#" data-i18n="loadFileMissionButton">Load file mission</a>
|
||||
<a id="saveFileMissionButton" class="tabicon ic_save2file" href="#" data-i18n="saveFileMissionButton">Save file mission</a>
|
||||
</div>
|
||||
<div class="btn save_btn">
|
||||
<a id="loadMissionButton" class="save" href="#" data-i18n="loadMissionButton">Load mission from FC</a>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue