From abc3fa5606ee4056c89969b47f2490e04c9e9273 Mon Sep 17 00:00:00 2001 From: Scavanger Date: Tue, 12 Nov 2024 14:41:14 -0300 Subject: [PATCH] Fixes --- js/msp/MSPHelper.js | 4 ++-- tabs/mission_control.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index fa9d02ffd..e64125331 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -1611,12 +1611,12 @@ var mspHelper = (function () { data.getUint8(1), data.getUint8(2), data.getInt32(3, true), - data.getInt32(4, true), + data.getInt32(7, true), data.getUint8(11), 0, data.getInt8(12, true), null, - data.getUint8(14, true), + data.getUint8(0, true), ); let verticesCount = data.getUint8(13, true); if (verticesCount == 0) { diff --git a/tabs/mission_control.js b/tabs/mission_control.js index 1ec24ecdc..0aa4d62f6 100644 --- a/tabs/mission_control.js +++ b/tabs/mission_control.js @@ -31,7 +31,6 @@ const Plotly = require('./../js/libraries/plotly-latest.min'); const interval = require('./../js/intervals'); const { Geozone, GeozoneVertex, GeozoneType, GeozoneShapes, GeozoneFenceAction } = require('./../js/geozone'); const GeozoneCollection = require('./../js/geozoneCollection'); -const { event } = require('jquery'); var MAX_NEG_FW_LAND_ALT = -2000; // cm @@ -3429,8 +3428,8 @@ TABS.mission_control.initialize = function (callback) { }); $('#geozoneSeaLevelRef').on('change', event => { - if (selectedGeozone) { - const isChecked = $(event.currentTarget).prop('checked') ? 1 : 0; + const isChecked = $(event.currentTarget).prop('checked') ? 1 : 0; + if (selectedGeozone && isChecked != selectedGeozone.getSealevelRef()) { selectedGeozone.setSealevelRef(isChecked); (async () => { const vertex = selectedGeozone.getVertex(0);