forked from Blendman974/faceclaw
Refactor iOS glasses connection handling to shared code, fixing incompatible-version-detection and other error cases
This commit is contained in:
1 parent
9b0bf77d79
commit
66ca06f584
16 files changed
+341
-119
No files matched your search
@@ -14,6 +14,7 @@ export type CommunicatorPhase =
|
||||
| "charging"
|
||||
| "retrying"
|
||||
| "unpaired"
|
||||
| "incompatible-firmware"
|
||||
| "disconnecting";
|
||||
|
||||
export type CommunicatorState = {
|
||||
@@ -34,7 +35,7 @@ export type FrameMetrics = {
|
||||
tileCount: number;
|
||||
};
|
||||
|
||||
import { type FirmwareInfo } from "../g2/firmware-compat";
|
||||
import { REQUIRED_FACECLAW_FIRMWARE_VERSION, type FirmwareInfo } from "../g2/firmware-compat";
|
||||
|
||||
export type { FirmwareInfo };
|
||||
|
||||
@@ -169,6 +170,8 @@ export class FaceclawCommunicatorBridge {
|
||||
addresses.left,
|
||||
addresses.ring ?? "",
|
||||
);
|
||||
// The shared session halts on any other firmware ("incompatible-firmware").
|
||||
this.communicator.setRequiredFirmwareRevision(REQUIRED_FACECLAW_FIRMWARE_VERSION);
|
||||
this.listenerProxy = new com.faceclaw.app.FaceclawBleCommunicatorListener({
|
||||
onStateChange: (phase: string, status: string) => {
|
||||
const state = {
|
||||
|
||||
Reference in new issue
Block a user