diff --git a/list_missing_hwids.py b/list_missing_hwids.py index 9a38b12..0c32ec6 100644 --- a/list_missing_hwids.py +++ b/list_missing_hwids.py @@ -6,13 +6,19 @@ from grmn import devices import sys +largest_gap = -1 +gap_counter = 0 last_id = 0 missing = [] for i in range(0, 9999): if i in devices.DEVICES: last_id = i + if gap_counter > largest_gap: + largest_gap = gap_counter + gap_counter = 0 continue missing.append(i) + gap_counter += 1 missing_count = 0 cur_line = [] @@ -37,6 +43,7 @@ if len(cur_line) > 0: print() print("{} unknown ids.".format(missing_count)) print("Last known id is: {:04}".format(last_id)) +print("Largest gap is: {}".format(largest_gap)) if len(sys.argv) > 1: @@ -46,7 +53,7 @@ if len(sys.argv) > 1: print("./get_updates.py", end="") cur_line = 0 - for i in range(last_id + 1, last_id + 200): + for i in range(last_id + 1, last_id + 300): if i % 10 == 0 and cur_line > 5: print() print("./get_updates.py", end="")