Better deadzones (#19)
Reviewed-on: #19 Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com> Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
parent
8a903e0703
commit
2650159a81
12 changed files with 273 additions and 194 deletions
33
internal/configparser/ruletarget.go
Normal file
33
internal/configparser/ruletarget.go
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package configparser
|
||||
|
||||
type RuleTargetConfigButton struct {
|
||||
Device string
|
||||
Button string
|
||||
Inverted bool
|
||||
}
|
||||
|
||||
type RuleTargetConfigAxis struct {
|
||||
Device string
|
||||
Axis string
|
||||
Inverted bool
|
||||
Deadzones []DeadzoneConfig
|
||||
}
|
||||
|
||||
type DeadzoneConfig struct {
|
||||
Center int32 `yaml:"center,omitempty"`
|
||||
Size int32 `yaml:"size,omitempty"`
|
||||
SizePercent int32 `yaml:"size_percent,omitempty"`
|
||||
Start int32 `yaml:"start,omitempty"`
|
||||
End int32 `yaml:"end,omitempty"`
|
||||
Emit bool `yaml:"emit,omitempty"`
|
||||
Value int32 `yaml:"emit_value,omitempty"`
|
||||
}
|
||||
|
||||
type RuleTargetConfigRelaxis struct {
|
||||
Device string
|
||||
Axis string
|
||||
}
|
||||
|
||||
type RuleTargetConfigModeSelect struct {
|
||||
Modes []string
|
||||
}
|
||||
|
|
@ -65,29 +65,3 @@ type RuleConfigModeSelect struct {
|
|||
Input RuleTargetConfigButton
|
||||
Output RuleTargetConfigModeSelect
|
||||
}
|
||||
|
||||
type RuleTargetConfigButton struct {
|
||||
Device string
|
||||
Button string
|
||||
Inverted bool
|
||||
}
|
||||
|
||||
type RuleTargetConfigAxis struct {
|
||||
Device string
|
||||
Axis string
|
||||
DeadzoneCenter int32 `yaml:"deadzone_center,omitempty"`
|
||||
DeadzoneSize int32 `yaml:"deadzone_size,omitempty"`
|
||||
DeadzoneSizePercent int32 `yaml:"deadzone_size_percent,omitempty"`
|
||||
DeadzoneStart int32 `yaml:"deadzone_start,omitempty"`
|
||||
DeadzoneEnd int32 `yaml:"deadzone_end,omitempty"`
|
||||
Inverted bool
|
||||
}
|
||||
|
||||
type RuleTargetConfigRelaxis struct {
|
||||
Device string
|
||||
Axis string
|
||||
}
|
||||
|
||||
type RuleTargetConfigModeSelect struct {
|
||||
Modes []string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue