fix: Fix "Unknown AF/AE/AWB State" error (#2592)

This commit is contained in:
Marc Rousavy 2024-02-20 08:54:26 +01:00 committed by GitHub
parent 4c159aff61
commit fabf019f66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,6 +30,7 @@ interface AutoState {
} }
enum class FocusState : AutoState { enum class FocusState : AutoState {
Unknown,
Inactive, Inactive,
Scanning, Scanning,
Focused, Focused,
@ -53,11 +54,12 @@ enum class FocusState : AutoState {
CaptureResult.CONTROL_AF_STATE_PASSIVE_SCAN -> PassiveScanning CaptureResult.CONTROL_AF_STATE_PASSIVE_SCAN -> PassiveScanning
CaptureResult.CONTROL_AF_STATE_PASSIVE_FOCUSED -> PassiveFocused CaptureResult.CONTROL_AF_STATE_PASSIVE_FOCUSED -> PassiveFocused
CaptureResult.CONTROL_AF_STATE_PASSIVE_UNFOCUSED -> PassiveUnfocused CaptureResult.CONTROL_AF_STATE_PASSIVE_UNFOCUSED -> PassiveUnfocused
else -> throw Error("Invalid CONTROL_AF_STATE! $afState") else -> Unknown
} }
} }
} }
enum class ExposureState : AutoState { enum class ExposureState : AutoState {
Unknown,
Locked, Locked,
Inactive, Inactive,
Precapture, Precapture,
@ -79,12 +81,13 @@ enum class ExposureState : AutoState {
CaptureResult.CONTROL_AE_STATE_CONVERGED -> Converged CaptureResult.CONTROL_AE_STATE_CONVERGED -> Converged
CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED -> FlashRequired CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED -> FlashRequired
CaptureResult.CONTROL_AE_STATE_LOCKED -> Locked CaptureResult.CONTROL_AE_STATE_LOCKED -> Locked
else -> throw Error("Invalid CONTROL_AE_STATE! $aeState") else -> Unknown
} }
} }
} }
enum class WhiteBalanceState : AutoState { enum class WhiteBalanceState : AutoState {
Unknown,
Inactive, Inactive,
Locked, Locked,
Searching, Searching,
@ -102,7 +105,7 @@ enum class WhiteBalanceState : AutoState {
CaptureResult.CONTROL_AWB_STATE_SEARCHING -> Searching CaptureResult.CONTROL_AWB_STATE_SEARCHING -> Searching
CaptureResult.CONTROL_AWB_STATE_CONVERGED -> Converged CaptureResult.CONTROL_AWB_STATE_CONVERGED -> Converged
CaptureResult.CONTROL_AWB_STATE_LOCKED -> Locked CaptureResult.CONTROL_AWB_STATE_LOCKED -> Locked
else -> throw Error("Invalid CONTROL_AWB_STATE! $awbState") else -> Unknown
} }
} }
} }