1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00

Update waypointCollection.js

This commit is contained in:
breadoven 2021-11-01 23:06:15 +00:00
parent 59e33adeea
commit a56136ded5

View file

@ -149,7 +149,7 @@ let WaypointCollection = function () {
data = tmpData;
};
self.update = function (singleMission = true, bMWPfile=false, bReverse=false) {
self.update = function (updateEndFlag = true, bMWPfile=false, bReverse=false) {
let oldWPNumber = 0;
let optionIdx = 0;
let idx = 0;
@ -181,8 +181,8 @@ let WaypointCollection = function () {
idx++;
}
/* only update EndMission flags when single mission loaded on map */
if (singleMission) {
/* 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);
}