diff options
author | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-02-04 16:19:38 +0300 |
---|---|---|
committer | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-02-04 16:19:38 +0300 |
commit | 5c4b2806ade0e6bb62d04326f2b74223c347cece (patch) | |
tree | 5d2043d2fc512446df79c9fdc0fb063d296207a2 /js | |
parent | 3c19c1578238c468fbccd150f92153e4580cb4ca (diff) |
Display a modal during reboot
Diffstat (limited to 'js')
-rwxr-xr-x | js/serial_backend.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/serial_backend.js b/js/serial_backend.js index abd53562..677c7704 100755 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -22,8 +22,19 @@ $(document).ready(function () { GUI.handleReconnect = function ($tabElement) { + let modal; + if (BOARD.hasVcp(CONFIG.boardIdentifier)) { // VCP-based flight controls may crash old drivers, we catch and reconnect + modal = new jBox('Modal', { + width: 400, + height: 100, + animation: false, + closeOnClick: false, + closeOnEsc: false, + content: $('#modal-reconnect') + }).open(); + /* Disconnect */ @@ -35,6 +46,7 @@ $(document).ready(function () { Connect again */ setTimeout(function start_connection() { + modal.close(); $('a.connect').click(); /* |