1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

if unexpected data is received, throw an error instead of log, this will also attach a stack trace for easier debugging

This commit is contained in:
cTn 2014-08-30 08:35:09 +02:00
parent 37746bf3ed
commit 6dec7dfbc1

View file

@ -219,7 +219,7 @@ STM32_protocol.prototype.send = function (Array, bytes_to_read, callback) {
// result = true/false
STM32_protocol.prototype.verify_response = function (val, data) {
if (val != data[0]) {
console.log('STM32 Communication failed, wrong response, expected: ' + val + ' received: ' + data[0]);
console.error('STM32 Communication failed, wrong response, expected: ' + val + ' received: ' + data[0]);
GUI.log('STM32 Communication <span style="color: red">failed</span>, wrong response, expected: ' + val + ' received: ' + data[0]);
// disconnect