feat: UI 일괄 수정 (9개 항목 중 1,2,3,4,9번)
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) <noreply@anthropic.com>
This commit is contained in:
+2
-4
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
+5
-12
@@ -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<Pair<Int, Int>?> = 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)
|
||||
|
||||
Reference in New Issue
Block a user