From 5f2a1b6329d198728a154bdc2d3630037ffbbb3d Mon Sep 17 00:00:00 2001 From: jjangddu Date: Mon, 29 Jun 2026 11:54:48 +0900 Subject: [PATCH] =?UTF-8?q?revert(alignment):=20=EC=9D=BC=EB=B0=98=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20flow=20=EB=8A=94=20V1,=20V2=20?= =?UTF-8?q?=EB=8A=94=20clinical=20alignment=20session=20=EC=A0=84=EC=9A=A9?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=B5=EA=B7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이전 commit (22ef657) 에서 V2 를 모든 진입점 default 로 통일했었으나 — V2 (Method D 4-stage) 는 R&D / clinical alignment session 의 정밀 측정 알고리즘이고, 일반 사용자 (Home → Start → Personalization → PlacementGuide) 에는 검증된 V1 simple algorithm 이 적합. 복원: - GreenZoneConstants.alignmentAlgo default V2 → V1 - PlacementGuideView LaunchedEffect: isClinicalAlign ? V2 : V1 (이전 동작) Step indicator 는 V2 일 때만 4-stage, V1 일 때는 기존 3-stage 표시. Co-Authored-By: Claude Opus 4.7 --- .../medilightv2android/managers/GreenZoneConstants.kt | 2 +- .../ui/views/monitoring/PlacementGuideView.kt | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/example/medilightv2android/managers/GreenZoneConstants.kt b/app/src/main/java/com/example/medilightv2android/managers/GreenZoneConstants.kt index c7f34c0..8eabc99 100644 --- a/app/src/main/java/com/example/medilightv2android/managers/GreenZoneConstants.kt +++ b/app/src/main/java/com/example/medilightv2android/managers/GreenZoneConstants.kt @@ -26,7 +26,7 @@ object GreenZoneConstants { @Volatile var detectionMethod: DetectionMethod = DetectionMethod.METHOD_C @Volatile var bvMethod: BvMethod = BvMethod.V41 @Volatile var placementGuideMode: PlacementGuideMode = PlacementGuideMode.SIMPLE - @Volatile var alignmentAlgo: AlignmentAlgo = AlignmentAlgo.V2 // default V2 (4-stage Method D). V1 은 dev 토글로 fallback. + @Volatile var alignmentAlgo: AlignmentAlgo = AlignmentAlgo.V1 // default V1 (일반 사용자). V2 (Method D) 는 clinical alignment session 전용. /** Posture pitch 임계값 (deg). |pitch| > 이 값 → LYING, ≤ 이 값 → NON_LYING. dev 모드에서 조정 가능. */ @Volatile var pitchLyingThreshold: Float = 25f diff --git a/app/src/main/java/com/example/medilightv2android/ui/views/monitoring/PlacementGuideView.kt b/app/src/main/java/com/example/medilightv2android/ui/views/monitoring/PlacementGuideView.kt index 4b77fab..437945f 100644 --- a/app/src/main/java/com/example/medilightv2android/ui/views/monitoring/PlacementGuideView.kt +++ b/app/src/main/java/com/example/medilightv2android/ui/views/monitoring/PlacementGuideView.kt @@ -123,15 +123,17 @@ fun PlacementGuideView(appState: AppState) { var sweepLastDetected by remember { mutableIntStateOf(0) } var sweepEverSawAll by remember { mutableStateOf(false) } - // 화면 진입 시 전체 상태 리셋. V2 (4-stage Method D) 를 default 로 사용 — 모든 진입점에서. - // (이전: clinical alignment 만 V2, 그 외 V1 → 사용자 경험 분산. 통일.) + // 화면 진입 시 전체 상태 리셋. + // V2 (4-stage Method D) 는 R&D/clinical alignment session 전용. + // 일반 사용자 flow (Home → Start → Personalization → PlacementGuide) 는 V1 사용. LaunchedEffect(Unit) { val sess = com.example.medilightv2android.services.ClinicalSessionStore.currentSession val isClinicalAlign = !appState.placementFromMonitoring && sess != null && sess.mode == com.example.medilightv2android.models.SessionMode.ALIGNMENT com.example.medilightv2android.managers.GreenZoneConstants.alignmentAlgo = - com.example.medilightv2android.managers.AlignmentAlgo.V2 + if (isClinicalAlign) com.example.medilightv2android.managers.AlignmentAlgo.V2 + else com.example.medilightv2android.managers.AlignmentAlgo.V1 v2Aligner.reset() // Clinical alignment session 진입 시 — 자동으로 scan 시작 (Step 0 baseline 캡쳐). // waitingForStart 는 true 유지 — 사용자는 여전히 Start 눌러 알고리즘 시작 결정.