Add more deadzone specification options. (#9)
Reviewed-on: #9 Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com> Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
parent
5b9dfe0967
commit
97a1acd228
20 changed files with 344 additions and 108 deletions
|
@ -26,6 +26,34 @@ rules:
|
|||
device: main
|
||||
axis: ABS_X
|
||||
|
||||
- type: axis
|
||||
input:
|
||||
device: flightstick
|
||||
# An alternate way to specify deadzones is to define the deadzone's center and then a
|
||||
# size value. This will create a deadzone that covers a range of deadzone_size,
|
||||
# centered on the center value. Note that if your deadzone_center is at the lower or upper end
|
||||
# of the axis, the total size will still be as given; the deadzone will be "shifted" into bounds.
|
||||
deadzone_center: 29000
|
||||
deadzone_size: 2000
|
||||
inverted: false
|
||||
axis: Y # The ABS_ prefix is optional
|
||||
output:
|
||||
device: main
|
||||
axis: ABS_Y
|
||||
|
||||
- type: axis
|
||||
input:
|
||||
device: flightstick
|
||||
# A final way to specify deadzones is to use a size percentage instead of an absolute size.
|
||||
# This works exactly like deadzone_size, but calculates a percentage of the axis' total range.
|
||||
deadzone_center: 29000
|
||||
deadzone_size_percent: 5
|
||||
inverted: false
|
||||
axis: Y # The ABS_ prefix is optional
|
||||
output:
|
||||
device: main
|
||||
axis: ABS_Y
|
||||
|
||||
# Straightforward button mapping
|
||||
- type: button
|
||||
input:
|
||||
|
|
|
@ -55,6 +55,16 @@ For input, you can figure out what event codes your device is emitting by runnin
|
|||
evtest | grep BTN_
|
||||
```
|
||||
|
||||
### Axis Deadzones
|
||||
|
||||
For most axis inputs, you will want to define deadzones. There are three possible approaches:
|
||||
|
||||
* Define `deadzone_start` and `deadzone_end` to explicitly set the deadzone bounds.
|
||||
* Define `deadzone_center` and `deadzone_size`; this will create a deadzone of the indicated size centered at the given axis position.
|
||||
* Define `deadzone_center` and `deadzone_size_percent` to use a percentage of the total axis size.
|
||||
|
||||
See <examples/ruletypes.yml> for usage examples.
|
||||
|
||||
## Modes
|
||||
|
||||
Modes are optional, and also have the simplest configuration. To define modes, add this to your configuration:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue