Skip to content
Snippets Groups Projects
Commit 28a8db33 authored by schneider's avatar schneider
Browse files

change(exnostat): Don't try to differentiate between Google and Apple

parent ef0001bd
No related branches found
No related tags found
1 merge request!412change(exnostat): Don't try to differentiate between Google and Apple
Pipeline #4754 passed
...@@ -111,8 +111,8 @@ def ble_callback(_): ...@@ -111,8 +111,8 @@ def ble_callback(_):
def show_stats(): def show_stats():
seen_google = 0 seen_t1 = 0
seen_apple = 0 seen_t2 = 0
t = time.time() - t0 t = time.time() - t0
...@@ -124,20 +124,18 @@ def show_stats(): ...@@ -124,20 +124,18 @@ def show_stats():
for mac in seen_copy: for mac in seen_copy:
info = seen_copy[mac] info = seen_copy[mac]
if info[1]: if info[1]:
seen_apple += 1 seen_t2 += 1
else: else:
seen_google += 1 seen_t1 += 1
if info[0] < t_min: if info[0] < t_min:
t_min = info[0] t_min = info[0]
seen_total = seen_google + seen_apple seen_total = seen_t1 + seen_t2
window = t - t_min if len(seen_copy) > 0 else min(TIMEOUT, t - last_rx_time) window = t - t_min if len(seen_copy) > 0 else min(TIMEOUT, t - last_rx_time)
disp.clear() disp.clear()
disp.print("Last %u s:" % window, posy=0, fg=color.WHITE) disp.print("Last %u s:" % window, posy=0, fg=color.WHITE)
disp.print("Google: %d" % seen_google, posy=20, fg=color.GREEN) disp.print("MACs: %d" % seen_total, posy=40, fg=color.WHITE)
disp.print("Apple: %d" % seen_apple, posy=40, fg=color.BLUE)
disp.print("Total: %d" % seen_total, posy=60, fg=color.WHITE)
disp.update() disp.update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment