mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-19 14:25:13 +03:00
Waypoint OOP version 2.5
This commit is contained in:
parent
8b6e4cb934
commit
4ddbc9a823
6 changed files with 31 additions and 1 deletions
|
@ -3604,6 +3604,9 @@
|
||||||
"MissionPlannerJump2SettingsCheck": {
|
"MissionPlannerJump2SettingsCheck": {
|
||||||
"message": "JUMP settings incorrect : Repeat should not exceed 10! Check it again! Being forced to number of repeat equal 0!"
|
"message": "JUMP settings incorrect : Repeat should not exceed 10! Check it again! Being forced to number of repeat equal 0!"
|
||||||
},
|
},
|
||||||
|
"MissionPlannerJump3SettingsCheck": {
|
||||||
|
"message": "JUMP settings incorrect : not able to Jump to a POI! Being forced to WP 1!"
|
||||||
|
},
|
||||||
"MissionPlannerHeadSettingsCheck": {
|
"MissionPlannerHeadSettingsCheck": {
|
||||||
"message": "Heading value is incorrect : Check it again! Being forced by default to -1 thence!"
|
"message": "Heading value is incorrect : Check it again! Being forced by default to -1 thence!"
|
||||||
},
|
},
|
||||||
|
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
@ -6,6 +6,7 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
var self = {};
|
var self = {};
|
||||||
let layerNumber = "undefined";
|
let layerNumber = "undefined";
|
||||||
let attachedNumber = "undefined";
|
let attachedNumber = "undefined";
|
||||||
|
let poiNumber = "undefined";
|
||||||
|
|
||||||
self.getNumber = function () {
|
self.getNumber = function () {
|
||||||
return number;
|
return number;
|
||||||
|
@ -23,6 +24,14 @@ let Waypoint = function (number, action, lat, lon, alt=0, p1=0, p2=0, p3=0, endM
|
||||||
layerNumber = data;
|
layerNumber = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.getPoiNumber = function () {
|
||||||
|
return poiNumber;
|
||||||
|
};
|
||||||
|
|
||||||
|
self.setPoiNumber = function (data) {
|
||||||
|
poiNumber = data;
|
||||||
|
};
|
||||||
|
|
||||||
self.isUsed = function () {
|
self.isUsed = function () {
|
||||||
return isUsed;
|
return isUsed;
|
||||||
};
|
};
|
||||||
|
|
|
@ -321,6 +321,16 @@ let WaypointCollection = function () {
|
||||||
console.log("lJumptTargetAttached ", lJumptTargetAttached);
|
console.log("lJumptTargetAttached ", lJumptTargetAttached);
|
||||||
return (lJumptTargetAttached.length != 0 && lJumptTargetAttached != 'undefined')
|
return (lJumptTargetAttached.length != 0 && lJumptTargetAttached != 'undefined')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.getPoiList = function() {
|
||||||
|
let poiList = [];
|
||||||
|
data.forEach(function (element) {
|
||||||
|
if (element.getAction() == MWNP.WPTYPE.SET_POI) {
|
||||||
|
poiList.push(element.getNumber());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return poiList;
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
};
|
};
|
|
@ -54,7 +54,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-mission-control .ic_loadFromEprom {
|
.tab-mission-control .ic_loadFromEprom {
|
||||||
background-image: url(../images/icons/cf_icon_MP_loadfromEprom_grey.svg);
|
background-image: url(../images/icons/cf_icon_MP_loadFromEprom_grey.svg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-mission-control .ic_removeAll {
|
.tab-mission-control .ic_removeAll {
|
||||||
|
|
|
@ -884,6 +884,14 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
$(this).val(1);
|
$(this).val(1);
|
||||||
alert(chrome.i18n.getMessage('MissionPlannerJumpSettingsCheck'));
|
alert(chrome.i18n.getMessage('MissionPlannerJumpSettingsCheck'));
|
||||||
}
|
}
|
||||||
|
else if (mission.getPoiList().length != 0 && mission.getPoiList()) {
|
||||||
|
console.log("mission.getPoiList() ",mission.getPoiList());
|
||||||
|
console.log(mission.convertJumpNumberToWaypoint(Number($(this).val())-1));
|
||||||
|
if (mission.getPoiList().includes(mission.convertJumpNumberToWaypoint(Number($(this).val())-1))) {
|
||||||
|
$(this).val(1);
|
||||||
|
alert(chrome.i18n.getMessage('MissionPlannerJump3SettingsCheck'));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
element.setP1((MWNP.WPTYPE.REV[element.getAction()] == "JUMP" ? mission.convertJumpNumberToWaypoint(Number($(this).val())-1) : Number($(this).val())));
|
element.setP1((MWNP.WPTYPE.REV[element.getAction()] == "JUMP" ? mission.convertJumpNumberToWaypoint(Number($(this).val())-1) : Number($(this).val())));
|
||||||
mission.updateWaypoint(element);
|
mission.updateWaypoint(element);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue