1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 11:59:51 +03:00

adding packet error indicator in status bar

fixes #8
This commit is contained in:
cTn 2013-12-05 10:34:10 +01:00
parent 0344110c2d
commit ac85aeff8a
3 changed files with 9 additions and 3 deletions

View file

@ -64,7 +64,8 @@ var MSP = {
message_buffer_uint8_view: undefined,
message_checksum: 0,
callbacks: []
callbacks: [],
packet_error: 0
};
function MSP_char_read(readInfo) {
@ -132,6 +133,9 @@ function MSP_char_read(readInfo) {
process_data(MSP.code, MSP.message_buffer, MSP.message_length_expected);
} else {
console.log('code: ' + MSP.code + ' - crc failed');
MSP.packet_error++;
$('span.packet-error').html(MSP.packet_error);
}
// Reset variables