@mentra/bluetooth-sdk 3.2.0-dev.235 → 3.2.0-dev.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -3
- package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +2 -23
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +1 -1
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +1 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +44 -19
- package/android/src/main/java/com/mentra/bluetoothsdk/camera/CameraModels.kt +33 -8
- package/android/src/main/java/com/mentra/bluetoothsdk/internal/MapParsing.kt +14 -14
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +31 -6
- package/android/src/test/java/com/mentra/bluetoothsdk/camera/PhotoRequestTest.kt +32 -0
- package/build/BluetoothSdk.types.d.ts +14 -6
- package/build/BluetoothSdk.types.d.ts.map +1 -1
- package/build/BluetoothSdk.types.js.map +1 -1
- package/build/_private/photoRequestPayload.d.ts.map +1 -1
- package/build/_private/photoRequestPayload.js +5 -1
- package/build/_private/photoRequestPayload.js.map +1 -1
- package/build/generated/changelogCatalog.d.ts +3 -0
- package/build/generated/changelogCatalog.d.ts.map +1 -1
- package/build/generated/changelogCatalog.js +4 -0
- package/build/generated/changelogCatalog.js.map +1 -1
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -1
- package/build/index.js.map +1 -1
- package/ios/BluetoothSdkModule.swift +1 -1
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/DeviceManager.swift +1 -1
- package/ios/Source/GeneratedChangelogCatalog.swift +1 -0
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/ios/Source/MentraBluetoothSDK.swift +52 -25
- package/ios/Source/camera/CameraModels.swift +29 -15
- package/ios/Source/sgcs/MentraLive.swift +35 -4
- package/ios/Tests/PhotoCompressionTests.swift +21 -0
- package/package.json +4 -2
- package/src/BluetoothSdk.types.ts +15 -4
- package/src/_private/photoRequestPayload.ts +5 -1
- package/src/generated/changelogCatalog.ts +4 -0
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/index.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"photoRequestPayload.js","sourceRoot":"","sources":["../../src/_private/photoRequestPayload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"photoRequestPayload.js","sourceRoot":"","sources":["../../src/_private/photoRequestPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,0CAA0C,CAAA;AAG9E,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;AAEtF,SAAS,4BAA4B,CAAC,KAAc;IAClD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAA;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,sBAAsB,CAAC,GAAG,CAAC,KAA4B,CAAC,EAAE,CAAC;QAC1F,OAAO,KAA4B,CAAA;IACrC,CAAC;IACD,MAAM,IAAI,SAAS,CAAC,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;AAC9G,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,sBAAsB,CAAC,IAAwB;IAC7D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,KAAK,CAAA;QACd,KAAK,OAAO;YACV,OAAO,MAAM,CAAA;QACf,KAAK,MAAM;YACT,OAAO,KAAK,CAAA;QACd,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ,CAAC;QACd,KAAK,M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,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;IAC1B,CAAC;IACD,IAAI,MAAM,CAAC,cAAc,IAAI,IAAI,EAAE,CAAC;QAClC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IAC5D,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpE,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;IAC9C,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC","sourcesContent":["import {parsePhotoCompression} from \"@mentra/cloud-protocol/photo-compression\"\nimport type {PhotoRequestParams, PhotoSize, PhotoTransferMethod} from \"../BluetoothSdk.types\"\n\nconst PHOTO_TRANSFER_METHODS = new Set<PhotoTransferMethod>([\"auto\", \"direct\", \"ble\"])\n\nfunction photoTransferMethodForNative(value: unknown): PhotoTransferMethod {\n if (value === undefined) return \"auto\"\n if (typeof value === \"string\" && PHOTO_TRANSFER_METHODS.has(value as PhotoTransferMethod)) {\n return value as PhotoTransferMethod\n }\n throw new TypeError(`Invalid transferMethod ${JSON.stringify(value)}. Expected \"auto\", \"direct\", or \"ble\".`)\n}\n\n/** Maps unknown/legacy size strings to the current wire format. */\nexport function normalizePhotoSizeTier(size: string | undefined): PhotoSize {\n switch (size) {\n case \"small\":\n return \"low\"\n case \"large\":\n return \"high\"\n case \"full\":\n return \"max\"\n case \"low\":\n case \"medium\":\n case \"high\":\n case \"max\":\n return size\n default:\n return \"medium\"\n }\n}\n\nfunction nonBlankString(value?: string | null): string | undefined {\n const trimmed = value?.trim()\n return trimmed && trimmed.length > 0 ? trimmed : undefined\n}\n\n/** Expo Android bridge rejects null values in Map<String, Any> — omit optional nullish fields. */\nexport function photoRequestParamsForNative(params: PhotoRequestParams): Record<string, string | number | boolean> {\n const payload: Record<string, string | number | boolean> = {\n size: normalizePhotoSizeTier(params.size),\n mode: params.mode ?? \"photo\",\n transferMethod: photoTransferMethodForNative(params.transferMethod),\n webhookUrl: params.webhookUrl ?? \"\",\n compress: parsePhotoCompression(params.compress),\n sound: params.sound,\n }\n const requestId = nonBlankString(params.requestId)\n if (params.presend_thumbnail === true) {\n payload.presend_thumbnail = true\n }\n if (requestId != null) {\n payload.requestId = requestId\n }\n if (params.save != null) {\n payload.save = params.save\n }\n if (params.authToken != null && params.authToken.length > 0) {\n payload.authToken = params.authToken\n }\n const exposureTimeNs = params.exposureTimeNs\n const hasManualExposure = exposureTimeNs != null && Number.isFinite(exposureTimeNs) && exposureTimeNs > 0\n if (hasManualExposure) {\n payload.exposureTimeNs = exposureTimeNs\n }\n if (hasManualExposure && params.iso != null && Number.isFinite(params.iso) && params.iso > 0) {\n payload.iso = Math.round(params.iso)\n }\n if (params.aeExposureDivisor != null && params.aeExposureDivisor > 1) {\n payload.aeExposureDivisor = Math.round(params.aeExposureDivisor)\n }\n if (params.isoCap != null && params.isoCap > 0) {\n payload.isoCap = Math.round(params.isoCap)\n }\n if (params.noiseReduction != null) {\n payload.noiseReduction = params.noiseReduction\n }\n if (params.edgeEnhancement != null) {\n payload.edgeEnhancement = params.edgeEnhancement\n }\n if (params.mfnr != null) {\n payload.mfnr = params.mfnr\n }\n if (params.zsl != null) {\n payload.zsl = params.zsl\n }\n if (params.ispDigitalGain != null) {\n payload.ispDigitalGain = Math.round(params.ispDigitalGain)\n }\n if (params.ispAnalogGain != null && params.ispAnalogGain.length > 0) {\n payload.ispAnalogGain = params.ispAnalogGain\n }\n return payload\n}\n"]}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
export declare const GENERATED_RELEASE_CHANGELOGS: readonly [{
|
|
3
3
|
readonly version: "3.2.0";
|
|
4
4
|
readonly markdown: "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.";
|
|
5
|
+
}, {
|
|
6
|
+
readonly version: "3.1.1";
|
|
7
|
+
readonly markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them.";
|
|
5
8
|
}, {
|
|
6
9
|
readonly version: "3.1.0";
|
|
7
10
|
readonly markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"changelogCatalog.d.ts","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;;;;EAexC,CAAA"}
|
|
@@ -4,6 +4,10 @@ export const GENERATED_RELEASE_CHANGELOGS = Object.freeze([
|
|
|
4
4
|
"version": "3.2.0",
|
|
5
5
|
"markdown": "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."
|
|
6
6
|
},
|
|
7
|
+
{
|
|
8
|
+
"version": "3.1.1",
|
|
9
|
+
"markdown": "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them."
|
|
10
|
+
},
|
|
7
11
|
{
|
|
8
12
|
"version": "3.1.0",
|
|
9
13
|
"markdown": "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,maAAma;KAChb;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,u4BAAu4B;KACp5B;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.2.0\",\n \"markdown\": \"This release is under active development. User-facing changes will be documented as they land.\\n\\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.\"\n },\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them.\"\n }\n] as const,\n)\n"]}
|
|
1
|
+
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,maAAma;KAChb;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,u4BAAu4B;KACp5B;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,u4BAAu4B;KACp5B;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.2.0\",\n \"markdown\": \"This release is under active development. User-facing changes will be documented as they land.\\n\\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.\"\n },\n {\n \"version\": \"3.1.1\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them.\"\n },\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them.\"\n }\n] as const,\n)\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.2.0",
|
|
4
|
-
"releaseIdentity": "3.2.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.2.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.2.0-dev.247",
|
|
5
|
+
"releaseSetId": "mentra-3.2.0-dev.247",
|
|
6
|
+
"sourceCommit": "2be1b25e83b0c8db5cef39294c93b0a3f9ec7aef",
|
|
7
|
+
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.247.json",
|
|
8
|
+
"otaManifestSha256": "cba0e05a180f92e98e3bf47d0acdba2ae81cc79788da1393e80334fb5b26093b"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.247\",\n \"releaseSetId\": \"mentra-3.2.0-dev.247\",\n \"sourceCommit\": \"2be1b25e83b0c8db5cef39294c93b0a3f9ec7aef\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.247.json\",\n \"otaManifestSha256\": \"cba0e05a180f92e98e3bf47d0acdba2ae81cc79788da1393e80334fb5b26093b\"\n})\n"]}
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,wBAAwB,EAKzB,MAAM,sBAAsB,CAAA;AAkF7B,eAAO,MAAM,YAAY,EAAE,wBAsGzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,IAAI,kBAAkB,EAC9C,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,cAAc,EACd,gCAAgC,EAChC,mBAAmB,EACnB,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,iCAAiC,EACjC,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,EACnB,iCAAiC,EACjC,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EAAC,wBAAwB,EAAE,wBAAwB,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parsePhotoCompression } from "@mentra/cloud-protocol/photo-compression";
|
|
1
2
|
import PrivateBluetoothSdkModule from "./_private/BluetoothSdkModule";
|
|
2
3
|
import { getReleaseChangelogs } from "./changelogs";
|
|
3
4
|
const PUBLIC_EVENT_NAMES = new Set([
|
|
@@ -116,7 +117,11 @@ export const BluetoothSdk = Object.freeze({
|
|
|
116
117
|
* `requestPhoto(...)` options (e.g. `mode: "text"` for text sensor size/crop, or explicit per-shot
|
|
117
118
|
* fields). Still functional until removed in a future release.
|
|
118
119
|
*/
|
|
119
|
-
setPhotoCaptureDefaults:
|
|
120
|
+
setPhotoCaptureDefaults: (settings) => {
|
|
121
|
+
if (settings.compress !== undefined)
|
|
122
|
+
parsePhotoCompression(settings.compress);
|
|
123
|
+
return bindPublicMethod("setPhotoCaptureDefaults")(settings);
|
|
124
|
+
},
|
|
120
125
|
setVideoRecordingDefaults: ({ width, height, fps }) => {
|
|
121
126
|
const method = PrivateBluetoothSdkModule.setVideoRecordingDefaults;
|
|
122
127
|
if (typeof method !== "function") {
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AASrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,4BAA4B;IAC5B,8BAA8B;IAC9B,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;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AAgB,CAAC,uBAAuB,CAAC;IAChE,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"native_notification_status\",\n \"native_notification_delivery\",\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"wifi_forget_result\",\n \"saved_wifi_networks\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n configureNativeNotifications: bindPublicMethod(\"configureNativeNotifications\"),\n getNativeNotificationStatus: bindPublicMethod(\"getNativeNotificationStatus\"),\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n setDashboardContent: bindPublicMethod(\"setDashboardContent\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n getSavedWifiNetworks: bindPublicMethod(\"getSavedWifiNetworks\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanDiagnostic,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n SavedWifiNetworksEvent,\n SavedWifiNetworksOutcome,\n SavedWifiNetworksResult,\n WifiForgetOutcome,\n WifiForgetResult,\n WifiForgetResultEvent,\n LegacyWifiForgetResultEvent,\n ModernWifiForgetResultEvent,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n\nexport type {NativeNotificationConfig, NativeNotificationStatus, NativeNotificationDelivery} from \"./BluetoothSdk.types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,0CAA0C,CAAA;AAC9E,OAAO,yBAAyB,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AkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import {parsePhotoCompression} from \"@mentra/cloud-protocol/photo-compression\"\nimport PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PhotoCaptureDefaults,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"native_notification_status\",\n \"native_notification_delivery\",\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"wifi_forget_result\",\n \"saved_wifi_networks\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n configureNativeNotifications: bindPublicMethod(\"configureNativeNotifications\"),\n getNativeNotificationStatus: bindPublicMethod(\"getNativeNotificationStatus\"),\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n setDashboardContent: bindPublicMethod(\"setDashboardContent\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n getSavedWifiNetworks: bindPublicMethod(\"getSavedWifiNetworks\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: (settings: PhotoCaptureDefaults) => {\n if (settings.compress !== undefined) parsePhotoCompression(settings.compress)\n return bindPublicMethod(\"setPhotoCaptureDefaults\")(settings)\n },\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanDiagnostic,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n SavedWifiNetworksEvent,\n SavedWifiNetworksOutcome,\n SavedWifiNetworksResult,\n WifiForgetOutcome,\n WifiForgetResult,\n WifiForgetResultEvent,\n LegacyWifiForgetResultEvent,\n ModernWifiForgetResultEvent,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n\nexport type {NativeNotificationConfig, NativeNotificationStatus, NativeNotificationDelivery} from \"./BluetoothSdk.types\"\n"]}
|
|
@@ -461,7 +461,7 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
|
|
|
461
461
|
AsyncFunction("requestPhoto") { (params: [String: Any]) in
|
|
462
462
|
let req = try PhotoRequest.from(params: params)
|
|
463
463
|
Bridge.log(
|
|
464
|
-
"NATIVE: PHOTO PIPELINE [3/6] BluetoothSdk.requestPhoto requestId=\(req.requestId) size=\(req.size.rawValue) compress=\(req.compress
|
|
464
|
+
"NATIVE: PHOTO PIPELINE [3/6] BluetoothSdk.requestPhoto requestId=\(req.requestId) size=\(req.size.rawValue) compress=\(req.compress.rawValue) aeDivisor=\(req.aeExposureDivisor.map { String($0) } ?? "nil")"
|
|
465
465
|
)
|
|
466
466
|
|
|
467
467
|
let sdk = await MainActor.run { self.bluetoothSdk() }
|
|
@@ -11,7 +11,7 @@ enum BluetoothSdkDefaults {
|
|
|
11
11
|
static let voiceActivityDetectionEnabled = false
|
|
12
12
|
static let loudnessGateEnabled = false
|
|
13
13
|
private static let infoSdkVersionKey = "MentraBluetoothSdkVersion"
|
|
14
|
-
private static let swiftPackageSdkVersion = "3.2.0-dev.
|
|
14
|
+
private static let swiftPackageSdkVersion = "3.2.0-dev.247"
|
|
15
15
|
private static let swiftPackageSdkVersionPlaceholder = "__MENTRA" + "_BLUETOOTH_SDK_VERSION__"
|
|
16
16
|
|
|
17
17
|
private static func normalizedSdkVersion(_ value: String?) -> String? {
|
|
@@ -1819,7 +1819,7 @@ struct ViewState {
|
|
|
1819
1819
|
transferMethod: request.transferMethod
|
|
1820
1820
|
)
|
|
1821
1821
|
Bridge.log(
|
|
1822
|
-
"MAN: PHOTO PIPELINE [4/6] DeviceManager.requestPhoto requestId=\(routed.requestId) webhookUrl=\(routed.webhookUrl ?? "nil") size=\(routed.size.rawValue) compress=\(routed.compress
|
|
1822
|
+
"MAN: PHOTO PIPELINE [4/6] DeviceManager.requestPhoto requestId=\(routed.requestId) webhookUrl=\(routed.webhookUrl ?? "nil") size=\(routed.size.rawValue) compress=\(routed.compress.rawValue) save=\(routed.save) sound=\(routed.sound) exposureTimeNs=\(manualExposureNs.map { String($0) } ?? "nil") iso=\(manualIso.map { String($0) } ?? "auto") aeDivisor=\(routed.aeExposureDivisor.map { String($0) } ?? "nil") isoCap=\(routed.isoCap.map { String($0) } ?? "nil") sgc=\(sgc != nil ? String(describing: type(of: sgc!)) : "null")"
|
|
1823
1823
|
)
|
|
1824
1824
|
guard let sgc else {
|
|
1825
1825
|
Bridge.log(
|
|
@@ -3,5 +3,6 @@ import Foundation
|
|
|
3
3
|
/// Generated from /changelogs. Do not edit directly.
|
|
4
4
|
let generatedReleaseChangelogs: [ReleaseChangelog] = [
|
|
5
5
|
ReleaseChangelog(version: "3.2.0", markdown: "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."),
|
|
6
|
+
ReleaseChangelog(version: "3.1.1", markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them."),
|
|
6
7
|
ReleaseChangelog(version: "3.1.0", markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\n- Bluetooth SDK usage analytics now report the host app's version, build type, and install source (store, TestFlight, sideload, simulator), plus the glasses firmware versions on identification, so store usage can be measured separately from development builds.\n- Bluetooth SDK usage analytics now identify G2 glasses by serial, keep long-lived connections visible across day boundaries, and retry failed uploads instead of dropping them."),
|
|
7
8
|
]
|
|
@@ -3,9 +3,9 @@ import Foundation
|
|
|
3
3
|
/// Generated by release CI. Do not edit in a release checkout.
|
|
4
4
|
enum GeneratedReleaseMetadata {
|
|
5
5
|
static let familyBaseVersion = "3.2.0"
|
|
6
|
-
static let releaseIdentity = "3.2.0-dev.
|
|
7
|
-
static let releaseSetId = "mentra-3.2.0-dev.
|
|
8
|
-
static let sourceCommit = "
|
|
9
|
-
static let otaManifestUrl = "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.
|
|
10
|
-
static let otaManifestSha256 = "
|
|
6
|
+
static let releaseIdentity = "3.2.0-dev.247"
|
|
7
|
+
static let releaseSetId = "mentra-3.2.0-dev.247"
|
|
8
|
+
static let sourceCommit = "2be1b25e83b0c8db5cef39294c93b0a3f9ec7aef"
|
|
9
|
+
static let otaManifestUrl = "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.247.json"
|
|
10
|
+
static let otaManifestSha256 = "cba0e05a180f92e98e3bf47d0acdba2ae81cc79788da1393e80334fb5b26093b"
|
|
11
11
|
}
|
|
@@ -232,10 +232,25 @@ final class PendingResponse<T> {
|
|
|
232
232
|
|
|
233
233
|
@MainActor
|
|
234
234
|
public final class MentraBluetoothSDK {
|
|
235
|
+
// Mirrors AsgConstants: one active + one coalesced pending FOV update, plus BLE margin.
|
|
236
|
+
// Keep in sync with Android MentraBluetoothSdk and the ASG readiness budget.
|
|
237
|
+
private static let cameraFovReadyTimeoutMs = 20000
|
|
238
|
+
private static let cameraFovDeliveryMarginMs = 5000
|
|
239
|
+
private static let cameraFovRequestTimeoutMs =
|
|
240
|
+
2 * cameraFovReadyTimeoutMs + cameraFovDeliveryMarginMs
|
|
235
241
|
private static let wifiScanTimeoutMs = 20000
|
|
236
|
-
|
|
237
|
-
|
|
242
|
+
/// A photo response is terminal only after capture, encoding, transport, and upload.
|
|
243
|
+
/// Max-quality BLE fallback can legitimately exceed the generic command deadline.
|
|
238
244
|
private static let photoRequestTimeoutMs = 30000
|
|
245
|
+
// Mirrors AsgConstants.PHOTO_THUMBNAIL_REQUEST_TIMEOUT_MS and the Android facade.
|
|
246
|
+
// Reserve capture, preview ACK/retries, full delivery, then terminal-event transit.
|
|
247
|
+
private static let photoCaptureTimeoutMs = 45000
|
|
248
|
+
private static let photoThumbnailTimeoutSeconds = 30
|
|
249
|
+
private static let photoDeliveryTimeoutMs = 30000
|
|
250
|
+
private static let photoResponseMarginMs = 5000
|
|
251
|
+
private static let photoThumbnailRequestTimeoutMs =
|
|
252
|
+
photoCaptureTimeoutMs + photoThumbnailTimeoutSeconds * 1000
|
|
253
|
+
+ photoDeliveryTimeoutMs + photoResponseMarginMs
|
|
239
254
|
private static let otaBesVersionWaitMs = 5000
|
|
240
255
|
private static let otaMtkVersionWaitMs = 2000
|
|
241
256
|
private static let otaVersionPollMs = 100
|
|
@@ -277,6 +292,9 @@ public final class MentraBluetoothSDK {
|
|
|
277
292
|
private var pendingWifiStatus: PendingWifiStatusRequest?
|
|
278
293
|
private var pendingWifiForget: PendingWifiForgetRequest?
|
|
279
294
|
private var pendingHotspotStatus: PendingHotspotStatusRequest?
|
|
295
|
+
/// Serializes enable/disable so SoftAP teardown's second disable waits
|
|
296
|
+
/// instead of throwing `request_in_flight` and refusing the next join.
|
|
297
|
+
private var hotspotTail: Task<HotspotStatusEvent, Error>?
|
|
280
298
|
private var pendingVersionInfo: PendingVersionInfoRequest?
|
|
281
299
|
private let wifiSessionCapabilities = WifiSessionCapabilities()
|
|
282
300
|
private var configuredOtaVersionUrl: String?
|
|
@@ -638,7 +656,9 @@ public final class MentraBluetoothSDK {
|
|
|
638
656
|
pendingSettingsRequests[requestId] = pending
|
|
639
657
|
do {
|
|
640
658
|
try send(requestId)
|
|
641
|
-
let
|
|
659
|
+
let timeoutMs = (setting == "camera_fov" || setting == "camera_fov_override")
|
|
660
|
+
? Self.cameraFovRequestTimeoutMs : 15000
|
|
661
|
+
let ack = try await pending.wait(timeoutMs: timeoutMs)
|
|
642
662
|
updateStore(ack)
|
|
643
663
|
pendingSettingsRequests.removeValue(forKey: requestId)
|
|
644
664
|
return ack
|
|
@@ -705,7 +725,7 @@ public final class MentraBluetoothSDK {
|
|
|
705
725
|
DeviceStore.shared.set(ObservableStore.bluetoothCategory, "button_photo_iso_cap", isoCap)
|
|
706
726
|
}
|
|
707
727
|
if let compress = settings.compress {
|
|
708
|
-
DeviceStore.shared.set(ObservableStore.bluetoothCategory, "button_photo_compress", compress)
|
|
728
|
+
DeviceStore.shared.set(ObservableStore.bluetoothCategory, "button_photo_compress", compress.rawValue)
|
|
709
729
|
}
|
|
710
730
|
if let sound = settings.sound {
|
|
711
731
|
DeviceStore.shared.set(ObservableStore.bluetoothCategory, "button_photo_sound", sound)
|
|
@@ -1041,29 +1061,34 @@ public final class MentraBluetoothSDK {
|
|
|
1041
1061
|
}
|
|
1042
1062
|
|
|
1043
1063
|
public func setHotspotState(enabled: Bool) async throws -> HotspotStatusEvent {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
message: "
|
|
1048
|
-
)
|
|
1049
|
-
}
|
|
1050
|
-
let pending = PendingResponse<HotspotStatusEvent>(
|
|
1051
|
-
operation: "hotspot \(enabled ? "enable" : "disable") request"
|
|
1052
|
-
)
|
|
1053
|
-
pendingHotspotStatus = PendingHotspotStatusRequest(enabled: enabled, pending: pending)
|
|
1054
|
-
DeviceManager.shared.setHotspotState(enabled)
|
|
1055
|
-
do {
|
|
1056
|
-
let event = try await pending.wait()
|
|
1057
|
-
if pendingHotspotStatus?.pending === pending {
|
|
1058
|
-
pendingHotspotStatus = nil
|
|
1064
|
+
let previous = hotspotTail
|
|
1065
|
+
let task = Task { @MainActor [weak self] in
|
|
1066
|
+
guard let self else {
|
|
1067
|
+
throw BluetoothSdkError(code: "sdk_closed", message: "Bluetooth SDK is closed.")
|
|
1059
1068
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1069
|
+
if let previous {
|
|
1070
|
+
_ = try? await previous.value
|
|
1071
|
+
}
|
|
1072
|
+
let pending = PendingResponse<HotspotStatusEvent>(
|
|
1073
|
+
operation: "hotspot \(enabled ? "enable" : "disable") request"
|
|
1074
|
+
)
|
|
1075
|
+
self.pendingHotspotStatus = PendingHotspotStatusRequest(enabled: enabled, pending: pending)
|
|
1076
|
+
DeviceManager.shared.setHotspotState(enabled)
|
|
1077
|
+
do {
|
|
1078
|
+
let event = try await pending.wait()
|
|
1079
|
+
if self.pendingHotspotStatus?.pending === pending {
|
|
1080
|
+
self.pendingHotspotStatus = nil
|
|
1081
|
+
}
|
|
1082
|
+
return event
|
|
1083
|
+
} catch {
|
|
1084
|
+
if self.pendingHotspotStatus?.pending === pending {
|
|
1085
|
+
self.pendingHotspotStatus = nil
|
|
1086
|
+
}
|
|
1087
|
+
throw error
|
|
1064
1088
|
}
|
|
1065
|
-
throw error
|
|
1066
1089
|
}
|
|
1090
|
+
hotspotTail = task
|
|
1091
|
+
return try await task.value
|
|
1067
1092
|
}
|
|
1068
1093
|
|
|
1069
1094
|
/// Fire-and-forget Mentra Live Wi-Fi ADB toggle. Glasses do not ack this
|
|
@@ -1087,7 +1112,9 @@ public final class MentraBluetoothSDK {
|
|
|
1087
1112
|
pendingPhotoRequests[routedRequest.requestId] = pending
|
|
1088
1113
|
DeviceManager.shared.requestPhoto(routedRequest)
|
|
1089
1114
|
do {
|
|
1090
|
-
let event = try await pending.wait(timeoutMs:
|
|
1115
|
+
let event = try await pending.wait(timeoutMs: routedRequest.presendThumbnail
|
|
1116
|
+
? MentraBluetoothSDK.photoThumbnailRequestTimeoutMs
|
|
1117
|
+
: MentraBluetoothSDK.photoRequestTimeoutMs)
|
|
1091
1118
|
pendingPhotoRequests.removeValue(forKey: routedRequest.requestId)
|
|
1092
1119
|
return event
|
|
1093
1120
|
} catch {
|
|
@@ -62,8 +62,18 @@ public enum ButtonPhotoSize: String {
|
|
|
62
62
|
|
|
63
63
|
public enum PhotoCompression: String {
|
|
64
64
|
case none
|
|
65
|
+
case low
|
|
65
66
|
case medium
|
|
66
|
-
case
|
|
67
|
+
case high
|
|
68
|
+
|
|
69
|
+
static func parse(_ value: Any?) throws -> PhotoCompression {
|
|
70
|
+
guard let value else { return .none }
|
|
71
|
+
guard let raw = value as? String, let compression = PhotoCompression(rawValue: raw) else {
|
|
72
|
+
throw BluetoothSdkError(code: "invalid_photo_compression",
|
|
73
|
+
message: "Invalid photo compression \(value). Expected none, low, medium, or high.")
|
|
74
|
+
}
|
|
75
|
+
return compression
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
public struct PhotoCaptureDefaults {
|
|
@@ -76,7 +86,7 @@ public struct PhotoCaptureDefaults {
|
|
|
76
86
|
public let ispAnalogGain: String?
|
|
77
87
|
public let aeExposureDivisor: Int?
|
|
78
88
|
public let isoCap: Int?
|
|
79
|
-
public let compress:
|
|
89
|
+
public let compress: PhotoCompression?
|
|
80
90
|
public let sound: Bool?
|
|
81
91
|
public let resetCaptureTuning: Bool?
|
|
82
92
|
|
|
@@ -90,7 +100,7 @@ public struct PhotoCaptureDefaults {
|
|
|
90
100
|
ispAnalogGain: String? = nil,
|
|
91
101
|
aeExposureDivisor: Int? = nil,
|
|
92
102
|
isoCap: Int? = nil,
|
|
93
|
-
compress:
|
|
103
|
+
compress: PhotoCompression? = nil,
|
|
94
104
|
sound: Bool? = nil,
|
|
95
105
|
resetCaptureTuning: Bool? = nil
|
|
96
106
|
) {
|
|
@@ -108,12 +118,12 @@ public struct PhotoCaptureDefaults {
|
|
|
108
118
|
self.resetCaptureTuning = resetCaptureTuning
|
|
109
119
|
}
|
|
110
120
|
|
|
111
|
-
static func from(params: [String: Any]) -> PhotoCaptureDefaults {
|
|
121
|
+
static func from(params: [String: Any]) throws -> PhotoCaptureDefaults {
|
|
112
122
|
let size = (params["size"] as? String).map { PhotoSize(normalizedRawValue: $0) }
|
|
113
123
|
let aeExposureDivisor =
|
|
114
124
|
optionalIntValue(params, "aeExposureDivisor").flatMap { $0 > 1 ? $0 : nil }
|
|
115
125
|
let isoCap = optionalIntValue(params, "isoCap").flatMap { $0 > 0 ? $0 : nil }
|
|
116
|
-
return PhotoCaptureDefaults(
|
|
126
|
+
return try PhotoCaptureDefaults(
|
|
117
127
|
size: size,
|
|
118
128
|
mfnr: optionalBoolValue(params, "mfnr"),
|
|
119
129
|
zsl: optionalBoolValue(params, "zsl"),
|
|
@@ -123,7 +133,7 @@ public struct PhotoCaptureDefaults {
|
|
|
123
133
|
ispAnalogGain: optionalStringValue(params, "ispAnalogGain"),
|
|
124
134
|
aeExposureDivisor: aeExposureDivisor,
|
|
125
135
|
isoCap: isoCap,
|
|
126
|
-
compress:
|
|
136
|
+
compress: params["compress"].map { try PhotoCompression.parse($0) },
|
|
127
137
|
sound: optionalBoolValue(params, "sound"),
|
|
128
138
|
resetCaptureTuning: optionalBoolValue(params, "resetCaptureTuning")
|
|
129
139
|
)
|
|
@@ -242,13 +252,14 @@ public struct CameraFovResult: CustomStringConvertible {
|
|
|
242
252
|
}
|
|
243
253
|
|
|
244
254
|
public struct PhotoRequest {
|
|
255
|
+
public let presendThumbnail: Bool
|
|
245
256
|
public let requestId: String
|
|
246
257
|
public let size: PhotoSize
|
|
247
258
|
public let mode: PhotoMode
|
|
248
259
|
public let transferMethod: String
|
|
249
260
|
public let webhookUrl: String?
|
|
250
261
|
public let authToken: String?
|
|
251
|
-
public let compress: PhotoCompression
|
|
262
|
+
public let compress: PhotoCompression
|
|
252
263
|
public let save: Bool
|
|
253
264
|
public let sound: Bool
|
|
254
265
|
/// Sensor exposure time for this capture only (ns), or nil for auto exposure
|
|
@@ -269,7 +280,7 @@ public struct PhotoRequest {
|
|
|
269
280
|
size: PhotoSize,
|
|
270
281
|
webhookUrl: String? = nil,
|
|
271
282
|
authToken: String? = nil,
|
|
272
|
-
compress: PhotoCompression
|
|
283
|
+
compress: PhotoCompression = .none,
|
|
273
284
|
save: Bool = false,
|
|
274
285
|
sound: Bool,
|
|
275
286
|
exposureTimeNs: Double? = nil,
|
|
@@ -283,7 +294,8 @@ public struct PhotoRequest {
|
|
|
283
294
|
ispDigitalGain: Int? = nil,
|
|
284
295
|
ispAnalogGain: String? = nil,
|
|
285
296
|
mode: PhotoMode = .photo,
|
|
286
|
-
transferMethod: String = "auto"
|
|
297
|
+
transferMethod: String = "auto",
|
|
298
|
+
presendThumbnail: Bool = false
|
|
287
299
|
) {
|
|
288
300
|
self.requestId = nonBlankRequestId(requestId) ?? generatedCameraRequestId("photo")
|
|
289
301
|
self.size = size
|
|
@@ -304,11 +316,12 @@ public struct PhotoRequest {
|
|
|
304
316
|
self.ispAnalogGain = ispAnalogGain
|
|
305
317
|
self.mode = mode
|
|
306
318
|
self.transferMethod = transferMethod
|
|
319
|
+
self.presendThumbnail = presendThumbnail
|
|
307
320
|
}
|
|
308
321
|
|
|
309
322
|
public static func from(params: [String: Any]) throws -> PhotoRequest {
|
|
310
323
|
let sizeRaw = params["size"] as? String ?? "medium"
|
|
311
|
-
let
|
|
324
|
+
let compress = try PhotoCompression.parse(params["compress"])
|
|
312
325
|
let transferMethod: String
|
|
313
326
|
if let rawValue = params["transferMethod"] {
|
|
314
327
|
guard let rawString = rawValue as? String,
|
|
@@ -372,7 +385,7 @@ public struct PhotoRequest {
|
|
|
372
385
|
size: PhotoSize(normalizedRawValue: sizeRaw),
|
|
373
386
|
webhookUrl: params["webhookUrl"] as? String,
|
|
374
387
|
authToken: (params["authToken"] as? String)?.nilIfBlank,
|
|
375
|
-
compress:
|
|
388
|
+
compress: compress,
|
|
376
389
|
save: (params["save"] as? Bool) ?? (params["saveToGallery"] as? Bool) ?? false,
|
|
377
390
|
sound: params["sound"] as? Bool ?? true,
|
|
378
391
|
exposureTimeNs: exposureTimeNs,
|
|
@@ -386,7 +399,8 @@ public struct PhotoRequest {
|
|
|
386
399
|
ispDigitalGain: optionalInt("ispDigitalGain"),
|
|
387
400
|
ispAnalogGain: params["ispAnalogGain"] as? String,
|
|
388
401
|
mode: PhotoMode(normalizedRawValue: params["mode"] as? String),
|
|
389
|
-
transferMethod: transferMethod
|
|
402
|
+
transferMethod: transferMethod,
|
|
403
|
+
presendThumbnail: params["presend_thumbnail"] as? Bool ?? false
|
|
390
404
|
)
|
|
391
405
|
}
|
|
392
406
|
|
|
@@ -437,7 +451,8 @@ public struct PhotoRequest {
|
|
|
437
451
|
ispDigitalGain: ispDigitalGain,
|
|
438
452
|
ispAnalogGain: ispAnalogGain,
|
|
439
453
|
mode: mode,
|
|
440
|
-
transferMethod: transferMethod
|
|
454
|
+
transferMethod: transferMethod,
|
|
455
|
+
presendThumbnail: presendThumbnail
|
|
441
456
|
)
|
|
442
457
|
}
|
|
443
458
|
}
|
|
@@ -497,7 +512,7 @@ public struct VideoRecordingRequest {
|
|
|
497
512
|
public let width: Int
|
|
498
513
|
public let height: Int
|
|
499
514
|
public let fps: Int
|
|
500
|
-
|
|
515
|
+
/// Optional auto-stop timer in minutes; 0 = record until stopped/interrupted.
|
|
501
516
|
public let maxRecordingTimeMinutes: Int
|
|
502
517
|
|
|
503
518
|
public init(
|
|
@@ -863,4 +878,3 @@ public struct GalleryStatusEvent: CustomStringConvertible {
|
|
|
863
878
|
"GalleryStatusEvent(total: \(total), photos: \(photos), videos: \(videos))"
|
|
864
879
|
}
|
|
865
880
|
}
|
|
866
|
-
|