From 20e36b9b65f21d85bbd2795689a516322ec62881 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Fri, 26 Apr 2024 21:36:02 +0200 Subject: [PATCH] Status updated changes --- js/msp.js | 2 +- js/periodicStatusUpdater.js | 5 ----- js/serial_queue.js | 8 -------- tabs/mission_control.js | 4 ---- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/js/msp.js b/js/msp.js index 85a51a5e5..820b7d55c 100644 --- a/js/msp.js +++ b/js/msp.js @@ -269,7 +269,7 @@ var MSP = { */ timeout.add('delayedFreeHardLock', function() { mspQueue.freeHardLock(); - }, 50); + }, 10); // Reset variables this.message_length_received = 0; diff --git a/js/periodicStatusUpdater.js b/js/periodicStatusUpdater.js index e28959509..084da4a2a 100644 --- a/js/periodicStatusUpdater.js +++ b/js/periodicStatusUpdater.js @@ -104,11 +104,6 @@ const mspQueue = require('./serial_queue'); if (!stoppped && GUI.active_tab != 'cli') { - if (mspQueue.shouldDropStatus()) { - return; - } - - MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false); MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false); MSP.send_message(MSPCodes.MSP_ACTIVEBOXES, false, false); diff --git a/js/serial_queue.js b/js/serial_queue.js index c01e8b8f6..f4cf1bc19 100644 --- a/js/serial_queue.js +++ b/js/serial_queue.js @@ -313,14 +313,6 @@ var mspQueue = function () { }; - publicScope.shouldDrop = function () { - return (Math.round(Math.random()*100) < privateScope.dropRatio); - }; - - publicScope.shouldDropStatus = function () { - return (Math.round(Math.random()*100) < (privateScope.dropRatio * privateScope.statusDropFactor)); - }; - /** * This method return periodic for polling interval that should populate queue in 80% or less * @param {number} requestedInterval diff --git a/tabs/mission_control.js b/tabs/mission_control.js index 27b181836..19c377860 100644 --- a/tabs/mission_control.js +++ b/tabs/mission_control.js @@ -341,10 +341,6 @@ TABS.mission_control.initialize = function (callback) { return; } - if (mspQueue.shouldDrop()) { - return; - } - get_raw_gps_data(); }, 200); }