From cc00c25a6647c4ae5c64d118ebf1a7ce142a418f Mon Sep 17 00:00:00 2001 From: jjangddu Date: Tue, 28 Apr 2026 11:30:45 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20UI=20=EC=9D=BC=EA=B4=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(9=EA=B0=9C=20=ED=95=AD=EB=AA=A9=20=EC=A4=91=201,2,?= =?UTF-8?q?3,4,9=EB=B2=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1+2. Placement peak 감도: urineLen >= 10 필터 (짧은 false positive 방지) 3. Placement 센서 그림(SensorLayoutCanvas) 제거 4. 앱 이름: MediLight → VesiScan-Basic (홈화면 + strings.xml) 9. BLE 신호: Good+Excellent 통합 (rssi >= -65 → Green 4칸) Co-Authored-By: Claude Opus 4.6 (1M context) --- .../ui/views/connection/DeviceScanView.kt | 6 ++---- .../ui/views/home/HomeView.kt | 2 +- .../ui/views/monitoring/PlacementGuideView.kt | 17 +++++------------ app/src/main/res/values-ko/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt b/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt index 35e3f98..d7ff5a2 100644 --- a/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt +++ b/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt @@ -350,13 +350,12 @@ private fun DeviceRow(device: BleDevice, isConnecting: Boolean, enabled: Boolean @Composable private fun SignalBars(rssi: Int) { val strength = when { - rssi >= -50 -> 4 - rssi >= -65 -> 3 + rssi >= -65 -> 4 // Good+Excellent 통합 → Green rssi >= -80 -> 2 else -> 1 } val color = when { - strength >= 3 -> Color.Green + strength >= 4 -> Color.Green strength == 2 -> Color(0xFFFF9500) else -> Color.Red } @@ -374,7 +373,6 @@ private fun SignalBars(rssi: Int) { } private fun signalLabel(rssi: Int): String = when { - rssi >= -50 -> "Excellent" rssi >= -65 -> "Good" rssi >= -80 -> "Fair" else -> "Weak" diff --git a/app/src/main/java/com/example/medilightv2android/ui/views/home/HomeView.kt b/app/src/main/java/com/example/medilightv2android/ui/views/home/HomeView.kt index 902b7dc..87dcdac 100644 --- a/app/src/main/java/com/example/medilightv2android/ui/views/home/HomeView.kt +++ b/app/src/main/java/com/example/medilightv2android/ui/views/home/HomeView.kt @@ -34,7 +34,7 @@ fun HomeView(appState: AppState) { Spacer(modifier = Modifier.height(24.dp)) - Text("MediLight", fontSize = 32.sp, fontWeight = FontWeight.Bold) + Text("VesiScan-Basic", fontSize = 32.sp, fontWeight = FontWeight.Bold) Spacer(modifier = Modifier.height(4.dp)) 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 0f8fe4f..f7c9adb 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 @@ -151,16 +151,7 @@ fun PlacementGuideView(appState: AppState) { modifier = Modifier.padding(top = 8.dp) ) - Spacer(modifier = Modifier.height(24.dp)) - - // Sensor layout visualization - SensorLayoutCanvas( - channelDetected = channelDetected, - directionIcon = directionIcon, - isLocked = isLocked - ) - - Spacer(modifier = Modifier.height(24.dp)) + Spacer(modifier = Modifier.height(16.dp)) // Direction guide if (directionHint.isNotEmpty() && !isLocked) { @@ -319,16 +310,18 @@ fun PlacementGuideView(appState: AppState) { val urineLens = MutableList(6) { 0 } val allWalls: MutableList?> = MutableList(6) { null } + val MIN_URINE_LEN_PLACEMENT = 10 // Placement에서는 최소 10칸 이상이어야 유효 + for (ch in channels) { if (ch.buffer.isNotEmpty() && ch.channel < 6) { val analysis = analyzer.analyzeChannel(ch.buffer, ch.channel) - if (analysis.isValid && analysis.result != null) { + if (analysis.isValid && analysis.result != null && analysis.result.urineLen >= MIN_URINE_LEN_PLACEMENT) { detected[ch.channel] = true urineLens[ch.channel] = analysis.result.urineLen allWalls[ch.channel] = Pair(analysis.result.ant, analysis.result.post) } else { val gate = UrinAI.detect(ch.buffer) - if (gate.detected) { + if (gate.detected && (gate.bw - gate.fw) >= MIN_URINE_LEN_PLACEMENT) { detected[ch.channel] = true urineLens[ch.channel] = gate.bw - gate.fw allWalls[ch.channel] = Pair(gate.fw, gate.bw) diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index dcfad07..d531c94 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -1,5 +1,5 @@ - MedilightV2 + VesiScan-Basic 확인 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 48fad04..0251b34 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - MedilightV2 + VesiScan-Basic OK