use new c3nav android app setting for wifi scan interval
This commit is contained in:
parent
019aacd834
commit
275a292728
1 changed files with 10 additions and 1 deletions
|
@ -1625,10 +1625,19 @@ c3nav = {
|
|||
return c3nav._hasLocationPermission;
|
||||
},
|
||||
|
||||
getWifiScanRate: function() {
|
||||
if (mobileclient.getWifiScanRate) {
|
||||
return mobileclient.getWifiScanRate() * 1000;
|
||||
}
|
||||
// stay compatible to older app versions
|
||||
return 30000;
|
||||
|
||||
},
|
||||
_wifiScanningTimer: null,
|
||||
startWifiScanning: function() {
|
||||
if (c3nav._wifiScanningTimer == null) {
|
||||
c3nav._wifiScanningTimer = window.setInterval(function() { mobileclient.scanNow(); }, 30000);
|
||||
console.log("started wifi scanning with interval of " + c3nav.getWifiScanRate());
|
||||
c3nav._wifiScanningTimer = window.setInterval(function() { mobileclient.scanNow(); }, c3nav.getWifiScanRate());
|
||||
}
|
||||
},
|
||||
stopWifiScanning: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue