feat: scan_id를 BLE 로그에도 추가 (CSV와 대조 가능)

- MEASUREMENT scan=3 vol=305.2ml lr=1.20 valid=4/6
- BV_SKIP scan=4 center=2/4 total=2/6
- BV_FAIL scan=5 no valid channels

AdcCsvLogger.lastScanId 공개 → BleDebugLogger에서 참조

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 11:24:57 +09:00
parent 099fcfaf97
commit 7125e79fb9
3 changed files with 8 additions and 3 deletions
@@ -156,8 +156,10 @@ class BleDebugLogger private constructor(private val context: Context) {
}
fun measurementResult(volumeMl: Double?, lrRatio: Double, validChannels: Int, urineLines: List<Int>) {
val scanId = AdcCsvLogger.lastScanId
val msg = buildString {
append("MEASUREMENT vol=${volumeMl?.let { "%.1f".format(it) } ?: "null"}ml")
append("MEASUREMENT scan=$scanId")
append(" vol=${volumeMl?.let { "%.1f".format(it) } ?: "null"}ml")
append(" lr=${"%.2f".format(lrRatio)}")
append(" valid=$validChannels/6")
append(" urine=[${urineLines.joinToString(",")}]")