diff --git a/app/src/main/java/com/medithings/vesiscan/ui/views/monitoring/PlacementGuideView.kt b/app/src/main/java/com/medithings/vesiscan/ui/views/monitoring/PlacementGuideView.kt index 12f6609..5808638 100644 --- a/app/src/main/java/com/medithings/vesiscan/ui/views/monitoring/PlacementGuideView.kt +++ b/app/src/main/java/com/medithings/vesiscan/ui/views/monitoring/PlacementGuideView.kt @@ -934,14 +934,16 @@ fun PlacementGuideView(appState: AppState) { directionHint = context.getString(R.string.placement_check_attachment) directionIcon = "" placementScore = 0 - // 2026-08-05: 사용자가 Start 눌렀는데 0/6 감지 시 · Start 화면 복귀. - // 그렇지 않으면 "아무것도 안 됨" 처럼 느껴짐 (button 사라진 채 hint 만 반복). - // prevDetached=true 로 세팅해 Start 재클릭 시 즉시 팝업 발생 (line ~1229 가드). + // 2026-08-05: Start 후 0/6 감지 시 · Start 화면 복귀 + 즉시 팝업. + // DetachmentDetection 은 EMI/노이즈로 std ≥ 30 이면 false 를 반환할 수 + // 있어 rising-edge 팝업이 안 뜨는 케이스가 있음. 0/6 은 그 자체로 부착 + // 실패 신호 → 즉시 팝업 강제. if (!waitingForStart) { isContinuousMode = false waitingForStart = true - prevDetached = true - bleManager.debugLogger.warn("ALIGN_V2 sanity: 0/6 walls · Start 후 부착 실패 · waitingForStart 복귀") + prevDetached = true // 재부착 시 dismiss 정상 동작 + showDetachAlert = true // 즉시 팝업 (재클릭 대기 없이) + bleManager.debugLogger.warn("ALIGN_V2 sanity: 0/6 walls · Start 후 부착 실패 · waitingForStart 복귀 + 팝업") } else { bleManager.debugLogger.info("ALIGN_V2 sanity: 0/6 walls · override to attachment check") }