diff --git a/app/src/main/java/com/medithings/vesiscan/ui/views/clinical/AnchorAlignView.kt b/app/src/main/java/com/medithings/vesiscan/ui/views/clinical/AnchorAlignView.kt index 3ff83ad..5992b81 100644 --- a/app/src/main/java/com/medithings/vesiscan/ui/views/clinical/AnchorAlignView.kt +++ b/app/src/main/java/com/medithings/vesiscan/ui/views/clinical/AnchorAlignView.kt @@ -468,6 +468,7 @@ fun AnchorAlignView(appState: AppState) { // ── 2단계: 좌우 정렬 ─────────────────────────────────────── // 상하가 정해진 자리에서 프로브를 좌우로만 움직여 CH4·CH5 를 맞춘다. LateralSection( + anchorCm = last?.anchorCm, running = lrRunning, commit = lrCommit, accumulated = lrAccum, @@ -559,6 +560,8 @@ fun AnchorAlignView(appState: AppState) { */ @Composable private fun LateralSection( + /** 부착 위치(best + 오프셋). 좌우는 **이 높이에서** 맞춰야 한다. */ + anchorCm: Int?, running: Boolean, commit: LateralGuide.Commit?, accumulated: Int, @@ -587,9 +590,29 @@ private fun LateralSection( if (confirmed) Text("확인됨", fontSize = 12.sp, color = MlSuccess, fontWeight = FontWeight.SemiBold) } - Spacer(Modifier.height(4.dp)) + Spacer(Modifier.height(10.dp)) + + // 1단계가 끝난 시점에 프로브는 **최적 위치**에 있고, 부착할 자리는 그보다 1cm + // 위다(오프셋 자리는 측정하지 않는다). 좌우 균형은 그 높이의 단면에서 정해지는 + // 값이라 높이를 바꾸면 u4·u5 가 달라진다 — 옮기기 **전에** 맞추면 헛일이 된다. + // 화면이 이걸 말해 주지 않으면 간호사마다 순서가 갈린다. + anchorCm?.let { anchor -> + Box( + Modifier.fillMaxWidth() + .background(MlPrimary.copy(alpha = 0.10f), RoundedCornerShape(10.dp)) + .padding(10.dp) + ) { + Text( + "먼저 프로브를 부착 위치 ${anchor}cm 로 옮기세요. " + + "좌우는 그 높이에서 맞춥니다.", + fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = MlPrimary, + ) + } + Spacer(Modifier.height(10.dp)) + } + Text( - "위치는 그대로 두고 프로브를 좌우로만 옮기며 맞춥니다. " + + "높이는 그대로 두고 프로브를 좌우로만 옮기며 맞춥니다. " + "|ch4−ch5| ≤ ${AlignmentConstants.LAT_TOL} 이면 완료입니다.", fontSize = 12.sp, color = MlSecondaryText, ) @@ -644,7 +667,18 @@ private fun LateralSection( shape = RoundedCornerShape(12.dp), colors = ButtonDefaults.buttonColors( containerColor = if (running) MlCritical else MlPrimary), - ) { Text(if (running) "정지" else "좌우 정렬 시작", fontWeight = FontWeight.Bold) } + ) { + // 버튼 문구에 cm 을 박아 둔다 — 누르는 순간에도 "어느 높이에서" 가 + // 눈에 들어와야 위 안내를 지나친 경우를 잡는다. + Text( + when { + running -> "정지" + anchorCm != null -> "${anchorCm}cm 에서 좌우 정렬 시작" + else -> "좌우 정렬 시작" + }, + fontWeight = FontWeight.Bold, + ) + } Spacer(Modifier.width(8.dp)) Button( // 균형에 도달했을 때만 누를 수 있다. 아무 때나 확인 처리하면 이 표시가