MSP fixes
parent
c917f69ac7
commit
4a0e855a43
|
@ -108,13 +108,13 @@ var MSP = {
|
|||
});
|
||||
},
|
||||
listen: function(listener) {
|
||||
if (this.listeners[0] == undefined) {
|
||||
this.listeners[0] = listener;
|
||||
}
|
||||
else if (this.listeners.indexOf(listener) == -1) {
|
||||
if (this.listeners.indexOf(listener) == -1) {
|
||||
this.listeners.push(listener);
|
||||
}
|
||||
},
|
||||
clearListeners: function() {
|
||||
this.listeners = [];
|
||||
},
|
||||
send_message: function (code, data, callback_sent, callback_msp) {
|
||||
var bufferOut,
|
||||
bufView;
|
||||
|
|
|
@ -683,6 +683,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FILTER_CONFIG.yaw_lpf_hz = data.getUint16(offset, 1);
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
console.log("Advanced PID settings saved");
|
||||
break;
|
||||
case MSPCodes.MSP_PID_ADVANCED:
|
||||
var offset = 0;
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "3.0.0")) {
|
||||
|
|
|
@ -322,6 +322,8 @@ function onClosed(result) {
|
|||
|
||||
var battery = $('#quad-status_wrapper');
|
||||
battery.hide();
|
||||
|
||||
MSP.clearListeners();
|
||||
}
|
||||
|
||||
function read_serial(info) {
|
||||
|
|
Loading…
Reference in New Issue