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

Save geozones correctly

This commit is contained in:
Scavanger 2024-11-20 22:59:30 -03:00
parent 5019b1285f
commit d07144a55b
3 changed files with 8 additions and 9 deletions

View file

@ -3163,7 +3163,7 @@ var mspHelper = (function () {
nextGeozone();
return;
}
if (vertexID < FC.GEOZONES.at(geozoneID).getVerticesCount() - 1 && zone.getShape() == GeozoneShapes.POLYGON) {
if (vertexID < FC.GEOZONES.at(geozoneID).getVerticesCount() && zone.getShape() == GeozoneShapes.POLYGON) {
MSP.send_message(MSPCodes.MSP2_INAV_GEOZONE_VERTEX, [geozoneID, vertexID], false, nextVertex);
} else {
MSP.send_message(MSPCodes.MSP2_INAV_GEOZONE_VERTEX, [geozoneID, vertexID], false, nextGeozone);
@ -3173,7 +3173,7 @@ var mspHelper = (function () {
function nextGeozone() {
geozoneID++;
vertexID = -1;
if (geozoneID < FC.GEOZONES.getMaxZones() - 1) {
if (geozoneID < FC.GEOZONES.getMaxZones()) {
MSP.send_message(MSPCodes.MSP2_INAV_GEOZONE, [geozoneID], false, nextVertex);
} else {
MSP.send_message(MSPCodes.MSP2_INAV_GEOZONE, [geozoneID], false, callback);
@ -3204,7 +3204,7 @@ var mspHelper = (function () {
function nextGeozone() {
geozoneID++;
vertexID = -1;
if (geozoneID < FC.GEOZONES.getMaxZones() - 1) {
if (geozoneID < FC.GEOZONES.getMaxZones()) {
MSP.send_message(MSPCodes.MSP2_INAV_SET_GEOZONE, FC.GEOZONES.extractBufferZone(geozoneID), false, nextVertex);
} else {
MSP.send_message(MSPCodes.MSP2_INAV_SET_GEOZONE, FC.GEOZONES.extractBufferZone(geozoneID), false, callback);