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:
+9
-7
@@ -256,8 +256,11 @@ fun PlacementGuideView(appState: AppState) {
|
||||
) {
|
||||
Text("Echo Waveforms", fontSize = 13.sp, fontWeight = FontWeight.Bold, color = MlPrimary)
|
||||
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 showWalls = if (detected) {
|
||||
val chAnalysis = analyzer.analyzeChannel(chData.buffer, chData.channel)
|
||||
chAnalysis.result
|
||||
} else null
|
||||
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Box(
|
||||
@@ -266,11 +269,10 @@ fun PlacementGuideView(appState: AppState) {
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Text("CH${chData.channel}", fontSize = 11.sp, fontWeight = FontWeight.Bold)
|
||||
if (chAnalysis.result != null) {
|
||||
val r = chAnalysis.result
|
||||
if (showWalls != null) {
|
||||
Spacer(modifier = Modifier.width(6.dp))
|
||||
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
|
||||
)
|
||||
}
|
||||
@@ -279,8 +281,8 @@ fun PlacementGuideView(appState: AppState) {
|
||||
buffer = chData.buffer,
|
||||
peakIndex = chData.peakIndex.toInt(),
|
||||
analyzer = analyzer,
|
||||
antIndex = chAnalysis.result?.ant,
|
||||
postIndex = chAnalysis.result?.post,
|
||||
antIndex = showWalls?.ant,
|
||||
postIndex = showWalls?.post,
|
||||
modifier = Modifier.fillMaxWidth().height(80.dp)
|
||||
)
|
||||
}
|
||||
@@ -307,7 +309,7 @@ fun PlacementGuideView(appState: AppState) {
|
||||
val urineLens = MutableList(6) { 0 }
|
||||
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) {
|
||||
if (ch.buffer.isNotEmpty() && ch.channel < 6) {
|
||||
|
||||
Reference in New Issue
Block a user