fix: 그래프 Method 동기화, Spot 쿨다운, 스캔 캐릭터 센터링
도넛차트: - Developer Tools 그래프: 선택된 Method(A/B/C)로 분석 표시 (기존 B 고정 → 동기화) - Spot 버튼: 1.5초 쿨다운 (연속 탭 방지, 기기 회복 시간 확보) DeviceScan: - 스캐닝 캐릭터 가운데 정렬 (.fillMaxWidth()) + 크기 140→180dp Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -200,11 +200,11 @@ fun DeviceScanView(appState: AppState) {
|
||||
// Device list
|
||||
if (filteredDevices.isEmpty() && isScanning) {
|
||||
Column(
|
||||
modifier = Modifier.weight(1f),
|
||||
modifier = Modifier.weight(1f).fillMaxWidth(),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
BladdyIdleRiveView(size = 140.dp)
|
||||
BladdyIdleRiveView(size = 180.dp)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Text("Scanning...", color = MlSecondaryText)
|
||||
}
|
||||
|
||||
+22
-5
@@ -795,10 +795,17 @@ fun PiezoMonitoringView(appState: AppState) {
|
||||
}
|
||||
}
|
||||
|
||||
// Spot (single measurement)
|
||||
// Spot (single measurement, 1.5초 쿨다운)
|
||||
var spotCooldown by remember { mutableStateOf(false) }
|
||||
Button(
|
||||
onClick = { if (!isMeasuring && !isAutoMeasuring) measure() },
|
||||
enabled = !isMeasuring && !isAutoMeasuring,
|
||||
onClick = {
|
||||
if (!isMeasuring && !isAutoMeasuring && !spotCooldown) {
|
||||
measure()
|
||||
spotCooldown = true
|
||||
handler.postDelayed({ spotCooldown = false }, 1500)
|
||||
}
|
||||
},
|
||||
enabled = !isMeasuring && !isAutoMeasuring && !spotCooldown,
|
||||
modifier = Modifier.weight(1f).height(56.dp),
|
||||
shape = RoundedCornerShape(14.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
@@ -1078,7 +1085,14 @@ private fun ChannelPanel(
|
||||
}
|
||||
} else {
|
||||
// Zone indicator
|
||||
val analyses = lastMultiChannelResult.map { analyzer.analyzeChannel(it.buffer, it.channel) }
|
||||
val curMethod = com.example.medilightv2android.managers.GreenZoneConstants.detectionMethod
|
||||
val analyzerAPanel = com.example.medilightv2android.managers.PiezoEchoAnalyzerA.shared
|
||||
val analyses = lastMultiChannelResult.map { chData ->
|
||||
when (curMethod) {
|
||||
com.example.medilightv2android.managers.DetectionMethod.METHOD_A -> analyzerAPanel.analyzeChannel(chData.buffer, chData.channel)
|
||||
else -> analyzer.analyzeChannel(chData.buffer, chData.channel)
|
||||
}
|
||||
}
|
||||
val detectedCount = analyses.count { it.isValid }
|
||||
val zoneColor = when {
|
||||
detectedCount >= 4 -> Color.Green
|
||||
@@ -1134,7 +1148,10 @@ private fun ChannelPanel(
|
||||
|
||||
// Per-channel waveforms
|
||||
for (chData in lastMultiChannelResult.filter { it.buffer.isNotEmpty() }) {
|
||||
val chAnalysis = analyzer.analyzeChannel(chData.buffer, chData.channel)
|
||||
val chAnalysis = when (curMethod) {
|
||||
com.example.medilightv2android.managers.DetectionMethod.METHOD_A -> analyzerAPanel.analyzeChannel(chData.buffer, chData.channel)
|
||||
else -> analyzer.analyzeChannel(chData.buffer, chData.channel)
|
||||
}
|
||||
|
||||
Column(verticalArrangement = Arrangement.spacedBy(3.dp)) {
|
||||
// Channel header
|
||||
|
||||
Reference in New Issue
Block a user