revert(alignment): 일반 사용자 flow 는 V1, V2 는 clinical alignment session 전용으로 복귀

이전 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 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 11:54:48 +09:00
parent 6cff741370
commit 5f2a1b6329
2 changed files with 6 additions and 4 deletions
@@ -26,7 +26,7 @@ object GreenZoneConstants {
@Volatile var detectionMethod: DetectionMethod = DetectionMethod.METHOD_C @Volatile var detectionMethod: DetectionMethod = DetectionMethod.METHOD_C
@Volatile var bvMethod: BvMethod = BvMethod.V41 @Volatile var bvMethod: BvMethod = BvMethod.V41
@Volatile var placementGuideMode: PlacementGuideMode = PlacementGuideMode.SIMPLE @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 모드에서 조정 가능. */ /** Posture pitch 임계값 (deg). |pitch| > 이 값 → LYING, ≤ 이 값 → NON_LYING. dev 모드에서 조정 가능. */
@Volatile var pitchLyingThreshold: Float = 25f @Volatile var pitchLyingThreshold: Float = 25f
@@ -123,15 +123,17 @@ fun PlacementGuideView(appState: AppState) {
var sweepLastDetected by remember { mutableIntStateOf(0) } var sweepLastDetected by remember { mutableIntStateOf(0) }
var sweepEverSawAll by remember { mutableStateOf(false) } 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) { LaunchedEffect(Unit) {
val sess = com.example.medilightv2android.services.ClinicalSessionStore.currentSession val sess = com.example.medilightv2android.services.ClinicalSessionStore.currentSession
val isClinicalAlign = !appState.placementFromMonitoring && val isClinicalAlign = !appState.placementFromMonitoring &&
sess != null && sess != null &&
sess.mode == com.example.medilightv2android.models.SessionMode.ALIGNMENT sess.mode == com.example.medilightv2android.models.SessionMode.ALIGNMENT
com.example.medilightv2android.managers.GreenZoneConstants.alignmentAlgo = 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() v2Aligner.reset()
// Clinical alignment session 진입 시 — 자동으로 scan 시작 (Step 0 baseline 캡쳐). // Clinical alignment session 진입 시 — 자동으로 scan 시작 (Step 0 baseline 캡쳐).
// waitingForStart 는 true 유지 — 사용자는 여전히 Start 눌러 알고리즘 시작 결정. // waitingForStart 는 true 유지 — 사용자는 여전히 Start 눌러 알고리즘 시작 결정.