fix: preset 감지 오류 (BV 2배 차이 근본원인) + 도넛 비율 + placement 자동통과
- autoDetectPreset: 기기이름 뒤에서 3번째 글자로 각도타입 판별 VBT26050301 → '3' → V2 (기존: VBT2604 매칭 실패 → V0 → 각도 0° → BV 절반) - 도넛차트: level 단계별 → maxVolumeMl/maxVolume 연속 비율로 변경 - Placement "Almost there" 3회 연속 → 자동 GREEN 통과 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,15 +35,20 @@ object PiezoHW {
|
||||
var activePreset: DevicePreset = DevicePreset.V0
|
||||
|
||||
fun autoDetectPreset(deviceName: String) {
|
||||
if (deviceName.startsWith("VBT2604") && deviceName.length >= 10) {
|
||||
when (deviceName[8]) {
|
||||
'0' -> activePreset = DevicePreset.V0
|
||||
'2' -> activePreset = DevicePreset.V1
|
||||
'3' -> activePreset = DevicePreset.V2
|
||||
if (deviceName.startsWith("VBT") && deviceName.length >= 4) {
|
||||
// VBT...n0x → 뒤에서 3번째 글자(n)가 각도 타입
|
||||
// n=0 → V0, n=2 → V1, n=3 → V2
|
||||
val n = deviceName[deviceName.length - 3]
|
||||
activePreset = when (n) {
|
||||
'0' -> DevicePreset.V0
|
||||
'2' -> DevicePreset.V1
|
||||
'3' -> DevicePreset.V2
|
||||
else -> DevicePreset.V1 // 알 수 없으면 V1 기본
|
||||
}
|
||||
} else if (deviceName.startsWith("2025MEDIP")) {
|
||||
activePreset = DevicePreset.LEGACY_5CH
|
||||
}
|
||||
android.util.Log.d("PiezoHW", "autoDetectPreset: '$deviceName' → ${activePreset.name}")
|
||||
}
|
||||
|
||||
val centerCh = intArrayOf(0, 1, 2, 3)
|
||||
|
||||
Reference in New Issue
Block a user