Detect and register unsupported message error from FC

10.3.x-maintenance
ProDrone 2015-07-05 00:21:14 +02:00
parent fb46711659
commit 56a209a1e8
1 changed files with 6 additions and 1 deletions

View File

@ -105,6 +105,7 @@ var MSP = {
callbacks: [],
packet_error: 0,
unsupported: 0,
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order
ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c'], // in LSB bit order
@ -141,10 +142,14 @@ var MSP = {
}
break;
case 2: // direction (should be >)
this.unsupported = 0;
if (data[i] == 62) { // >
this.message_direction = 1;
} else { // <
} else if (data[i] == 60) { // <
this.message_direction = 0;
} else if (data[i] == 33) { // !
// FC reports unsupported message error
this.unsupported = 1;
}
this.state++;