From b114ef8b0eb9a9bc6f2386c534aecc54f5cac99c Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 8 Jan 2018 20:14:08 -0500 Subject: [PATCH] Hide spinner after 5 seconds, show message if not connected. --- app/www/static/js/intval.mobile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/www/static/js/intval.mobile.js b/app/www/static/js/intval.mobile.js index 7315826..c8d605c 100644 --- a/app/www/static/js/intval.mobile.js +++ b/app/www/static/js/intval.mobile.js @@ -24,8 +24,8 @@ mobile.ble.scan = function () { ble.scan([], 5, mobile.ble.onDiscover, mobile.ble.onError); mobile.ble.devices = []; setTimeout(() => { + spinnerHide(); if (!mobile.ble.connected) { - spinnerHide(); alert('No INTVAL devices found.'); settingsPage(); } @@ -128,6 +128,7 @@ mobile.init = function () { } spinnerInit(); mobile.ble.scan(); + }; mobile.getState = function () {