DEV: 측정 모드 직진입 버튼 + Start 라우팅 fix
빌드 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) <noreply@anthropic.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
+15
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user