Commit f3c76c3
feat(hud): phone-Wi-Fi interference advisory + faster off-air recovery (0.1.9)
Two improvements driven by the 2026-06-30 field logs (HUD 0.1.8 confirmed the
self-heal works: on arriving home it logged "recovered after 33.8s off-air
(restart x1 reassoc x4 toggle x3)" and came back with no reboot; the toggle
running proves the Motoeye E6 is API<=28, so the full toolkit is available).
1) Faster severe-case recovery. The 33.8s recovery was slow because the ladder
reached the WiFi toggle (the rung that actually clears it on this device)
only on the 3rd action and ticked every 3s. Now:
- recoveryStepFor front-loads the toggle (RESTART -> TOGGLE -> REASSOC -> ...)
since the field log showed reassociate alone did not clear the off-air state.
- RECOVERY_INTERVAL_MS 3s -> 1.5s, OFF_AIR_GRACE_TICKS 1 -> 0, toggle settle
1.5s -> 1.0s. Expected ~8-12s instead of ~34s. (LinkWatchdogTest updated.)
2) "Phone Wi-Fi is interrupting the HUD" rider advisory. Root cause confirmed by
the rider observing the HUD drop the instant the phone joined home Wi-Fi on
arrival: single-radio STA+AP channel-follow -- any phone Wi-Fi STA transition
re-tunes the shared hotspot radio and drops the link. The HUD can't see this
(it only knows the hotspot), so the PHONE detects it and tells the HUD:
- hud-protocol WifiInterferenceDetector (pure, unit-tested): flags interference
only when an established-link HUD drop lands within ~20s of one of the
phone's OWN Wi-Fi STA transitions, >=2 times; auto-clears after stable.
- app HudServer feeds it (STA transitions from the NetworkCallback incl. a new
onLost; established-link drops via a wasOpen-gated onFailure) and publishes
HudState.phoneWifiInterfering (wire proto minor 9 -> 10, additive).
- HUD shows a BottomStart advisory badge in the SAME chrome family as the
existing version/disconnect badges (0xE6111111 fill, 1.dp stroke, info-yellow,
icon + stacked title/detail) reading "Phone Wi-Fi interrupting HUD / Turn off
phone Wi-Fi for a stable link".
HUD bumped to 0.1.9 (300010). Needs the matching phone app (proto 10) for the
advisory; older phones simply never set the flag.
Verified: hud-protocol unit tests 39/39 (incl. 5 new detector + updated ladder);
:hud and :app compile clean; both debug APKs assemble; installed on emulator-5554
(API 36) and launched -- neither app crashes, watchdog logs verdict=HEALTHY at idle
(peerKnown=false correctly NOT treated as off-air). On-device radio recovery still
needs the tester to confirm the faster timing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fpo6EKJ9QYwyb9FkKQWrTn1 parent 74b3416 commit f3c76c3
10 files changed
Lines changed: 280 additions & 24 deletions
File tree
- app/src/main/java/com/eried/eucplanet/service/hud
- hud-protocol/src
- main/java/com/eried/eucplanet/hud/protocol
- test/java/com/eried/eucplanet/hud/protocol
- hud
- src/main
- java/com/eried/eucplanet/hud
- net
- ui
- res/values
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
172 | 180 | | |
173 | 181 | | |
174 | 182 | | |
| |||
339 | 347 | | |
340 | 348 | | |
341 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
342 | 355 | | |
343 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
344 | 361 | | |
345 | 362 | | |
346 | 363 | | |
| |||
357 | 374 | | |
358 | 375 | | |
359 | 376 | | |
| 377 | + | |
360 | 378 | | |
361 | 379 | | |
362 | 380 | | |
| |||
676 | 694 | | |
677 | 695 | | |
678 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
679 | 701 | | |
680 | 702 | | |
681 | 703 | | |
| 704 | + | |
682 | 705 | | |
683 | 706 | | |
684 | 707 | | |
| |||
733 | 756 | | |
734 | 757 | | |
735 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
736 | 765 | | |
737 | 766 | | |
738 | 767 | | |
| |||
749 | 778 | | |
750 | 779 | | |
751 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
752 | 784 | | |
753 | 785 | | |
754 | 786 | | |
| |||
885 | 917 | | |
886 | 918 | | |
887 | 919 | | |
888 | | - | |
| 920 | + | |
| 921 | + | |
889 | 922 | | |
890 | 923 | | |
891 | 924 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
193 | 202 | | |
194 | 203 | | |
195 | 204 | | |
| |||
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
220 | 232 | | |
221 | | - | |
| 233 | + | |
222 | 234 | | |
223 | 235 | | |
224 | 236 | | |
| |||
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
60 | | - | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
683 | 688 | | |
684 | 689 | | |
685 | 690 | | |
686 | | - | |
| 691 | + | |
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
| |||
0 commit comments