mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Increase height calibration range
This commit is contained in:
1 parent
b13b7ac5bf
commit
172ff8fc6c
5 files changed
+9
-5
No files matched your search
@@ -215,7 +215,7 @@ class HeightCalibrationSessionTest {
|
||||
advanceTimeBy(SAMPLE_INTERVAL_MS)
|
||||
|
||||
completeFloorPhase(controllerFlow, TrackerSnapshot(Vector3(0f, 0f, 0f), POINTING_DOWN))
|
||||
completeHeightPhase(headFlow, TrackerSnapshot(Vector3(0f, 1.3f, 0f), HEAD_LEVEL))
|
||||
completeHeightPhase(headFlow, TrackerSnapshot(Vector3(0f, 1.2f, 0f), HEAD_LEVEL))
|
||||
|
||||
assertEquals(UserHeightCalibrationStatus.ERROR_TOO_SMALL, context.state.value.status)
|
||||
job.cancel()
|
||||
@@ -230,7 +230,7 @@ class HeightCalibrationSessionTest {
|
||||
advanceTimeBy(SAMPLE_INTERVAL_MS)
|
||||
|
||||
completeFloorPhase(controllerFlow, TrackerSnapshot(Vector3(0f, 0f, 0f), POINTING_DOWN))
|
||||
completeHeightPhase(headFlow, TrackerSnapshot(Vector3(0f, 2.0f, 0f), HEAD_LEVEL))
|
||||
completeHeightPhase(headFlow, TrackerSnapshot(Vector3(0f, 2.2f, 0f), HEAD_LEVEL))
|
||||
|
||||
assertEquals(UserHeightCalibrationStatus.ERROR_TOO_HIGH, context.state.value.status)
|
||||
job.cancel()
|
||||
|
||||
@@ -29,6 +29,7 @@ private class Harness(val bridge: SolarXRBridge, val config: AppConfig, val sent
|
||||
fun statuses() = sent.filterIsInstance<ProfileOperationResponse>().map { it.status }
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
private suspend fun buildHarness(scope: TestScope): Harness {
|
||||
val config = AppConfig.create(scope.backgroundScope, MemoryStorage())
|
||||
val sent = mutableListOf<RpcMessage>()
|
||||
@@ -54,6 +55,7 @@ private suspend fun buildHarness(scope: TestScope): Harness {
|
||||
return Harness(bridge, config, sent)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
private fun awaitStatuses(scope: TestScope, h: Harness, count: Int) {
|
||||
val deadline = System.nanoTime() + 5_000_000_000L
|
||||
while (h.statuses().size < count && System.nanoTime() < deadline) {
|
||||
|
||||
@@ -42,6 +42,7 @@ class SettingsDefaultsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
private fun buildBridge(scope: TestScope, responses: MutableList<SettingsDefaultsResponse>): SolarXRBridge {
|
||||
val context = Context.create(
|
||||
initialState = SolarXRBridgeState(dataFeedConfigs = listOf()),
|
||||
|
||||
@@ -27,6 +27,7 @@ import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
private fun awaitReset(scope: TestScope, config: AppConfig) {
|
||||
val deadline = System.nanoTime() + 5_000_000_000L
|
||||
while (config.globalConfig.context.state.value.errorReporting.consent != ErrorReportingConsent.UNDECIDED && System.nanoTime() < deadline) {
|
||||
|
||||
Reference in new issue
Block a user