Camera2Editor
public protocol Camera2Editor
Camera configuration editor.
-
Provides access to an editable configuration parameter of type
V
.Declaration
Swift
subscript<V>(param: Camera2Param<V>) -> Camera2EditableParam<V>? where V : Hashable { get }
Parameters
param
configuration parameter descriptor
Return Value
the configuration parameter or
nil
if not supported by the drone -
Provides access to an editable configuration parameter of type
Double
.Declaration
Swift
subscript(param: Camera2Param<Double>) -> Camera2EditableDouble? { get }
Parameters
param
configuration parameter descriptor
Return Value
the configuration parameter or
nil
if not supported by the drone -
Whether the configuration is complete.
The configuration is complete when each of the supported parameters either:
- has a defined value (not
nil
) within the currently supported values for this parameter, - there are no currently supported values for this parameter.
A configuration can only be commited when complete.
Declaration
Swift
var complete: Bool { get }
- has a defined value (not
-
Automatically completes this configuration.
For each currently undefined parameter, sets a valid value if possible, so that the configuration is
complete
and may be committed.Declaration
Swift
@discardableResult func autoComplete() -> Camera2Editor
Return Value
self
, to allow call chaining -
Clears current configuration.
All supported parameters are cleared (their value is set to
nil
).Declaration
Swift
@discardableResult func clear() -> Camera2Editor
Return Value
self
, to allow call chaining -
Commits this configuration.
In case the current configuration is
complete
, it is applied to the camera and sent to the drone if connected.Declaration
Swift
func commit() -> Bool
Return Value
true
if the configuration has been successfully committed, otherwisefalse