feat: 펌웨어 버전을 모든 로그 파일에 직접 노출
기존: meta.json에만 기록 (파일 단독으로 보면 펌웨어 확인 불가) 변경: adc.csv 컬럼 / placements.jsonl·events.jsonl 필드 / ble.log 헤더 블록 모두 노출 검사자/분석자가 각 파일 단독으로 열어도 어느 펌웨어 데이터인지 즉시 확인 가능. 변경: - BleManager.current: companion에 instance accessor 추가 (logger 같은 context-free 컴포넌트에서 BLE state 읽기용) - BleManager rid: 핸들러에서 debugLogger.deviceInfo(fw, hw, sn) 호출 (Headers 블록 기록) - AdcCsvLogger: CSV 헤더에 firmware_version 컬럼 추가, 모든 행에 값 채움 scan_id,timestamp,clinical_label,firmware_version,volume_ml,lr_ratio,... - MeasurementLogService.logMeasurement / logPlacement: JSON에 firmware_version 필드 추가 - BleDebugLogger.deviceInfo(): 새 메서드. rid: 응답 받은 후 ble.log에 다음 블록 기록: ─── Device Info ─── Firmware: VBTFW0116 Hardware: VBTHW0100 Serial: VBT26040001 ─────────────────── BLE 미연결 / mid 응답 안 옴 시엔 필드/값 비어있음 (정상). 응답 받자마자 자동 갱신. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,15 @@ class BleDebugLogger private constructor(private val context: Context) {
|
||||
add(Entry(System.currentTimeMillis(), Level.RSSI, "RSSI=$value dBm", rssi = value))
|
||||
}
|
||||
|
||||
/** mid?/rid: 응답 받은 후 호출 — 펌웨어 정보를 ble.log에 보기 좋게 헤더 형태로 기록 */
|
||||
fun deviceInfo(fw: String, hw: String, sn: String) {
|
||||
appendToFile("─── Device Info ───")
|
||||
if (fw.isNotEmpty()) appendToFile("Firmware: $fw")
|
||||
if (hw.isNotEmpty()) appendToFile("Hardware: $hw")
|
||||
if (sn.isNotEmpty()) appendToFile("Serial: $sn")
|
||||
appendToFile("───────────────────")
|
||||
}
|
||||
|
||||
fun connected(name: String, address: String) {
|
||||
deviceName = name
|
||||
sessionStart = System.currentTimeMillis()
|
||||
|
||||
Reference in New Issue
Block a user