Add support for using RayNeo iO together with an R1 ring

This commit is contained in:
James Babcock committed 2026-11-01 19:37:55 -08:00
1 parent dee60bbcd2
commit fde847a31a
10 files changed
+172 -47

No files matched your search

+10 -1
View File
@@ -874,9 +874,18 @@ export const ringConnectionModeSetting = new ConfigSettingEnum<RingConnectionMod
formatValue: (value) =>
value === "direct" ? "Direct to phone" : value === "health" ? "Via glasses + health sync" : "Only via glasses",
description:
"How the R1 ring reaches the phone. Only via glasses: the glasses relay the ring's gestures and the phone never connects to it. Via glasses + health sync: the same, plus the phone connects to the ring to sync health data. Direct to phone (experimental): the phone takes the ring over from the glasses and gets its gestures and battery itself; the glasses lose ring input. Health still syncs, but each sync (on opening Health, and at :01 and :31) pauses ring gestures for up to a minute while the phone briefly reconnects to the ring in its health role. Leaving Direct hands the ring back to the glasses. Takes effect on the next connection to the glasses.",
"How the R1 ring reaches the phone. Only via glasses: the glasses relay the ring's gestures and the phone never connects to it. Via glasses + health sync: the same, plus the phone connects to the ring to sync health data. Direct to phone (experimental): the phone takes the ring over from the glasses and gets its gestures and battery itself; the glasses lose ring input. Health still syncs, but each sync (on opening Health, and at :01 and :31) pauses ring gestures for up to a minute while the phone briefly reconnects to the ring in its health role. Leaving Direct hands the ring back to the glasses. A RayNeo iO has no ring link of its own, so with one the phone always connects to the ring directly. Takes effect on the next connection to the glasses.",
});
/**
* The ring connection in effect: the setting with G2 glasses; Direct with a
* RayNeo iO, which cannot relay a ring, so the phone holds the ring's
* glasses role itself (gestures, battery; health in brief phone-role windows).
*/
export function effectiveRingConnectionMode(): RingConnectionMode {
return glassesTypeSetting.get() === "rayneo-io" ? "direct" : ringConnectionModeSetting.get();
}
// "whisper" (no "onboard-" prefix) is OpenAI's CLOUD realtime model
// (gpt-realtime-whisper); "onboard-whisper" is the on-device sherpa-onnx
// Whisper backend. Same underlying model family, two different places it
+20 -1
View File
@@ -67,6 +67,7 @@ import {
previewScalingSetting,
phoneRotationSetting,
ringConnectionModeSetting,
glassesTypeSetting,
sonioxApiKeySetting,
saveTranscribeAudioSetting,
whisperServerApiKeySetting,
@@ -224,7 +225,7 @@ function settingsSections(): SettingsSection[] {
items: [
// Whether and how the phone opens its own BLE link to the R1 ring.
// Applied at connect time.
enumSettingMenuItem(ringConnectionModeSetting),
ringConnectionMenuItem(),
toggleSettingMenuItem(saveVoiceRecordingsSetting),
toggleSettingMenuItem(firmwareDebugFlagsSetting),
toggleSettingMenuItem(suspendEvenHubWhenScreenOffSetting),
@@ -598,6 +599,24 @@ function readBundledDoc(fileName: string): string {
}
}
/**
* Developer > Ring connection: the setting, except with a RayNeo iO, which
* always takes the ring directly (effectiveRingConnectionMode): then a fixed,
* disabled "Direct" row, the stored choice kept for G2 glasses.
*/
function ringConnectionMenuItem(): MenuItem {
const item = enumSettingMenuItem(ringConnectionModeSetting);
const io = () => glassesTypeSetting.get() === "rayneo-io";
return {
...item,
disabled: io,
render: (args) => {
if (!io()) return item.render?.(args);
drawRightValueMenuItem(args.image, getDefaultSmallFont(), args.x, args.y, args.width, item.label, "Direct (RayNeo iO)");
},
};
}
function renderWatchStatus(args: { image: GrayImage; x: number; y: number; width: number }): number {
const { image, x, y, width } = args;
const font = getDefaultSmallFont();