@mentra/bluetooth-sdk 3.3.0-dev.317 → 3.3.0-dev.321
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/android/src/debug/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnostics.kt +368 -0
- package/android/src/debug/java/com/mentra/bluetoothsdk/sgcs/NimoFramebufferProtocol.kt +156 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +37 -12
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +30 -13
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +3 -2
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Nimo.kt +257 -395
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodec.kt +245 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCoordinator.kt +225 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasEncoder.kt +58 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasSession.kt +168 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +8 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/utils/G2Text.kt +7 -0
- package/android/src/release/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnostics.kt +20 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/DeviceManagerSceneHandoffTest.kt +557 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/G2TextTest.kt +13 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoBitmapAcceptanceTest.kt +105 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCodecTest.kt +220 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasCoordinatorTest.kt +308 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/NimoCanvasSessionTest.kt +270 -0
- package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoDiagnosticsTest.kt +287 -0
- package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoFramebufferProtocolTest.kt +127 -0
- package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoLifecycleTest.kt +194 -0
- package/android/src/testDebug/java/com/mentra/bluetoothsdk/sgcs/NimoReadinessDriverTest.kt +199 -0
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/ios/MentraBluetoothSDK.podspec +3 -2
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/DeviceManager.swift +23 -10
- package/ios/Source/DeviceStore.swift +19 -7
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/ios/Source/sgcs/G2.swift +2 -2
- package/ios/Source/sgcs/Nimo.swift +182 -371
- package/ios/Source/sgcs/NimoCanvasCodec.swift +269 -0
- package/ios/Source/sgcs/NimoCanvasCoordinator.swift +219 -0
- package/ios/Source/sgcs/NimoCanvasImage.swift +53 -0
- package/ios/Source/sgcs/NimoCanvasSession.swift +150 -0
- package/ios/Source/sgcs/SGCManager.swift +16 -0
- package/ios/Source/utils/G2Text.swift +11 -0
- package/ios/Tests/DashboardRenderingTests.swift +31 -0
- package/ios/Tests/G2TextTests.swift +10 -0
- package/ios/Tests/NimoCanvasCodecTests.swift +204 -0
- package/ios/Tests/NimoCanvasSessionTests.swift +112 -0
- package/ios/Tests/NimoCanvasTransportTests.swift +161 -0
- package/package.json +2 -2
- package/src/generated/releaseMetadata.ts +5 -5
|
@@ -219,14 +219,30 @@ object DeviceStore {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
// BLUETOOTH:
|
|
222
|
+
"bluetooth" to "contextual_dashboard" -> {
|
|
223
|
+
if (value is Boolean) {
|
|
224
|
+
CoroutineScope(Dispatchers.Main.immediate).launch {
|
|
225
|
+
// The setting changes the selected view even without a new head event.
|
|
226
|
+
// Re-read state on Main and retain the manager's readiness/display guards.
|
|
227
|
+
if (store.get("glasses", "headUp") == true) {
|
|
228
|
+
DeviceManager.getInstance().sendCurrentState()
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
222
233
|
"bluetooth" to "brightness" -> {
|
|
223
234
|
val b = (value as? Number)?.toInt() ?: 50
|
|
224
235
|
val auto = (store.get("bluetooth", "auto_brightness") as? Boolean) ?: true
|
|
225
236
|
CoroutineScope(Dispatchers.Main).launch {
|
|
226
|
-
DeviceManager.getInstance().sgc
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
237
|
+
val device = DeviceManager.getInstance().sgc ?: return@launch
|
|
238
|
+
device.setBrightness(b, auto)
|
|
239
|
+
if (device.showBrightnessConfirmation) {
|
|
240
|
+
device.sendTextWall("Set brightness to $b%")
|
|
241
|
+
delay(800) // 0.8 seconds
|
|
242
|
+
if (DeviceManager.getInstance().sgc === device) {
|
|
243
|
+
device.clearDisplay()
|
|
244
|
+
}
|
|
245
|
+
}
|
|
230
246
|
}
|
|
231
247
|
}
|
|
232
248
|
"bluetooth" to "auto_brightness" -> {
|
|
@@ -234,16 +250,17 @@ object DeviceStore {
|
|
|
234
250
|
val auto = (value as? Boolean) ?: true
|
|
235
251
|
val autoBrightnessChanged = (oldValue as? Boolean) != auto
|
|
236
252
|
CoroutineScope(Dispatchers.Main).launch {
|
|
237
|
-
DeviceManager.getInstance().sgc
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
)
|
|
253
|
+
val device = DeviceManager.getInstance().sgc ?: return@launch
|
|
254
|
+
device.setBrightness(b, auto)
|
|
255
|
+
if (autoBrightnessChanged && device.showBrightnessConfirmation) {
|
|
256
|
+
device.sendTextWall(
|
|
257
|
+
if (auto) "Enabled auto brightness"
|
|
258
|
+
else "Disabled auto brightness"
|
|
259
|
+
)
|
|
245
260
|
delay(800) // 0.8 seconds
|
|
246
|
-
DeviceManager.getInstance().sgc
|
|
261
|
+
if (DeviceManager.getInstance().sgc === device) {
|
|
262
|
+
device.clearDisplay()
|
|
263
|
+
}
|
|
247
264
|
}
|
|
248
265
|
}
|
|
249
266
|
}
|
|
@@ -3,9 +3,9 @@ package com.mentra.bluetoothsdk
|
|
|
3
3
|
/** Generated by release CI. Do not edit in a release checkout. */
|
|
4
4
|
internal object GeneratedReleaseMetadata {
|
|
5
5
|
const val FAMILY_BASE_VERSION: String = "3.3.0"
|
|
6
|
-
const val RELEASE_IDENTITY: String = "3.3.0-dev.
|
|
7
|
-
const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.
|
|
8
|
-
const val SOURCE_COMMIT: String = "
|
|
9
|
-
const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.
|
|
10
|
-
const val OTA_MANIFEST_SHA256: String = "
|
|
6
|
+
const val RELEASE_IDENTITY: String = "3.3.0-dev.321"
|
|
7
|
+
const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.321"
|
|
8
|
+
const val SOURCE_COMMIT: String = "75da48dec4a113644b96610acf0d92a2d1b5433c"
|
|
9
|
+
const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.321.json"
|
|
10
|
+
const val OTA_MANIFEST_SHA256: String = "bc7004312a321bc7e2218304ccbf754304ce27f98f2787d5affc6d79802b253e"
|
|
11
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.mentra.bluetoothsdk.sgcs
|
|
2
2
|
|
|
3
|
+
import com.mentra.bluetoothsdk.utils.G2Text
|
|
3
4
|
import com.mentra.bluetoothsdk.PhotoRequest
|
|
4
5
|
import android.bluetooth.BluetoothAdapter
|
|
5
6
|
import android.bluetooth.BluetoothGatt
|
|
@@ -2190,7 +2191,7 @@ class G2 : SGCManager() {
|
|
|
2190
2191
|
val rBorderColor = borderColor ?: defaultTextBorderColor
|
|
2191
2192
|
val rBorderRadius = borderRadius ?: defaultTextBorderRadius
|
|
2192
2193
|
val rPaddingLength = paddingLength ?: defaultTextPaddingLength
|
|
2193
|
-
val content =
|
|
2194
|
+
val content = G2Text.containerContent(text)
|
|
2194
2195
|
|
|
2195
2196
|
// Pure state mutation: update the container's content and schedule its sends; the reconcile
|
|
2196
2197
|
// loop does the actual updateText writes. Reuse an existing container if the rect matches
|
|
@@ -2538,7 +2539,7 @@ class G2 : SGCManager() {
|
|
|
2538
2539
|
@Suppress("NAME_SHADOWING")
|
|
2539
2540
|
val height = minOf(maxOf(height, minTextContainerHeight), 288 - y)
|
|
2540
2541
|
run {
|
|
2541
|
-
val content =
|
|
2542
|
+
val content = G2Text.containerContent(text)
|
|
2542
2543
|
val existingId = sceneTextByElement[elementId]
|
|
2543
2544
|
if (existingId != null) {
|
|
2544
2545
|
val idx = textContainers.indexOfFirst { it.id == existingId }
|