mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 12:25:13 +03:00
MP version 1.3
This commit is contained in:
parent
8224e28a35
commit
db82c254c7
1 changed files with 9 additions and 12 deletions
|
@ -341,7 +341,7 @@ let WaypointCollection = function () {
|
|||
let n = 0 ;
|
||||
let startCount = true;
|
||||
while (startCount && (nLoop!=-1)) {
|
||||
if (nStart > data[data.length -1].getNumber()) {
|
||||
if (nStart > data[data.length -1].getNumber() ) {
|
||||
startCount = false;
|
||||
break;
|
||||
}
|
||||
|
@ -351,27 +351,24 @@ let WaypointCollection = function () {
|
|||
nStart++;
|
||||
}
|
||||
else if (self.getWaypoint(nStart).getAction() == MWNP.WPTYPE.JUMP) {
|
||||
console.log("TITI");
|
||||
console.log(jumpDict);
|
||||
if (!Object.keys(jumpDict).includes(self.getWaypoint(nStart).getNumber()) ) {
|
||||
if (!Object.keys(jumpDict).includes(String(self.getWaypoint(nStart).getNumber())) ) {
|
||||
jumpDict[self.getWaypoint(nStart).getNumber()] = {nStart: self.getWaypoint(nStart).getP1(), nLoop : self.getWaypoint(nStart).getP2(), n : 0};
|
||||
}
|
||||
console.log(jumpDict);
|
||||
if (Object.keys(jumpDict).includes(String(self.getWaypoint(nStart).getNumber())) ) {
|
||||
console.log("TOTO");
|
||||
console.log((jumpDict[self.getWaypoint(nStart).getNumber()]["n"]>=jumpDict[self.getWaypoint(nStart).getNumber()]["nLoop"] || jumpDict[self.getWaypoint(nStart).getNumber()]["nLoop"] == 0));
|
||||
if (jumpDict[self.getWaypoint(nStart).getNumber()]["nLoop"] == -1) {
|
||||
nLoop = -1;
|
||||
}
|
||||
if ( (jumpDict[self.getWaypoint(nStart).getNumber()]["n"]>=jumpDict[self.getWaypoint(nStart).getNumber()]["nLoop"] || jumpDict[self.getWaypoint(nStart).getNumber()]["nLoop"] ==0) ) {
|
||||
nStart++;
|
||||
//jumpDict[self.getWaypoint(nStart).getNumber()]["n"] = 0;
|
||||
}
|
||||
else {
|
||||
jumpDict[self.getWaypoint(nStart).getNumber()]["n"]++;
|
||||
console.log(jumpDict[self.getWaypoint(nStart).getNumber()]["nStart"]);
|
||||
//nStart = 0; //jumpDict[self.getWaypoint(nStart).getNumber()]["nStart"];
|
||||
jumpDict[self.getWaypoint(nStart).getNumber()]["n"] = jumpDict[self.getWaypoint(nStart).getNumber()]["n"]+1;
|
||||
let nStartTemp = jumpDict[self.getWaypoint(nStart).getNumber()]["nStart"];
|
||||
nStart = nStartTemp;
|
||||
}
|
||||
}
|
||||
//nStart++;
|
||||
console.log(jumpDict);
|
||||
|
||||
}
|
||||
else {
|
||||
nStart++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue