fix: BLE 패킷 수신 메인스레드 의존 제거 + Auto 간격 1.5초

BLE:
- onCharacteristicChanged에서 handler.post 제거
- processReceivedData를 Binder 스레드에서 직접 실행
- 메인 스레드 큐 대기로 인한 reb 패킷 유실 방지

Auto:
- 최소 간격 1000ms → 1500ms (기기 연속 maa 채널 드롭 방지)
- 10개 × 1.5초 = ~15초마다 trimmed mean 업데이트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 10:37:14 +09:00
parent 1a42fe6a07
commit 85162669e4
2 changed files with 4 additions and 4 deletions
@@ -807,7 +807,7 @@ class BleManager private constructor(private val context: Context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (characteristic.uuid == RX_CHAR_UUID) {
if (value.size < 4) return
handler.post { processReceivedData(value) }
processReceivedData(value)
}
}
}
@@ -819,7 +819,7 @@ class BleManager private constructor(private val context: Context) {
@Suppress("DEPRECATION")
val data = characteristic.value ?: return
if (data.size < 4) return
handler.post { processReceivedData(data) }
processReceivedData(data)
}
}
}