From b4730034c8decb6ea4bdb937a0c78302bbc374ad Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Wed, 16 Dec 2015 14:49:58 +0100 Subject: [PATCH] Disconnect on F1 boards when 'break' is received if connected. This happens when the device reboots due to incorrect hardware initialisation. This prevents the GUI saying 'waiting for data'. See https://github.com/cleanflight/cleanflight/pull/1436 Since the problem is already fixed in firmware there's not much reason to spent development working on additional GUI fixes. A disconnect will suffice. --- js/serial.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/serial.js b/js/serial.js index 7284c993..5f7c2824 100644 --- a/js/serial.js +++ b/js/serial.js @@ -68,6 +68,12 @@ var serial = { }); } break; + case 'break': + // This occurs on F1 boards with old firmware. + if (GUI.connected_to || GUI.connecting_to) { + $('a.connect').click(); + } + break; case 'timeout': // TODO break;