Refactor iOS glasses connection handling to shared code, fixing incompatible-version-detection and other error cases

This commit is contained in:
James Babcock committed 2026-10-03 15:08:37 -07:00
1 parent 9b0bf77d79
commit 66ca06f584
16 files changed
+341 -119

No files matched your search

+13
View File
@@ -24,3 +24,16 @@ export function resumeAutoReconnect(): void {
export function isAutoReconnectSuppressed(): boolean {
return suppressed;
}
/**
* Communicator phases in which the shared session core has parked its retry
* loop for good: "unpaired" (an arm's OS bond is gone) and
* "incompatible-firmware" (the glasses run firmware this app can't use).
* Redialing would fail the same way, so both platform controllers tear the
* session down into the manual-disconnected state on these.
*/
export type HaltedSessionPhase = "unpaired" | "incompatible-firmware";
export function isHaltedSessionPhase(phase: string): phase is HaltedSessionPhase {
return phase === "unpaired" || phase === "incompatible-firmware";
}