Skip and log unsupported messages

10.3.x-maintenance
ProDrone 2015-07-05 00:40:50 +02:00
parent 56a209a1e8
commit 717025cbde
1 changed files with 3 additions and 1 deletions

View File

@ -210,7 +210,7 @@ var MSP = {
process_data: function (code, message_buffer, message_length) {
var data = new DataView(message_buffer, 0); // DataView (allowing us to view arrayBuffer as struct/union)
switch (code) {
if (!this.unsupported) switch (code) {
case MSP_codes.MSP_IDENT:
console.log('Using deprecated msp command: MSP_IDENT');
// Deprecated
@ -839,6 +839,8 @@ var MSP = {
default:
console.log('Unknown code detected: ' + code);
} else {
console.log('FC reports unsupported message error: ' + code);
}
// trigger callbacks, cleanup/remove callback after trigger