fix: detachment 비활성화 + incomplete retry 제거 (c3eba58 기반 안정화)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
-11
@@ -107,17 +107,6 @@ fun PiezoMonitoringView(appState: AppState) {
|
|||||||
|
|
||||||
bleManager.piezoCollector.onMultiChannelComplete = { channels ->
|
bleManager.piezoCollector.onMultiChannelComplete = { channels ->
|
||||||
handler.post {
|
handler.post {
|
||||||
// 6채널 미만 수신 → 자동 retry (패킷 드랍 대응)
|
|
||||||
val receivedCount = channels.count { it.buffer.isNotEmpty() }
|
|
||||||
if (receivedCount < 6 && measureRetryCount < maxMeasureRetries) {
|
|
||||||
measureRetryCount++
|
|
||||||
Log.w("PiezoMonitor", "Incomplete: $receivedCount/6 channels — retry $measureRetryCount")
|
|
||||||
bleManager.debugLogger.warn("INCOMPLETE_SCAN $receivedCount/6 — retry $measureRetryCount")
|
|
||||||
bleManager.piezoCollector.reset()
|
|
||||||
bleManager.sendChannelsOnly()
|
|
||||||
return@post
|
|
||||||
}
|
|
||||||
|
|
||||||
lastMultiChannelResult.clear()
|
lastMultiChannelResult.clear()
|
||||||
lastMultiChannelResult.addAll(channels)
|
lastMultiChannelResult.addAll(channels)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -341,7 +341,7 @@ fun PlacementGuideView(appState: AppState) {
|
|||||||
val buffers = channels.sortedBy { it.channel }.map { it.buffer }
|
val buffers = channels.sortedBy { it.channel }.map { it.buffer }
|
||||||
val detachResult = DetachmentDetection.detect(buffers)
|
val detachResult = DetachmentDetection.detect(buffers)
|
||||||
|
|
||||||
if (detachResult.isDetached) {
|
if (false) { // detachment 비활성화
|
||||||
directionHint = "Sensor detached — check contact"
|
directionHint = "Sensor detached — check contact"
|
||||||
directionIcon = "exclamationmark.triangle"
|
directionIcon = "exclamationmark.triangle"
|
||||||
placementScore = 0
|
placementScore = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user