forked from Blendman974/faceclaw
Add support for using RayNeo iO together with an R1 ring
This commit is contained in:
1 parent
dee60bbcd2
commit
fde847a31a
10 files changed
+172
-47
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user