fix: msp/mbb 명령어 뒤에 공백 추가 (mid?와 동일 포맷)

기기가 파라미터 없는 명령에도 공백을 요구함 (펌웨어 파서 특성)
- sendImuQuery: buildCommand("msp") → buildCommandASCII("msp", " ")
- sendFullMeasurement: buildCommand("mbb") → buildCommandASCII("mbb", " ")
- IMU 1초 쿼리 재활성화

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 13:49:30 +09:00
parent a3c80bd074
commit 76ec271352
2 changed files with 5 additions and 3 deletions
@@ -358,13 +358,13 @@ class BleManager private constructor(private val context: Context) {
}
fun sendImuQuery() {
sendRaw(CRC16.buildCommand("msp"))
sendRaw(CRC16.buildCommandASCII("msp", " "))
}
/** 전체 측정: 배터리+IMU+온도+6ch piezo (rbb→reb×6→raa) */
fun sendFullMeasurement() {
piezoCollector.startMultiChannel(6)
sendRaw(CRC16.buildCommand("mbb"))
sendRaw(CRC16.buildCommandASCII("mbb", " "))
}
/** 6채널 측정만 (maa, rbb 헤더 없이 바로 reb×6→raa) */
@@ -238,8 +238,10 @@ fun PiezoMonitoringView(appState: AppState) {
if (autoTickCount % 10 == 0) {
// 10초째: 6ch 측정
if (!isMeasuring) measure()
} else {
// 1~9초: IMU 쿼리
if (!isMeasuring) bleManager.sendImuQuery()
}
// IMU는 지원하는 기기에서만 (rxs: 응답 시 자동 비활성화)
}
}
}