Files
VesiscanClinicalAndroid/app
dw.jang 9d1e0e62ad feat(posture): 데모 idle 시 msp(IMU-only) polling — 사용자앱 동기화 + walking 검출 유지
사용자앱 (feature/tab-navigation b1aecfc, e3c21e6) 의 msp 전환을 데모에도 적용.
demo 의 walking detector 유지 위해 폴링 주기 조정.

배경:
- 기존: PiezoMonitoring idle 에서 mtb 1Hz 폴링 → 매 cycle piezo burst 가청음.
- 사용자앱 실측 (VBTFW0120) 으로 rsp: 18B 정상 응답 확정. 데모 ImuPacketCollector
  는 이미 parseRsp 가지고 있어 (이전에 defensive 작성) BleManager 가 자동 트리거.

수정:
- GreenZoneConstants.posturePollIntervalMs: 1000 → 200ms (5Hz)
  walking detector window (1.5초) 안에 7~8 sample 확보 — mtb 의 15Hz 등가에는
  못 미치지만 사람 보행 freq 1.5~2.5Hz 의 Nyquist 5Hz 충분.
- PiezoMonitoringView LaunchedEffect:
  - idle (auto/single scan 비활성) → sendImuQuery() — 무음
  - auto scan 중 → 기존 mtb 의 rim: 가 자동으로 posture 갱신
- imuCollector.onComplete 는 parseRim / parseRsp 둘 다에서 fire 되니 wiring 그대로.

부하 비교:
  mtb 1Hz  ≈ 1200 B/s  (가청음 발생)
  msp 5Hz  ≈   90 B/s  (무음)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-30 10:09:23 +09:00
..