Fix logging in delayed state retreival for ble connections.

This commit is contained in:
mmcwilliams 2018-01-17 17:20:48 -05:00
parent b8787c0fac
commit fc4b180aa8
1 changed files with 2 additions and 1 deletions

View File

@ -170,13 +170,14 @@ mobile.frame = function () {
mobile.frameSuccess = function () {
console.log('Frame finished, getting state.');
if (STATE.exposure < 5000) {
console.log('Frame finished, getting state.');
mobile.ble.active = false;
document.getElementById('frame').classList.remove('focus');
mobile.getState();
} else {
setTimeout(() => {
console.log('Frame finished, getting state.');
mobile.ble.active = false;
document.getElementById('frame').classList.remove('focus');
mobile.getState();