Hide spinner after 5 seconds, show message if not connected.

This commit is contained in:
mmcwilliams 2018-01-08 20:14:08 -05:00
parent fb54403891
commit b114ef8b0e
1 changed files with 2 additions and 1 deletions

View File

@ -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 () {