Skip to content

Commit 79e1473

Browse files
committed
Reduce WiFi warmup buffer from 45s to 15s
1 parent 597ddce commit 79e1473

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/com/bpmct/trmnl_nook_simple_touch/DisplayActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ protected void onResume() {
384384
}
385385
}
386386

387-
/** When we just turned WiFi on, delay fetch so connection can establish (Electric-Sign uses 45s). */
387+
/** When we just turned WiFi on, delay fetch so connection can establish. */
388388
private void scheduleFetchAfterWifiWarmup() {
389389
if (pendingWifiWarmupRunnable != null) {
390390
refreshHandler.removeCallbacks(pendingWifiWarmupRunnable);
@@ -489,13 +489,13 @@ private boolean ensureWifiOnWhenForeground() {
489489
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
490490
if (wifi != null && !wifi.isWifiEnabled()) {
491491
wifi.setWifiEnabled(true);
492-
logD("wifi on (app in foreground), wait ~45s for connection");
492+
logD("wifi on (app in foreground), wait ~15s for connection");
493493
return true;
494494
}
495495
return false;
496496
}
497497

498-
private static final long WIFI_WARMUP_MS = 45 * 1000;
498+
private static final long WIFI_WARMUP_MS = 15 * 1000;
499499

500500
@Override
501501
public void onUserInteraction() {
@@ -615,7 +615,7 @@ public void run() {
615615
setKeepScreenAwake(false);
616616
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
617617
if (wifi != null) wifi.setWifiEnabled(false);
618-
logD("sleep-ready: alarm in " + (sleepMs / 1000L) + "s (+45s warmup = next image on time; NOOK may blank after idle, e.g. 2m)");
618+
logD("sleep-ready: alarm in " + (sleepMs / 1000L) + "s (+15s warmup = next image on time; NOOK may blank after idle, e.g. 2m)");
619619
}
620620
};
621621
refreshHandler.postDelayed(pendingSleepRunnable, SCREENSAVER_DELAY_MS);

0 commit comments

Comments
 (0)