From 8c07809d58410d839d5f989187d27346c741336b Mon Sep 17 00:00:00 2001 From: jjangddu Date: Wed, 17 Jun 2026 18:10:25 +0900 Subject: [PATCH] =?UTF-8?q?fix(align=20V1):=20GREEN=20=EA=B2=8C=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EA=B0=95=ED=99=94=20=E2=80=94=204=EA=B0=9C=20cente?= =?UTF-8?q?r=20=EB=AA=A8=EB=91=90=20=EC=9A=94=EA=B5=AC=20(=EC=B8=A1?= =?UTF-8?q?=EC=A0=95=20BV=20=EA=B2=8C=EC=9D=B4=ED=8A=B8=EC=99=80=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 증상: 정렬 OK 직후 측정 시 ch3 미검출로 BV SKIP. 정렬은 통과했는데 측정에서 "No center channels" 가 자주 발생. 원인: 정렬 GREEN 게이트는 depths.size >= 2 만 요구 (2~3 center 채널 만으로도 CV/lr 통과 시 OK). 반면 측정 BV 게이트는 effectiveCenterWalls >= 4 필요. 정렬 OK 직후 ch3 가 borderline 이면 측정 단계에서 빠질 확률 높음. 수정: PlacementGuideView.computePlacementGuide() 의 GREEN 게이트를 depths.size < 4 로 강화 (측정 게이트와 동일). 4개 모두 잡힐 때만 CV/lr 평가로 진입. 빠진 채널 위치별 hint 분기: - 2개 이상 missing → 일반 "adjust position" - ch3 missing → 'Slide up slightly ↑' (사센서 너무 낮음) - ch0 missing → 'Slide down slightly ↓' (센서 너무 높음) - ch1/ch2 missing → generic 미세 조정 phase 는 GREEN→VERTICAL 로 회귀 (기존 < 2 분기와 동일). 효과: 정렬 OK 가 4-channel 안정 검출 필요 → 그 다음 measurement 에서 ch3 미검출로 BV SKIP 거의 사라짐. 트레이드오프: 정렬 단계가 다소 까다로워짐 (작은 방광/borderline ch3 사용자 좌절 가능). 필요 시 사용자별 relax 조정. Co-Authored-By: Claude Opus 4.7 --- .../ui/views/monitoring/PlacementGuideView.kt | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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 3eb604f..139abad 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 @@ -1812,6 +1812,7 @@ private fun computePlacementGuide( val centerCh = hw.centerCh val depths = mutableListOf() + val missingCenters = mutableListOf() for (localIdx in centerCh.indices) { val ch = centerCh[localIdx] val w = if (ch < walls.size) walls[ch] else null @@ -1819,12 +1820,28 @@ private fun computePlacementGuide( val rawDepth = (offset + w.second * dps) - (offset + w.first * dps) val theta = degAll[ch] * Math.PI / 180.0 val corrected = rawDepth * kotlin.math.cos(theta) - if (corrected > 0) depths.add(corrected) + if (corrected > 0) depths.add(corrected) else missingCenters.add(ch) + } else { + missingCenters.add(ch) } } - if (depths.size < 2) { - return PlacementGuideResult("Start over from above the pubic bone", "arrow.up", 10, + // 측정 단계 BV 게이트와 정렬 (effectiveCenterWalls >= 4) — 4개 center 모두 + // 잡혀야만 GREEN 통과. 정렬 OK 직후 측정 시 ch3 missing 으로 BV SKIP 되던 케이스 차단. + if (depths.size < 4) { + val pubicMissing = 3 in missingCenters // ch3 = 치골 쪽 (bottom of sensor) + val navelMissing = 0 in missingCenters // ch0 = 배꼽 쪽 (top of sensor) + val (hint, icon) = when { + missingCenters.size >= 2 -> + Pair("Adjust position — multiple channels missing", "arrow.up") + pubicMissing -> + Pair("Slide up slightly ↑ (ch3 missing)", "arrow.up") + navelMissing -> + Pair("Slide down slightly ↓ (ch0 missing)", "arrow.down") + else -> + Pair("Adjust position slightly — center channel missing", "arrow.up") + } + return PlacementGuideResult(hint, icon, 30, phase = PlacementPhase.GREEN, nextPhase = PlacementPhase.VERTICAL) }