fix: Placement 오탐 개선 — MIN_URINE_LEN 12, 미감지 채널 벽 표시 제거

- MIN_URINE_LEN_PLACEMENT 10 → 12 (짧은 오탐 필터 강화)
- 미감지 채널(channelDetected=false)은 그래프에서 ant/post 선, depth mm, cyan 영역 미표시
- 파형 자체는 유지 (신호 확인용)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-29 08:58:56 +09:00
parent 9e350d6d40
commit dc340608ee
@@ -256,8 +256,11 @@ fun PlacementGuideView(appState: AppState) {
) { ) {
Text("Echo Waveforms", fontSize = 13.sp, fontWeight = FontWeight.Bold, color = MlPrimary) Text("Echo Waveforms", fontSize = 13.sp, fontWeight = FontWeight.Bold, color = MlPrimary)
for (chData in lastChannelData.filter { it.buffer.isNotEmpty() }) { for (chData in lastChannelData.filter { it.buffer.isNotEmpty() }) {
val chAnalysis = analyzer.analyzeChannel(chData.buffer, chData.channel)
val detected = if (chData.channel < channelDetected.size) channelDetected[chData.channel] else false val detected = if (chData.channel < channelDetected.size) channelDetected[chData.channel] else false
val showWalls = if (detected) {
val chAnalysis = analyzer.analyzeChannel(chData.buffer, chData.channel)
chAnalysis.result
} else null
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically) {
Box( Box(
@@ -266,11 +269,10 @@ fun PlacementGuideView(appState: AppState) {
) )
Spacer(modifier = Modifier.width(4.dp)) Spacer(modifier = Modifier.width(4.dp))
Text("CH${chData.channel}", fontSize = 11.sp, fontWeight = FontWeight.Bold) Text("CH${chData.channel}", fontSize = 11.sp, fontWeight = FontWeight.Bold)
if (chAnalysis.result != null) { if (showWalls != null) {
val r = chAnalysis.result
Spacer(modifier = Modifier.width(6.dp)) Spacer(modifier = Modifier.width(6.dp))
Text( Text(
"${"%.0f".format(r.antDepthMm)}–${"%.0f".format(r.postDepthMm)}mm", "${"%.0f".format(showWalls.antDepthMm)}–${"%.0f".format(showWalls.postDepthMm)}mm",
fontSize = 9.sp, color = Color.Cyan fontSize = 9.sp, color = Color.Cyan
) )
} }
@@ -279,8 +281,8 @@ fun PlacementGuideView(appState: AppState) {
buffer = chData.buffer, buffer = chData.buffer,
peakIndex = chData.peakIndex.toInt(), peakIndex = chData.peakIndex.toInt(),
analyzer = analyzer, analyzer = analyzer,
antIndex = chAnalysis.result?.ant, antIndex = showWalls?.ant,
postIndex = chAnalysis.result?.post, postIndex = showWalls?.post,
modifier = Modifier.fillMaxWidth().height(80.dp) modifier = Modifier.fillMaxWidth().height(80.dp)
) )
} }
@@ -307,7 +309,7 @@ fun PlacementGuideView(appState: AppState) {
val urineLens = MutableList(6) { 0 } val urineLens = MutableList(6) { 0 }
val allWalls: MutableList<Pair<Int, Int>?> = MutableList(6) { null } val allWalls: MutableList<Pair<Int, Int>?> = MutableList(6) { null }
val MIN_URINE_LEN_PLACEMENT = 10 // Placement에서는 최소 10칸 이상이어야 유효 val MIN_URINE_LEN_PLACEMENT = 12
for (ch in channels) { for (ch in channels) {
if (ch.buffer.isNotEmpty() && ch.channel < 6) { if (ch.buffer.isNotEmpty() && ch.channel < 6) {