From 34bb446e0fb282ffee6dbabf34fb9345ed5297c5 Mon Sep 17 00:00:00 2001 From: jjangddu Date: Wed, 20 May 2026 15:58:47 +0900 Subject: [PATCH] =?UTF-8?q?DEV:=20=EC=B8=A1=EC=A0=95=20=EB=AA=A8=EB=93=9C?= =?UTF-8?q?=20=EC=A7=81=EC=A7=84=EC=9E=85=20=EB=B2=84=ED=8A=BC=20+=20Start?= =?UTF-8?q?=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 빌드 104-105 적용: - DeviceScanView "No devices found" 화면에 dev 모드 한정 "Enter Measurement Mode" 버튼 추가 (BLE 없이 디자인 작업용) - AppState.startFromHome() 라우팅 fix — 페어링 후 Personalization → Back → HOME → Start 시 Monitoring 직행 버그를 PIEZO_PERSONALIZATION 부터 시작하도록 변경 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../com/example/medilightv2android/AppState.kt | 3 ++- .../ui/views/connection/DeviceScanView.kt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/medilightv2android/AppState.kt b/app/src/main/java/com/example/medilightv2android/AppState.kt index 6a56153..904c308 100644 --- a/app/src/main/java/com/example/medilightv2android/AppState.kt +++ b/app/src/main/java/com/example/medilightv2android/AppState.kt @@ -96,7 +96,8 @@ class AppState(private val context: Context) { fun startFromHome() { sensorMode = SensorMode.PIEZO storage.sensorMode = SensorMode.PIEZO - currentScreen = if (isDeviceConnected) AppScreen.PIEZO_MONITORING else AppScreen.DEVICE_SCAN + // 페어링 완료 상태에서도 Personalization부터 시작해야 함 — Monitoring 직행 버그 fix + currentScreen = if (isDeviceConnected) AppScreen.PIEZO_PERSONALIZATION else AppScreen.DEVICE_SCAN } fun selectSensor(mode: SensorMode) { diff --git a/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt b/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt index ec68846..e9eda2b 100644 --- a/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt +++ b/app/src/main/java/com/example/medilightv2android/ui/views/connection/DeviceScanView.kt @@ -259,6 +259,21 @@ fun DeviceScanView(appState: AppState) { TroubleshootItem("4.", "Try restarting the device") } } + // DEV: BLE 없이 측정 모드 진입 — 디자인 작업용 + if (appState.isDevMode) { + Spacer(modifier = Modifier.height(16.dp)) + Button( + onClick = { + appState.isDeviceConnected = true + appState.currentScreen = com.example.medilightv2android.AppScreen.PIEZO_PERSONALIZATION + }, + modifier = Modifier.fillMaxWidth().height(48.dp), + shape = RoundedCornerShape(12.dp), + colors = ButtonDefaults.buttonColors(containerColor = MlPrimary.copy(alpha = 0.15f)) + ) { + Text("Enter Measurement Mode (Dev)", color = MlPrimary, fontWeight = FontWeight.SemiBold) + } + } } } else { LazyColumn(