Commit Graph
219 Commits
Author SHA1 Message Date
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 e12cfaaf38 Merge branch 'main' of https://github.com/jimrandomh/faceclaw into ring-health-fixes 2026-10-06 13:32:49 -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 71fade31f9 Notifications in the bottom bar are focusable 2026-10-03 01:15:42 -07:00
James Babcock 7d8f03ffe5 Clean up unused code
Mostly remnants of iOS porting, where some things were temporarily in
typescript but became shared kotlin
2026-09-30 13:54:50 -07:00
James Babcock f7fa4addc0 Merge branch 'microphone-fixes' 2026-09-29 20:34:09 -07:00
James Babcock 6267afaff7 Improve connection stability, I hope 2026-09-29 14:33:23 -07:00
James Babcock cb6dddd120 Add a video player, launched by selecting a video file from the Files app 2026-09-28 14:11:04 -07:00
James Babcock 2052e268b0 Add touch-down event to simulated and watch inputs 2026-09-28 02:34:08 -07:00
James Babcock 10865fc0cb Merge branch 'main' into microphone-fixes 2026-09-27 23:19:03 -07:00
James Babcock 45d2ece0d2 Optimize phone CPU usage 2026-09-27 23:16:41 -07:00
James Babcock e879c58d9c EvenHub phone UI: add top bar, add open icon 2026-09-27 21:38:04 -07:00
James Babcock 8798198f4d Fix crash on install of larger EvenHub apps 2026-09-27 18:22:44 -07:00
James Babcock c007186e05 Fix crash on install of larger EvenHub apps 2026-09-27 18:14:50 -07:00
James Babcock 80f16c0cd6 Merge branch 'main' of https://github.com/jimrandomh/faceclaw into microphone-fixes 2026-09-27 17:57:23 -07:00
James Babcock 3601a998a3 CPU usage optimizations 2026-09-27 16:33:43 -07:00
James Babcock c119883ca0 Add ring debug; change GATT locking 2026-09-27 15:32:49 -07:00
James Babcock a8c9ab0a98 Merge branch 'main' of https://github.com/jimrandomh/faceclaw into ring-health-fixes 2026-09-26 23:01:41 -07:00
James Babcock aeeea5ead3 Animations in EvenHub menus; closer style matching 2026-09-26 22:46:30 -07:00
James Babcock 7d0becfaa7 Fix some microphone-related bugs, add a debug panel 2026-09-26 14:12:29 -07:00
James Babcock a2166c6a6c Merge branch 'main' of https://github.com/jimrandomh/faceclaw into ring-health-fixes 2026-09-25 23:12:20 -07:00
James Babcock 7ad9fe10ad Calendar: Fix a timezone issue that could cause all-day events to appear on the preceding day 2026-09-25 11:56:29 -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 587364e5e6 Convert most Android-specific kotlin to shared or shareable 2026-09-22 18:43:55 -07:00
James Babcock f9724ddcab Convert remaining Java to Kotlin 2026-09-22 17:26:09 -07:00
James Babcock ea9bfae6af Refactor: g2flash protocol doesn't have so many magic numbers 2026-09-22 16:27:04 -07:00
James Babcock 2e4d20e130 Clean up unused worker threads for closed apps; other performance optimizations 2026-09-22 14:56:54 -07:00
James Babcock 9560f3ac8d Phone CPU usage optimization 2026-09-22 14:19:23 -07:00
James Babcock 4320021222 Display lists 2026-09-22 00:25:40 -07:00
James Babcock 0c3d7517bc Resource management for the texture cache 2026-09-20 18:23:33 -07:00
James Babcock ccb320c66f Add tokens and faceclaw-input script, which allows using a CLI utility as an input device for the glasses 2026-09-20 00:34:58 -07:00
James Babcock 7b19c00443 Forward ring input events before filtering, and include swipe info 2026-09-19 19:02:11 -07:00
James Babcock 15a3e129b2 iOS wakeword support 2026-09-19 01:37:36 -07:00
James Babcock 68810197a8 Refactor Java to shared kotlin 2026-09-18 22:48:20 -07:00
James Babcock bc8e80c533 Kotlin on iOS 2026-09-18 19:59:13 -07:00
James Babcock 1e1c3f799d Introduce Kotlin 2026-09-18 19:35:50 -07:00
James Babcock edef7138fd Merge branch 'main' into ring-health-fixes 2026-09-18 00:08:02 -07:00
James Babcock 25c398d60f Wait for final results from Whisper before completing
<details>
<summary>Prompts Used</summary>
User: This checkout corresponds to https://github.com/jimrandomh/faceclaw/pull/27. Review this branch.

GPT-6 Astra:
> Found one issue:
>
> - **[P2] Wait for Whisper’s final result before completing dictation** — [FaceclawVoiceController.java:729](/Users/jbabcock/repositories/g2/faceclaw/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVoiceController.java:729). Skipping partial decodes leaves short utterances without text until release, but the dialog still finalizes after its existing timeout. If decoding exceeds roughly 2.7 seconds (native stop’s 1.5-second wait plus the dialog’s 1.2-second timeout), auto-send can abandon a short command or send an incomplete longer one. Continue can append the late editing instruction literally instead of refining the message. I reproduced these outcomes with delayed transcript events. These flows should await recognition completion.
>
> Validation: TypeScript and a clean Android build passed. All 21 test failures also occur on `main`. Actual Whisper latency was not tested on hardware.

<hr>

User: Thanks, let's fix that issue.

GPT-6 Astra:
> Fixed. Dictation now waits for native recognition to finish before fallback timers run. Auto-send, Continue, and AI Chat preserve delayed Whisper results; cancellation ignores late transcripts.
>
> TypeScript and Android builds pass. All 11 new regression tests pass. The full suite still has the same 21 pre-existing failures.
</details>
2026-09-17 22:12:33 -07:00
James Babcock 91890a25ac Merge branch 'pr-ondevice-whisper' of https://github.com/leofingal/faceclaw into pr-ondevice-whisper 2026-09-17 21:59:28 -07:00
James Babcock 27a5fe47ef Fix remaining health review issues and document ring clock skew 2026-09-17 21:21:05 -07:00
James Babcock 7677dd254e Decode R1 daily health pages and direct battery status 2026-09-17 20:58:35 -07:00
James Babcock c595cb4b6e Fix ring health persistence and page acknowledgements 2026-09-17 20:23:15 -07:00
Chris LeeandClaude Opus 5 0db295d802 R1 ring: health-data BLE protocol (codec, five record decoders, page ACK)
Implements the Even R1 ring's health-sync protocol, reverse-engineered from
Bluetooth HCI snoop captures of Even's own app and confirmed field-by-field
against that app's CSV export. Answers the open question in issue #22, and in
notes/apps.txt, about where interpretation happens: it happens ON THE RING.
Sleep arrives already classified into stages; the phone does no inference.

RingProtocol.java: 15-byte header, 2-byte command id, CRC-32C (non-reflected)
over the frame body, fragment reassembly, and decoders for all five record
types -- heart rate, HRV, SpO2, sleep and steps. Hourly types share the shape
[hour_index][avg][max][min]. Steps are 10-minute buckets counted from the
record's anchor. RingProtocolSelfTest.java covers the codec against captured
bytes.

Three traps are documented in the code because each one costs days and a
reviewer "tidying" any of them would silently break the sync:

1. The 00:08 handshake frame is the ONE request whose payload carries no
   nonce -- it is exactly 3f 01 01. Measured across 46 real writes with zero
   exceptions: the 3-byte form is always answered, the 5-byte form never is.
   Prepending a nonce makes the ring discard the frame and then ignore every
   subsequent request on that connection.

2. The ring holds only one health type's response in flight. Requesting the
   next type before the previous type's DATA arrives silently drops it, and a
   lost race appears to discard that backlog PERMANENTLY rather than delaying
   it. requestRingHealth() is therefore response-paced, not sleep-paced, and
   ACKs each page as it lands.

3. HEALTH_COMMANDS mirrors the order Even's app uses. Whether the ring cares
   is untested, and matching is the cheap way not to find out the hard way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 20:14:09 -07:00
James Babcock 5698c584a3 Expand texture cache to 256kb 2026-09-17 18:52:50 -07:00
James Babcock b9b8128756 BLE bandwidth benchmark uses incompressible messages 2026-09-17 18:52:14 -07:00
James Babcock 720f6af8f8 Do message compression at the transport level, rather than in individual messages 2026-09-16 22:47:56 -07:00
Chris LeeandClaude Sonnet 5 2d717a9cdb Add on-device Whisper as a second offline transcription option
sherpa-onnx's native library already reads an offline Whisper config
(verified against sherpa-onnx/jni/offline-recognizer.cc at v1.13.0);
only the Java wrapper was a package-private stub. This adds a public
OfflineWhisperModelConfig builder and wires base.en (int8) in as a
second on-device model next to Moonshine.

- FaceclawVoiceController: setOnboardModelKind() selects the model
  before start("onboard"); defaults to Moonshine. Whisper skips the
  700ms live-partial redecode (each call re-encodes the whole utterance
  plus ~10s of tail padding) and gates near-silent segments before
  decode.
- asr-model.ts: ASR_MODELS registry with per-model download state.
- Settings > Voice: "On-device (Moonshine)", "On-device (Whisper)",
  and "OpenAI (Whisper)" for the existing cloud provider (stored
  value unchanged); one model row per on-device model.
- Microphones live captions pass "moonshine" explicitly (unchanged).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:46:22 -04:00
James Babcock 33bfdcf1d1 Send messages through a new SID, rather than image messages 2026-09-13 21:42:29 -07:00