fix+UX: BLE 중복수신 수정, peak detection 개선, UI 대폭 정리

BLE:
- GATT 다중연결 race condition 수정 (reconnectConnecting 플래그)
- onCharacteristicChanged API 레벨 분기 (dual callback 방지)
- DeviceScan: isConnected → isServiceReady 전환 (서비스 준비 후 화면전환)
- Placement: mpa/maa 500ms 딜레이 (power on 대기)
- Disconnect & Unbond 기능 추가 (msr? + removeBond + 저장정보 삭제)
- autoConnect 삭제 (HomeView)

Algorithm:
- 후위벽 피크 >= threshold 조건 추가 (false positive 차단)
- low-echo 분석범위 80샘플 제한 (뒤쪽 노이즈 무시)
- urineLen: post-ant-1 → post-ant 수정
- Placement: UrinAI fallback 제거 (PiezoEchoAnalyzer만 사용)
- 기기 프리셋 autoDetect index 7→8 수정 (VBT26040Nxx)
- dps 기본값 1.771 → 1.968

UI:
- 도넛차트: Home버튼 삭제, Auto/Catheter count/History 삭제
- 3버튼 레이아웃 (Catheterize/Auto/Spot)
- 배터리 아이콘 (60+초록/30+주황/빨강) + 설정 톱니바퀴 분리
- SensorSelect/Consent 페이지 스킵
- 온보딩: VesiScan-Basic, NIRS 페이지 삭제
- MaxVolume: Step 표시 삭제, mL 오른쪽 배치
- BackHandler 전체 재정리 (자연스러운 뒤로가기)
- BLE 신호 기준 완화 (Good≥-80, Fair≥-90)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-28 17:03:37 +09:00
parent 227480af4b
commit 5cdae8a86e
11 changed files with 254 additions and 197 deletions
@@ -49,7 +49,6 @@ class AppState(private val context: Context) {
currentScreen = when {
!storage.hasCompletedOnboarding -> AppScreen.ONBOARDING
!storage.hasConsented -> AppScreen.CONSENT
!storage.isRegistered -> AppScreen.REGISTRATION
!storage.hasPin -> AppScreen.PIN_SETUP
else -> AppScreen.PIN_ENTRY
@@ -58,7 +57,8 @@ class AppState(private val context: Context) {
fun completeOnboarding() {
storage.hasCompletedOnboarding = true
currentScreen = AppScreen.CONSENT
storage.hasConsented = true
currentScreen = AppScreen.REGISTRATION
}
fun completeConsent() {
@@ -93,7 +93,9 @@ class AppState(private val context: Context) {
}
fun startFromHome() {
currentScreen = AppScreen.SENSOR_SELECT
sensorMode = SensorMode.PIEZO
storage.sensorMode = SensorMode.PIEZO
currentScreen = AppScreen.DEVICE_SCAN
}
fun selectSensor(mode: SensorMode) {
@@ -103,7 +105,7 @@ class AppState(private val context: Context) {
}
fun backToSensorSelect() {
currentScreen = AppScreen.SENSOR_SELECT
currentScreen = AppScreen.HOME
}
fun deviceConnected() {