Commit Graph
24 Commits
Author SHA1 Message Date
James Babcock 6e4515afa5 Add ANCS support to G1 2026-11-06 21:47:23 -08:00
James Babcock 67aff19923 Faceclaw support for G1s
Relies on the glasses having the firmware from
https://github.com/jimrandomh/scouter_kit, based on Mafik's Scouter Kit.
2026-11-06 00:12:23 -08:00
James Babcock b2b6c5c8d8 Merge branch 'main' into rayneo-io-support 2026-11-03 14:06:19 -08:00
Om Alve 046454e8c0 Merge remote-tracking branch 'origin/main' into g2-case-battery
# Conflicts:
#	native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt
2026-11-02 12:02:53 +05:30
Om Alve fa7f33bfe8 Case battery: stop showing stale charging; read after the layout
Review fixes for the charging-case battery:

- The case reports whether the glasses are docked. An empty caseInfo
  (the reply out of the case) now parses as "not docked, no level"
  instead of nothing, and undocking is reported even when the level and
  charge state are unchanged. TS keeps the last level but clears
  caseCharging while the glasses are out of the case.
- The phone line shows the charging mark only while it is live: G2 and
  Case only with a link to the glasses (connected or charging), and Case
  only while docked. Levels stay as the last known ones.
- The session-start case read waits until the layout is up, so a
  firmware that ignored it could no longer hold up the first frame. When
  the glasses are already charging at connect, the charging-mode read is
  the only one; the old duplicate read and its "late ACK" log are gone.
- Case dedup state resets on every connect, as wearState does, so each
  session's read reaches TS.
- caseCharging uses > 0 like the headset, and is normalized to 0/1.
- iOS now feeds the reading into the shell battery state, and the
  assistant's describeState includes the case level.
- The batteryLine accessors move above connectionStatusLabel's doc
  comment.
2026-11-02 12:01:12 +05:30
James Babcock 9ddd4c4d03 Add microphone support on RayNeo iO 2026-11-01 21:08:25 -08:00
James Babcock 4d101eefe1 Partial support for Rayneo iO 2026-11-01 17:19:55 -08:00
James Babcock fcea0b369a Merge branch 'main' of https://github.com/jimrandomh/faceclaw into ring-health-fixes 2026-11-01 11:00:38 -08:00
Om Alve acfcf79787 Read the charging case battery (sid 0x81 GlassesCaseInfo)
The glasses relay the charging case's state on UX_GLASSES_CASE_APP_ID
(sid 0x81): GlassesCaseDataPackage{commandId=CASE_INFO, magicRandom,
caseInfo{soc, chargeStatus, lidStatus, inCaseStatus, errorCode}}, the
schema in g2-kit-unofficial's glasses_case.proto. The Even app reads it
with an empty caseInfo (ProtoBaseSettings.getGlassesCaseInfo).

Observed on G2 2.3.0.24 / Faceclaw/38: while docked the right temple
pushes a GlassesCaseInfo (flag 0x01, its own magic) on every change --
docking, lid, USB, each 1% -- and answers a read with full data; out of
the case a read comes back with an empty caseInfo. Docking pushes
{inCaseStatus=1} before the level, and proto3 drops zero fields, so a
missing soc means no level rather than 0%.

So read it once at session start (docked glasses may be fully charged
and never enter charging mode) and again on entering charging mode,
which clears the queue; pushes carry every later change. Every 0x81
frame is taken as state in onNotification (pushes skip the ack path by
flag). New readings reach TypeScript through
FaceclawBleCommunicatorListener.onCaseState (level, case-charging), on
Android and iOS. Captured frames are tests.
2026-11-01 20:38:32 +05:30
James Babcock c5f80a0b00 Merge branch 'main' of https://github.com/jimrandomh/faceclaw 2026-10-31 14:04:41 -07:00
James Babcock a5eda29368 Port developer debug tests to iOS 2026-10-31 13:57:18 -07:00
James Babcock 8e50c004a6 Make BLE benchmark work on iOS 2026-10-26 11:12:55 -07:00
James Babcock 4f8c082b52 Merge branch 'main' into ring-health-fixes 2026-10-25 01:06:38 -07:00
James Babcock 7e59f4a58d Fix some iOS crashes; show the ring connection setting 2026-10-17 12:28:23 -07:00
FilipAlexanderandClaude Opus 5.5 ecb6c7f465 iOS: fix the audio-packet and window-close crashes, stop retrying the ring
- Rename IosAudioPacketListener.onAudioPacket to onNsDataAudioPacket. The
  selector collided with FaceclawAudioPacketListener's, Kotlin/Native mangled
  one of the two depending on export order, and the first glasses audio packet
  aborted the app with "unrecognized selector".
- Closing a window (e.g. Transcribe from its system menu) aborted the app: the
  menu pop re-renders the window, that frame is queued behind the surface
  removal, and Kotlin's compositor throws on the unknown surface. The bridge now
  tracks which surfaces Kotlin holds and drops stale calls inside the queue,
  submit re-checks the window is still open, and the IosGlassesSession surface
  wrappers log and drop compositor errors instead of aborting.
- Only connect to the R1 ring from the phone in "Direct" mode, as Android does.
  iOS always tried; the failing connect retried every few seconds and starved
  the glasses link, so the glasses image lagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:42:41 +02:00
James Babcock 96e3bd95f7 Center the phone screen preview 2026-10-12 17:12:36 -07:00
James Babcock f38595422c Build out Ring Status debug tool; fix some aspects of ring direct communication 2026-10-06 19:53:43 -07:00
James Babcock 4234d3e9e9 Fix an issue where animations on the phone preview stopped prematurely 2026-10-03 15:54:57 -07:00
James Babcock 66ca06f584 Refactor iOS glasses connection handling to shared code, fixing incompatible-version-detection and other error cases 2026-10-03 15:08:37 -07:00
James Babcock 06146c2b08 Introduce oxlint, and fix lint warnings 2026-09-29 11:54:22 -07:00
James Babcock 45d2ece0d2 Optimize phone CPU usage 2026-09-27 23:16:41 -07:00
James Babcock 4f3ad37c20 Custom auto-brightness, and fade in/out effects 2026-09-25 00:57:43 -07:00
James Babcock 915f155819 Add Glanceboard depth setting 2026-09-24 02:26:20 -07:00
James Babcock 4a194e37bb Refactor iOS version to use a bunch more shared code 2026-09-22 21:26:51 -07:00