G1 support: Preserve connections after flashing, debug

This commit is contained in:
James Babcock committed 2026-11-07 04:16:15 -08:00
1 parent 595b462b2e
commit b353483ac2
38 files changed
+1291 -178

No files matched your search

+3
View File
@@ -7,6 +7,9 @@ export type { G1FlashMode, G1FlasherOptions } from './g1-flasher'
declare const FaceclawKitIosG1Flasher: any, FaceclawKitFaceclawFirmwareFlasherListener: any
/** CoreBluetooth has no way to remove a pairing; iOS Settings does it, and a stale one does no harm. */
export function forgetG1Pairing(_address: string): void {}
/**
* iOS twin of the Android G1Flasher: the shared Kotlin G1ArmFlashFlow over a CoreBluetooth central. As with the G2's
* flasher, the phone must stay in the foreground with the screen awake, and addresses are mapped to peripheral
+6
View File
@@ -15,6 +15,12 @@ export type G1FlasherOptions = {
connectWindowMs: number;
};
/** Removes the phone's pairing with an address the glasses no longer use. */
export function forgetG1Pairing(address: string): void {
const context = Utils.android.getApplicationContext();
if (context) com.faceclaw.app.FaceclawG1Flasher.forgetPairing(context, address);
}
/** TS wrapper around FaceclawG1Flasher: one arm's install, or a question about what it runs. */
export class G1Flasher {
private readonly flasher: any;