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

Fix forced lock removal and add frame mspStatistics

This commit is contained in:
Pawel Spychalski (DzikuVx) 2024-04-26 14:14:22 +02:00
parent 040b0cec52
commit 3e637c1c54
4 changed files with 55 additions and 5 deletions

View file

@ -294,16 +294,20 @@ var mspQueue = function () {
var currentTimestamp = new Date().getTime(),
threshold = publicScope.getHardwareRoundtrip() * 3;
if (threshold > 1000) {
if (threshold > 5000) {
threshold = 5000;
}
if (threshold < 1000) {
threshold = 1000;
}
if (privateScope.softLock !== false && currentTimestamp - privateScope.softLock > threshold) {
privateScope.softLock = false;
publicScope.freeSoftLock();
eventFrequencyAnalyzer.put('force free soft lock');
}
if (privateScope.hardLock !== false && currentTimestamp - privateScope.hardLock > threshold) {
privateScope.hardLock = false;
console.log('Force free hard lock');
publicScope.freeHardLock();
eventFrequencyAnalyzer.put('force free hard lock');
}