Skip to content

Commit

Permalink
Status updated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DzikuVx committed Apr 26, 2024
1 parent 6b5440f commit 20e36b9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion js/msp.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ var MSP = {
*/
timeout.add('delayedFreeHardLock', function() {
mspQueue.freeHardLock();
}, 50);
}, 10);

// Reset variables
this.message_length_received = 0;
Expand Down
5 changes: 0 additions & 5 deletions js/periodicStatusUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions js/serial_queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tabs/mission_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,6 @@ TABS.mission_control.initialize = function (callback) {
return;
}

if (mspQueue.shouldDrop()) {
return;
}

get_raw_gps_data();
}, 200);
}
Expand Down

0 comments on commit 20e36b9

Please sign in to comment.