Glanceboard: configurable head-tilt angle, glance down to hide

- Head tilt angle setting (Glanceboard): sets the glasses' own head-up
  trigger through the stock settings message (g2_setting.proto
  DeviceReceiveInfoFromAPP.deviceReceiveHeadUpSetting), so detection stays
  on the glasses and nothing streams while the screen is off. The stored
  calibration is read back and compensated for, and the value is
  re-applied on every connect. "glasses" (the default) leaves the
  glasses' setting untouched.
- "Set to current head angle" measures the tilt from a ~1.2 s IMU burst
  and rounds it to the nearest 5 degrees.
- Glance down to hide: a head-tilt showing now stays up until the head comes back down
  (HEAD_DOWN, forwarded by Faceclaw/38) instead of a fixed timeout, with
  a 60 s safety cap. HEAD_DOWN goes only to the Glanceboard on Android
  and iOS, so it never counts as shell activity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BrendenandClaude Opus 5.5 committed 2026-11-06 08:58:33 -08:00
1 parent c896ce9ac8
commit cf74f34767
15 files changed
+536 -21

No files matched your search

+7
View File
@@ -961,6 +961,13 @@ export class IosPreviewController {
private handleRingEvent(input: RawInputEvent): void {
this.inputQueue = this.inputQueue.then(async () => {
if (this.state.phase !== 'connected') return
if (input.kind === 'sys-event' && input.eventType === OsEventTypeList.HEAD_DOWN_EVENT) {
// As on Android: only the Glanceboard uses it (it ends a head-tilt
// showing); it never reaches the shell or counts as activity.
const glanceEvent = this.glance.eventForGesture('head-down')
if (glanceEvent) await this.glance.handleEvent(glanceEvent, 0)
return
}
this.onActivity()
if (input.ringInput) this.state = { ...this.state, ring: true }
await this.receiveInput(rawInputEventToInputEvent(input),