mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-08-03 02:18:34 +00:00
use fixed poll delay from const
This commit is contained in:
@ -42,6 +42,8 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
private var mTemplates as Lang.Dictionary = {};
|
private var mTemplates as Lang.Dictionary = {};
|
||||||
private var mNotifiedNoBle as Lang.Boolean = false;
|
private var mNotifiedNoBle as Lang.Boolean = false;
|
||||||
|
|
||||||
|
private const wifiPollDelayMs = 2000;
|
||||||
|
|
||||||
//! Class Constructor
|
//! Class Constructor
|
||||||
//
|
//
|
||||||
function initialize() {
|
function initialize() {
|
||||||
@ -458,11 +460,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
|
|
||||||
mNotifiedNoBle = true;
|
mNotifiedNoBle = true;
|
||||||
setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||||
|
mUpdateTimer.start(method(:startUpdates), wifiPollDelayMs, false);
|
||||||
var delay = Settings.getPollDelay();
|
|
||||||
if (delay > 0) {
|
|
||||||
mUpdateTimer.start(method(:startUpdates), delay, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
mUpdating = false;
|
mUpdating = false;
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user