Skip to content

Commit 3440e33

Browse files
committed
update time to 250ms
1 parent b2c93c3 commit 3440e33

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

app/src/main/java/com/alfaloop/android/alfabeacon/fragment/ScannerFragment.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private void initDelayView() {
265265
mCountTimer = Rx2Timer.builder()
266266
.initialDelay(0)
267267
.period(1)
268-
.take(500)
268+
.take(250)
269269
.unit(TimeUnit.MILLISECONDS)
270270
.onCount(new Rx2Timer.OnCount() {
271271
@Override
@@ -368,10 +368,6 @@ private void scanResultParser(ScanResult result) {
368368
if (record == null)
369369
return;
370370

371-
// if(result.getRssi() < -60) {
372-
// return;
373-
// }
374-
375371
String deviceName = record.getDeviceName();
376372
List<ParcelUuid> advUuids = record.getServiceUuids();
377373
if (deviceName == null || advUuids == null)
@@ -384,8 +380,6 @@ private void scanResultParser(ScanResult result) {
384380
byte[] sdata = record.getServiceData(u);
385381
type = (int)sdata[0];
386382
battery = (int)sdata[1];
387-
388-
// Log.i(TAG, ParserUtils.bytesToHex(sdata));
389383
break;
390384
}
391385
}
@@ -411,6 +405,7 @@ private void scanResultParser(ScanResult result) {
411405
}
412406
}
413407
previous.setRssi(result.getRssi());
408+
previous.setDatetime(new Date());
414409
mLeBeaconHashMap.put(previous.getMacAddress(), previous);
415410
}
416411
// updateBeaconList();

0 commit comments

Comments
 (0)