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

soft and hard serial port lock with watchdog

This commit is contained in:
Pawel Spychalski (DzikuVx) 2017-01-22 00:02:52 +01:00
parent 4ae45333a8
commit a439456ab9
3 changed files with 75 additions and 10 deletions

View file

@ -112,18 +112,26 @@ var MSP = {
mspHelper.processData(this);
} else {
console.log('code: ' + this.code + ' - crc failed');
console.log(data);
this.packet_error++;
$('span.packet-error').html(this.packet_error);
}
/*
* Free port
*/
helper.mspQueue.freeHardLock();
// Reset variables
this.message_length_received = 0;
this.state = 0;
break;
default:
/*
* Free port
*/
helper.mspQueue.freeHardLock();
console.log('Unknown state detected: ' + this.state);
}
}