SETTINGS: Auto Scan Interval 슬라이더 추가 (600~5000ms, 200ms 단위)
기존 hardcoded 600ms를 사용자가 Settings에서 조절 가능하도록 변경. 추가: - PiezoSettings.autoScanIntervalMs (default 600ms) 필드 - AppState.savePiezoSettings() 헬퍼 — storage에 piezoSettings 영속화 - Settings 패널에 슬라이더 (Catheter Threshold 다음, Bladder Capacity와 동일 톤) - 범위 600~5000ms, 200ms 단위로 snap (roundToInt + 200 배수) - 현재값 mL 표시 패턴과 동일하게 "X ms" 우측 표시 - Settings Save 버튼이 실제로 영속화하도록 savePiezoSettings() 호출 추가 (이전에는 showSettings=false만 호출 — maxVolume 등도 메모리만 변경되던 버그 동시 fix) 동작: - PiezoMonitor Auto loop의 remaining = targetIntervalMs - elapsed - BleManager throttle(600ms)이 하한이라 600 미만 설정해도 막힘 — 의미 있는 최소가 600 - 5000ms로 설정 시 거의 정적 모니터링 (배터리/CPU 절약) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -231,6 +231,10 @@ class AppState(private val context: Context) {
|
||||
storage.catheterizationLevel = threshold
|
||||
}
|
||||
|
||||
fun savePiezoSettings() {
|
||||
storage.piezoSettings = piezoSettings
|
||||
}
|
||||
|
||||
val estimatedVolume: Int
|
||||
get() {
|
||||
if (BladderLevel.MAX_LEVEL <= 0) return 0
|
||||
|
||||
Reference in New Issue
Block a user