1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

loosened filtering, andjusted PIDs and fixed roundtrip computation

This commit is contained in:
Pawel Spychalski (DzikuVx) 2017-01-23 18:44:01 +01:00
parent 0ed67a752b
commit f3aea108bd
3 changed files with 9 additions and 9 deletions

View file

@ -959,9 +959,6 @@ var mspHelper = (function (gui) {
// remove timeout
clearTimeout(dataHandler.callbacks[i].timer);
// remove object from array
dataHandler.callbacks.splice(i, 1);
/*
* Compute roundtrip
*/
@ -970,6 +967,9 @@ var mspHelper = (function (gui) {
helper.mspQueue.putHardwareRoundtrip(new Date().getTime() - dataHandler.callbacks[i].sentOn);
}
// remove object from array
dataHandler.callbacks.splice(i, 1);
// fire callback
if (callback) callback({'command': dataHandler.code, 'data': data, 'length': dataHandler.message_length_expected});
}

View file

@ -342,7 +342,7 @@ function onConnect() {
MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false);
helper.interval.add('msp-load-update', function () {
$('#msp-load').text("MSP load: " + helper.mspQueue.getLoad().toFixed(2));
$('#msp-load').text("MSP load: " + helper.mspQueue.getLoad().toFixed(1));
$('#msp-roundtrip').text("MSP round trip: " + helper.mspQueue.getRoundtrip().toFixed(0));
$('#hardware-roundtrip').text("HW round trip: " + helper.mspQueue.getHardwareRoundtrip().toFixed(0));
$('#drop-rate').text("Drop ratio: " + helper.mspQueue.getDropRatio().toFixed(0) + "%");

View file

@ -8,11 +8,11 @@ helper.mspQueue = (function (serial, MSP) {
privateScope = {};
privateScope.handlerFrequency = 100;
privateScope.balancerFrequency = 10;
privateScope.balancerFrequency = 20;
privateScope.loadFilter = new classes.SimpleSmoothFilter(0.5, 0.995);
privateScope.roundtripFilter = new classes.SimpleSmoothFilter(20, 0.97);
privateScope.hardwareRoundtripFilter = new classes.SimpleSmoothFilter(5, 0.97);
privateScope.loadFilter = new classes.SimpleSmoothFilter(1, 0.9);
privateScope.roundtripFilter = new classes.SimpleSmoothFilter(20, 0.99);
privateScope.hardwareRoundtripFilter = new classes.SimpleSmoothFilter(10, 0.99);
/**
* Target load for MSP queue. When load is above target, throttling might start to appear
@ -30,7 +30,7 @@ helper.mspQueue = (function (serial, MSP) {
privateScope.loadPidController = new classes.PidController();
privateScope.loadPidController.setTarget(privateScope.targetLoad);
privateScope.loadPidController.setOutput(0, 99, 0);
privateScope.loadPidController.setGains(16, 6, 4);
privateScope.loadPidController.setGains(10, 4, 1);
privateScope.loadPidController.setItermLimit(0, 90);
privateScope.dropRatio = 0;