The glanceboard head-tilt option was more complicated than necessary,
because it wanted the user to take two angle measurements, a baseline
angle and a tilt angle. That was a workaround to not knowing the
accelerometer's orientation/calibration, but actually, we do know those.
(Except, as it turns out, on the G1, the accelerometer orientation is
different than it is on the G2, and there was a bug where EvenHub apps
got their accelerometer readings in the wrong orientation. So for
example the EvenHub Level app didn't work correctly.)
- A verification read that still disagrees no longer requeues the writes at
once (which looped while the firmware refused the value); the next regular
poll retries.
- "Glasses default" now writes back the glasses' own switch and angle, saved
before Faceclaw first changed them (persisted across app restarts), and
drops writes still queued. Disabling the Glanceboard does the same.
- "Set to current head angle" takes two readings, head level then tilted up,
and uses the angle between them, so it no longer depends on the sensor's
axes or folds past 45°. A head that did not move is reported, not stored
as 5°. The math is in head-tilt-math.ts, with tests.
- A head-tilt that woke a suspended session, or a trigger under 25° (where a
level gaze stays above the head-down threshold), hides after the tap
duration instead of the 60 s cap. The setting's description explains it.
- The angle rows are hidden on iOS, which cannot change the setting.
- The capture row repaints while measuring, ignores repeat selects, and its
status clears when the menu reopens or the angle changes; the angle is
sent once, by the controller's settings listener.
- Comments describing a head-tilt as a timed press are updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
ensurePermissions looked up the Activity before checking whether any
permission was missing, and getActivity() throws when there is none.
Android starts the app in the background with no Activity (a home-widget
update, a notification-listener rebind), and the glasses session runs
from there until the app is opened. So in that state every "Hey Even"
failed in ensureVoicePermissions even though the mic permission was
granted, and the voice dialog kept showing the idle "Voice control
stopped.". The same throw hit ensureBlePermissions.
The Activity is now only looked up when a permission actually has to be
requested. A capture that fails to start for any reason other than a
denied permission now says so in the dialog instead of leaving the idle
status up.
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.
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.