mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 00:05:19 +03:00
waypoint OOP version 1.7
This commit is contained in:
parent
7e75ceef39
commit
30c3b043a3
1 changed files with 5 additions and 2 deletions
|
@ -440,6 +440,7 @@ var mspHelper = (function (gui) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_WP:
|
case MSPCodes.MSP_WP:
|
||||||
|
console.log("data : ", data);
|
||||||
MISSION_PLANER.put(new Waypoint(
|
MISSION_PLANER.put(new Waypoint(
|
||||||
data.getUint8(0),
|
data.getUint8(0),
|
||||||
data.getUint8(1),
|
data.getUint8(1),
|
||||||
|
@ -450,7 +451,6 @@ var mspHelper = (function (gui) {
|
||||||
data.getInt16(16, true),
|
data.getInt16(16, true),
|
||||||
data.getInt16(18, true)
|
data.getInt16(18, true)
|
||||||
));
|
));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_BOXIDS:
|
case MSPCodes.MSP_BOXIDS:
|
||||||
//noinspection JSUndeclaredVariable
|
//noinspection JSUndeclaredVariable
|
||||||
|
@ -2926,6 +2926,7 @@ var mspHelper = (function (gui) {
|
||||||
self.loadWaypoints = function (callback) {
|
self.loadWaypoints = function (callback) {
|
||||||
MISSION_PLANER.reinit();
|
MISSION_PLANER.reinit();
|
||||||
mspHelper.getMissionInfo();
|
mspHelper.getMissionInfo();
|
||||||
|
console.log("MISSION_PLANER.getCountBusyPoints() ", MISSION_PLANER.getCountBusyPoints());
|
||||||
let waypointId = 0;
|
let waypointId = 0;
|
||||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint);
|
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint);
|
||||||
|
|
||||||
|
@ -2934,10 +2935,12 @@ var mspHelper = (function (gui) {
|
||||||
console.log("Display for LoadInternal");
|
console.log("Display for LoadInternal");
|
||||||
MISSION_PLANER.missionDisplayDebug();
|
MISSION_PLANER.missionDisplayDebug();
|
||||||
if (waypointId < MISSION_PLANER.get().length-1) {
|
if (waypointId < MISSION_PLANER.get().length-1) {
|
||||||
|
console.log("waypointId if ", waypointId);
|
||||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint);
|
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, nextWaypoint);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false);
|
console.log("waypointId else ", waypointId);
|
||||||
|
MSP.send_message(MSPCodes.MSP_WP, [waypointId], false, callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue