mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-16 21:05:28 +03:00
Detect and register unsupported message error from FC
This commit is contained in:
parent
fb46711659
commit
56a209a1e8
1 changed files with 6 additions and 1 deletions
|
@ -105,6 +105,7 @@ var MSP = {
|
||||||
|
|
||||||
callbacks: [],
|
callbacks: [],
|
||||||
packet_error: 0,
|
packet_error: 0,
|
||||||
|
unsupported: 0,
|
||||||
|
|
||||||
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order
|
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order
|
||||||
ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c'], // in LSB bit order
|
ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c'], // in LSB bit order
|
||||||
|
@ -141,10 +142,14 @@ var MSP = {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // direction (should be >)
|
case 2: // direction (should be >)
|
||||||
|
this.unsupported = 0;
|
||||||
if (data[i] == 62) { // >
|
if (data[i] == 62) { // >
|
||||||
this.message_direction = 1;
|
this.message_direction = 1;
|
||||||
} else { // <
|
} else if (data[i] == 60) { // <
|
||||||
this.message_direction = 0;
|
this.message_direction = 0;
|
||||||
|
} else if (data[i] == 33) { // !
|
||||||
|
// FC reports unsupported message error
|
||||||
|
this.unsupported = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.state++;
|
this.state++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue