Methods:
The Config class provides access to Leap Motion system configuration information.
You can get and set gesture configuration parameters using the Config object obtained from a connected Controller object (Controller.config).
After setting a configuration value, you must call the save() method to commit the changes. You can call save() after the Controller has connected to the Leap Motion service/daemon. In other words, after the Controller has dispatched the serviceConnected or connected events or Controller.isConnected is true. The configuration value changes are not persistent; your application needs to set the values everytime it runs.
See also:
New in version 1.0.
Constructs a Config object.
Do not create your own Config objects; rather, access the Config object of a connected controller with: Controller.config.
config = controller.config
New in version 1.0.
Gets the current value of a configuration variable.
min_swipe_length = config.get("Gesture.Swipe.MinLength")
Parameters: | key (string) – The name of the configuration variable. |
---|---|
Returns: | the value currently associated with the specified key. |
Sets a configuration variable to the specified value locally. The change in value is not effective until the save() method is called.
config.set("Gesture.Swipe.MinLength", 100)
Parameters: |
|
---|
Saves the current state of the config.
controller.config.set("Gesture.Circle.MinRadius", 15);
controller.config.set("Gesture.Circle.MinArc", 1.7);
success = controller.config.save();
Call save() after making a set of configuration changes. The save() function transfers the configuration changes to the Leap Motion service. You can call save() after the Controller has connected to the Leap Motion service/daemon. In other words, after the Controller has dispatched the serviceConnected or connected events or Controller.isConnected is true.The configuration value changes are not persistent; your application must set the values everytime it runs.
Returns: | True on success; False on failure. |
---|
New in version 1.0.