Add packaged per-camera X4 wake and preview recovery
This commit is contained in:
@@ -35,6 +35,16 @@ class VideoHeader(ctypes.Structure):
|
||||
|
||||
def parameters(action, value):
|
||||
"""Validate before any SDK call; parameters never select a file or library."""
|
||||
if action == "recovery.configure":
|
||||
if (
|
||||
not isinstance(value, dict)
|
||||
or set(value) != {"enabled", "wakeup_confirmed"}
|
||||
or type(value["enabled"]) is not bool
|
||||
or type(value["wakeup_confirmed"]) is not bool
|
||||
or (value["enabled"] and not value["wakeup_confirmed"])
|
||||
):
|
||||
raise ValueError("Confirm camera Bluetooth Wakeup before enabling recovery")
|
||||
return 0, "", 0.0
|
||||
if action == "offer":
|
||||
if (
|
||||
not isinstance(value, dict)
|
||||
|
||||
Reference in New Issue
Block a user